Writing a parser the right way?
andreas.zwinkau at googlemail.com
Thu Sep 22 19:27:28 CEST 2005
Thanks for the hints. I just found NLTK and MontyLingua.
And yes, it is just adventure game language. This means every tense
except present tense is discarded as "not changing world". Furthermore
the parser will make a lot of assumptions, which are perhaps 90% right,
if word[-2:] == "ly":
Note that uppercase words are identified before, so Willy is parsed
correctly as a noun. On the other hand "silly boy", will not return a
Currently it is just a proof-of-concept. Maybe i can integrate a better
parser engine later. The idea is a kind of mud, where you talk correct
sentences instead of "go north". I envision a difference like Diablo to
Pen&Paper. I'd call it more a collaborative story telling game, than a
I fed it your sentences, Paul. Result:
<['I', 'drive', 'a']> <['red']> <['truck']>
<['I']> <['drive']> <['a', 'red', 'truck']>
Verbs are the tricky part i think. There is no way to recognice them.
So i will have to get a database ... work to do. ;)
More information about the Python-list