Difference between revisions of "SCI Parser Programmer's Reference/Said Spec Trees"
Line 35: | Line 35: | ||
(root verb | (root verb | ||
(or | (or | ||
− | (root verb . 'start) | + | (root verb . 'start') |
(root | (root | ||
(root verb . 'turn') | (root verb . 'turn') | ||
− | (mod prep . 'on) | + | (mod prep . 'on') |
) | ) | ||
) | ) |
Latest revision as of 01:14, 22 December 2015
Said Spec Trees:
When a spec is processed, it is turned into a tree that can be compared with the user parse tree. Since the spec IS a structural specification, the mapping is straightforward. It is important to keep these mappings in mind though, because our goal is to imagine the structure of possible user input trees and create specs that match them closely enough for the similarity to be recognized by the matcher.
At the top level there are three possible "slots" to fill: verb, dobj and iobj. At lower levels the only slots to be filled are ROOT and MOD(ifier). Alternatives and optionals generate OR and OPT nodes with the appropriate children nodes under them.
Example
'start,(turn<on)[/car]' generates the following tree:
Code:(root s (root verb (or (root verb . 'start') (root (root verb . 'turn') (mod prep . 'on') ) ) ) (opt (dobj np (root noun . 'car') ) ) )
- Notes
< Previous: Said Syntax Next: Tree Matching >