This is an extremely experimental project, in fact I just coded it up over one weekend, so don't be surprised at the lack of depth or docuemenation. My attempt was to create a Augemented Transition Network parser for use by the tutor system. There are presently only 4 network strcutres. The Sentence, Question, Noun Phrase, and Verb Phrase. The parts of speech include Article, Verb, Noun, and Question Word.
First, an overall view. The New Parsing Tutor is my testbed for the ATN. If you say anything in the room, the tutor takes the sentence and parses it.
Sample Trace:
Player: say This is a sentence.
MOO: (Tutor)#1498:tell({"This", "is", "a", "sentence."})
MOO: (Grammar)#1486:parse("This is a sentence")
MOO: (Sentence)#1489:start(sentence object containing sentence, after this called sent_obj)
MOO: (Sentence)#1489:NounPhrase2(sent_obj)
MOO: (NounPhrase)#1493:start(sent_obj)
MOO: (NounPhrase)#1493:Article1(sent_obj) // Returns false, "This" is not an article
MOO: (NounPhrase)#1493:Noun2(sent_obj) //Also returns fail, "This" is not a noun
MOO Output (after returning to #1498:tell with fail): Invalid Sentence!
Parsing
As you can see from the trace, whenever execution goes into a parse network, the start verb on that object is called. See the graphic for a pictoral representation of the entire network.
To follow the example trace, start at the first bubble of the sentence network. the only arc coming out is the NounPhrase arc, so NounPhrase:start is called. Then go to the left-most bubble of the NounPhrase network. First go through the Article arc. Since that is a terminal, it is inside the NounPhrase object. Since that fails, go to the other arc which also fails, completing the invalid trace.
Subject - The subject of the sentence.
Verb - The main verb of the sentence.
Question Word - The question word in the sentence
Sentence Location - The location in the sentence that the parser is at in the present sentence
Known Bug - It fails to parse correctly if there is punctuation.
addWord ( word, type_of_speech )
Example call: #1486:addWord("Granite", "Noun")
Return value: None (Always add something)
TODO - Make sure that Noun and noun are the same type of speech
TODO - See lexicon (Add more lexicon entries)
TODO - More error checking
TODO - Make some front ends for the function (graphical and text)
All other verbs and properties in this objects were failed attempts, you can remove them at your leisure
This tutor is what I used to test the network parser. You can say things to it to see if it is a valid sentence in the grammar.
tell
This is the overriding function of tell to send the sentence to the parser. It breaks apart any words
used in say and responds if it is a valid sentence or not.
Most of my information on Augmented Network Parsers came from Luger and Stubblefield's Artificial Intelligence Third Edition published in 1998, pgs 534-543. Also of interest are some Winter Quarter 1998 lecture notes from Georgia Tech's CS4344/7344 Natural Language Understanding by Computer taught by Kurt Eisett and Jen Holbrook. More NLP Links.
Return to the Geology Explorer Programming Nanual