Grammar for AI
Hello, I''m looking for some free libraries for C++ which allows you to test words for their grammatical values. For example it should tell you that "went" is the past participle of "to go" and so forth. Are there any such libraries that you know of? I''ve got the WordNet libraries but they don''t tell you whether a word is past/future tense and also don''t include words such as "he","she","I" etc.
Any ideas?
Thanks.
Paul.
I don''t see how it would be too hard to create one of your own... it would just take a lot of time.
You might try Moby Words (see, for instance: http://www.dcs.shef.ac.uk/research/ilash/Moby/), although I''m not sure whether that will do everything you want.
this is the holy grail that i am after right now. communication with the ai not through predetermined conversation but through actual conversation is one of the many goals that i would like to accomplish, although it is probably the most far out of reach. my advice would be to create one on your own.
the system seems simple enough on its face, but would obviously be very difficult to implement. so far i have just been breaking language down into it''s most basic components:
question/answer
who? what? where? why? when? how?
possession/persons
i/me/you, we/us/they/them
tense
past, present, future
nouns/verbs
objects, actions
it seems that determining nouns, verbs, and tense would be most difficult, although not necessarily impossible. once the determination is done these words can be loaded into memory slots for any given conversation. thus, if you walk up to an ai character and ask, for example, "where is the lost sword of nihility?", he will know that the "sword" is a noun, and it will be loaded into memory. then, if you ask a follow up question, but use the word "it" instead of "sword", the ai should know that you are still referring to the sword, and the conversation could continue as such.
of course, this will inevitably be buggy. one possible solution would be to give the game a common ai vocabulary, wherein the words are categorized as nouns, verbs, etc. then each ai character can be given some sort of vocabulary indicator (tied to the intelligence attribute in some way) which would indicate the level of common vocabulary, and the level of local vocabulary (ie; characters in certain areas will know more about certain subjects pertinent to their locations).
the system seems simple enough on its face, but would obviously be very difficult to implement. so far i have just been breaking language down into it''s most basic components:
question/answer
who? what? where? why? when? how?
possession/persons
i/me/you, we/us/they/them
tense
past, present, future
nouns/verbs
objects, actions
it seems that determining nouns, verbs, and tense would be most difficult, although not necessarily impossible. once the determination is done these words can be loaded into memory slots for any given conversation. thus, if you walk up to an ai character and ask, for example, "where is the lost sword of nihility?", he will know that the "sword" is a noun, and it will be loaded into memory. then, if you ask a follow up question, but use the word "it" instead of "sword", the ai should know that you are still referring to the sword, and the conversation could continue as such.
of course, this will inevitably be buggy. one possible solution would be to give the game a common ai vocabulary, wherein the words are categorized as nouns, verbs, etc. then each ai character can be given some sort of vocabulary indicator (tied to the intelligence attribute in some way) which would indicate the level of common vocabulary, and the level of local vocabulary (ie; characters in certain areas will know more about certain subjects pertinent to their locations).
ill find me a soapbox where i can shout it
It''s quite a common problem in natural language processing. Try using Google for a "part of speech tagger". Current implementations get over 95% accuracy. There''s an online one at http://ilk.kub.nl/~zavrel/tagtest.html which, although it doesn''t look too amazing, shows that the technology is out there.
[ MSVC Fixes | STL Docs | SDL | Game AI | Sockets | C++ Faq Lite | Boost
Asking Questions | Organising code files | My stuff | Tiny XML | STLPort]
[ MSVC Fixes | STL Docs | SDL | Game AI | Sockets | C++ Faq Lite | Boost
Asking Questions | Organising code files | My stuff | Tiny XML | STLPort]
Thanks everyone. I''ve looked at TAGTEST which seems to be just right, I am going to e-mail them to see if they do a version for C++. I will probably need a few things like this and then link them all together into one program.
Obviously these programs do exist otherwise there couldn''t be a Grammar Test in Word and so forth. The trouble is finding free ones!
Obviously these programs do exist otherwise there couldn''t be a Grammar Test in Word and so forth. The trouble is finding free ones!
also check out wordNet, it has a lot of different functions on words, and for the parsing of sentances i suggest using some kind of modified chart parsing...
good luck
--Spencer
"Relax, this dragon is sleeping..."
good luck
--Spencer
"Relax, this dragon is sleeping..."
--Spencer"All in accordance with the prophecy..."
quote:
Original post by Spencer
also check out wordNet ...
quote:
Original post by paulbird (the original poster)
... I''ve got the WordNet libraries ...
John B
The best thing about the internet is the way people with no experience or qualifications can pretend to be completely superior to other people who have no experience or qualifications.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement