Suppose you have the scrambled string, "urcoppnei".
You want to be able to quickly go from scrambled string to unscrambled. How?
Sort the letters of the string in increasing order. That gives us "ceinoppru".
Now take every word in the dictionary, and sort their letters in increasing order. Put this in a hash, where the sorted form is the key and a list of words is the value. (Use a list, not a single word, because anagrams have the same sorted form. For example, the key "dgino" would have as its value a list containing both "doing" and "dingo".)
Once you do that, look up "ceinoppru" in the hash. You'll probably find that the key "ceinoppru" maps to a list containing one element, "porcupine".
Of course, it would be better to have your dictionary file in the format
...
aaardkrv aardvark
...
dgino doing dingo
...
It wouldn't hurt to sort it by the letter-sorted key.
So, you would unscramble by sorting the letters of the word in ascending order, by looking for this result in the text file (or hash, or map, or whatever).
I don't really understand your file format -- it looks like it's listing words with subwords. Why?
And here's a second edit. What you are asking and your sample input and output seem to be on completely different topics! You leave me baffled...