i need to find out a string that is made by removing a space between two words contains a word from a dictionary.
I already have stored in a dictionary in a BST.
I get as a input a text file with random spaces removed. For example:
We left in pretty good time, and came after nightfallto Klausenburgh. Here I stopped for the night at the Hotel Royale. I had for dinner, or rather supper, a chicken done up some way with red pepper, which was very goodbut thirsty. (Mem., get recipe for Mina.) I asked the waiter, and he said it was called "paprika hendl," and that, as it was a nationaldish, I should be able to get it anywhere along the Carpathians. I found my smattering of German very useful here; indeed, I don't know how I should be able to get on without it.
I read the file and saved every word in a list. I need to verify if a word is in the dictionary and count its frequency, i already did this part. the hard part is that i need to verify if i can get words in the dictionary from a space removed string.
For example, 'goodbut' should give me 'good' and should be added in the frequency counter. since 'but' is not in my dictionary.
I have a list with all the strings from the text file that was not in the dictionary when i looked for the frequencies. i need to go trough those words to see if i can get a legal word in them.
But i don't know how. nor where to start