quote: Original post by MikeD
Regarding mis-spelt words, you could use some heuristic to compare an unknown word with all the words in the dictionary and try to guess the meaning. You could cut down the search by analysing the type of word you're expecting (verb, noun etc) and search those word lists first.
So if "Give me a sord" matches a verb phrase best then the computer knows that sord is most likely a verb, searches the list of verbs comparing word length, word ordering and word fragments against the verb dictionary and hopefully come up with the word sword as the most likely answer.
I think this would start to encroach upon CPU usage somewhat. Especially if you are dealing with statements, orders, and questions, as you have different words orders in each this makes it harder to guess what to expect. I think it might not be worth the effort to support misspellings.
quote:
You can then use the fact that the word was mis-spelt to ask the player a question. "Did you say you wanted a sword?".
This starts to get more complex. The NPCs now have to be able to construct meaningful questions and phrase them properly. Understanding text is one thing, but putting it together is another. You would probably have to do one response for pretty much every verb that NPC could understand. And for what? Why waste your players' time asking them if they wanted a sword, if your search function had shown it to be pretty obvious in the first place - so much so, that the NPC suggests it?
Not to mention that the player's instinctive response will be "yes", meaning that you now have to encorporate some sort of 'history', or a conversation context, and to be able to combine that with the current sentence to obtain the meaning... this is not trivial even for advanced NLP applications and is not really practical for a game. It is almost definitely overkill too.
quote:Also, it would be useful to have many different examples of each phrase type, from
"I would like a sword"
to
"Ug want sword"
Every extra phrase type supported makes it more difficult to accurately guess which type of word comes next, as you don't know what phrase type it is before analysing it. Therefore this reduces the chances of an accurate interpretation rather than increasing it.
Edited by - Kylotan on 4/13/00 3:22:55 AM