|Perl: the Markov chain saw|
Yes, that is exactly what it expects: an Urdu word. Hindi is also a possibility as Platts has both and this script will be used for that as well. I did solve the encoding issue and that works without problems--I can find a several-word combination with the present regex and current files. The problem with Platts is that it has older spellings and inconsistent entry of some of the letters. I did a mass search and replace for some of the inconsistencies, but there are differences in word spellings in Platts' time (late 1800's) from what is the norm now that are not necessarily incorrect. This is why an alternate spelling is requested.
I will try your approach to the problem. The reason for asking for the correct definition is to cut down on numerous multiple definitions for the same word--an easy fix with BBEdit once the file is generated.
As you can see, I am still very much a noob with the code writing but am able to, most of the time, get the results that I need in a much shorter time period than by manually doing the work. The rest of the time I am learning something for the next iteration!
Thanks for your help!