I'm looking for a tool (ideally) or failing that an API to search text for instances of any word from a large dictionary of words in a large number of text files. "Words" in my case are actually file names but won't contain spaces.
A fast algorithm might perhaps build a DFA (deterministic finite automata) by reading the dictionary and then be able to use a single pass to find instances of the dictionary words over any number of files.
Note: I'm wanting exact text matching not fuzzy matching like this SO question: - Algorithm wanted: Find all words of a dictionary that are similar to words in a free text