Python Forum
Datasets of grammatically uncommon sentences? - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: Data Science (https://python-forum.io/forum-44.html)
+--- Thread: Datasets of grammatically uncommon sentences? (/thread-22182.html)



Datasets of grammatically uncommon sentences? - regstuff - Nov-02-2019

Hi,
I'm trying to train a model which replaces grammatically correct but uncommon sentences, with their more common counterparts. So I'm looking for any datasets of grammatically uncommon sentences paired with their more common versions.

For eg.
1. Already, enough punishment had been given.
2. Enough punishment had been given already.
3. Enough punishment had already been given.
All sentences say the same thing, but No. 3 is the most likely version you would encounter.

Another eg.
1. Either by you or someone else, the bill must be paid.
2. Either you or someone else must pay the bill.
3. The bill must be paid either by you or someone else.
No. 1 would be the unlikely version. No. 2 & 3 are more likely.

Any suggestions where I can find these? Or any other mechanisms through which I can achieve the end goal of replacing uncommon grammar with "common grammar".

Thanks


RE: Datasets of grammatically uncommon sentences? - Larz60+ - Nov-02-2019

here's a good place to look: https://en.wikipedia.org/wiki/List_of_text_corpora


RE: Datasets of grammatically uncommon sentences? - regstuff - Nov-03-2019

Thanks. That was some pretty interesting stuff there. But not exactly what I was looking for. Maybe some English as second-language datasets might do the trick?


RE: Datasets of grammatically uncommon sentences? - Larz60+ - Nov-03-2019

The only package that I know of that will help with grammar (for any language, actually) is NLTK.
This article is specifically written to that end: https://www.nltk.org/book/ch08.html
Also, google 'grammatically analyse a sentence with python'