Yeah, I’d like to use PLOW to teach an agent to parse <a href=“http://www.cs.rochester.edu/research/cisd/projects/trips/parser/cgi/web-parser-xml.cgi?input=Fruit+flies+like+a+banana.&treec>the TRIPS parser</a> output automatically…(Note it gets “Fruit flies like a banana” wrong.)
But PLOW doesn’t seem to be available for download. TRIPS parser either.
So maybe I can start with the Stanford Lexparser,
> parse: John ate an apple.
(NP (NNP John))
(VP (VBD ate)
(NP (DT an) (NN apple)))
> The subject is John.
[Agent searches for “John” in the parse tree and associates the tags next to it with “subject”]
> What is the subject of “John ate an apple”?
[Agent tells itself to “parse: John ate an apple”, then searches through the parse tree for the tags associated with “subject”, and hypothesizes that this is the answer to the question.]
> What is the subject of “The philosopher ate an apple”?
[Agent doesn’t find the same sequence of tags associated with “subject”, so it gets the answer wrong.]
> The subject of “The philosopher ate an apple” is “The philosopher”
[Agent now associates the DET-NN tags with “subject”.]
Actually it would probably be easier to use stanford’s dependency relations to extract subject-verb-object:
> dependencies: John ate an apple.
Now the agent could associate “subject” in a query with “nsubj”.
If first taught “The verb in ‘John ate an apple’ is ‘ate’”, the agent could associate “what is the verb” with the “root” tag.
I don’t know how to correct the following misparse, though:
> dependencies: Fruit flies like a banana.
Actually, I have an idea but it would involve totally rewriting the parser’s output. I actually tried something like this with Link grammar, and it was so complicated I don’t think I could make it work now. So I try to find a way that’s easier to remember months (or years) later…