Alex Rivera | Logout

How to ensure user submit only english text

Asked 2008-10-13T07:32:12.953
9

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.

Edit
Report

2 Answers

6
answered 2008-10-13T08:05:26.553
1

Try:

http://wordlist.sourceforge.net/

For a list of English words.

You will need to be careful of names, e.g. "Canberra" or "Bill Clinton". These won't appear in the word list. I suggest just checking whether the first letter is capitalized as a first attempt.

answered 2008-10-13T07:52:22.240

Your Answer