I am building a project involving natural language processing, since the nlp module currently only deal with english text, so I have to make sure the user submitted content (not long, only several words) is in english. Are there established ways to achieve this? Python or Javascript way preferred.
If the content is long enough I would suggest some frequency analysis on the letters.
But for a few words I think your best bet is to compare them to an English dictionary and accept the input if half of them match.
Check the Language Recognition Chart
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With