python - How to check if sentence contains words only from a file -
i trying create program checks if string entered user contains words text file, contain words english dictionary. remove slang language. if have other way of doing this, please let me know relatively new python. in advance.
- take dictionary, put words in sort of hash set.
- take sentence, split words, hash each word. check if hash occurs in hash set.
Comments
Post a Comment