Counting English words in a random string

Suppose I have a randomly generated string s=t&^%JHGgfdteam*&HGEdfg, what is the best approach to count the number of English words in that string? (English words as defined in some dictionary file). Obviously brute-force is not a good idea... would a suffix-tri e work? Binary search? Notice that in the case of s, there are two words: "tea" and "team". Любые идеи? Regards

7
задан Dervin Thunk 8 September 2010 в 03:12
поделиться