I've a set of sentences in English language. I'm exploring ways to create a dataset of sentences with grammatical errors programmatically. The following options has been tried out randomly -

  • identify verbs, propositions etc. by POS tagging and change the tense or remove them
  • change the order of 2 or more words
  • remove commas, colons, semi-colons etc.

These are not always fool-proof. Are there any proven ways to approach this problem?


1 Answer 1


Generating artificial errors is generally risky in NLP, because it's difficult to make sure that the type and distribution of errors correspond exactly to real human errors. If the artificial errors diverge from real errors and a model is trained based on this data, the model will appear to have very good performance since it will rely on the patterns used to generate the errors. However it might not perform well with real data, and it would be difficult to detect it.

That being said, it's been a problem which has been studied for quite a while so the state of the art should help: Google Scholar gives a lot of references, probably some of these papers provide existing implementations as well. One may notice that the concerns I mentioned above are a recurrent question, with some recent papers analyzing how much artificial errors actually help.

  • $\begingroup$ I would add that a grammar-based approach for artificial errors, that grammaticaly correspond to human errors, is relatively easy to make given of course that it generates errors with same frequency as humans, which can be a parameter of the process (eg each rule can be given a frequency or probability of occurance) $\endgroup$
    – Nikos M.
    Commented Jan 15, 2021 at 17:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.