To check if each entered word is meaningful or not, it has to be compared with every word in the text file
Yes there is. It comes down to your lookup. If a words starts with H, maybe you only check the words that start with H and not then entire dictionary.
Here's where functions can help you.
You an write a Lookup() that does a complete dictionary search and call it to find a word. Later you can rewrite Lookup() to do a more efficicent search. Then all you need to is recompile your code to use the new function.