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