Class AugmentedChartParser
java.lang.Object
BottomUpChartParser
AugmentedChartParser
- Direct Known Subclasses:
- HeadFeaturedChartParser
- public class AugmentedChartParser
- extends BottomUpChartParser
This is the augmented bottom-up parser described in NLU Chapter 4.
It uses features, but unless I get around to it, there's no
morphological analyzer, so you need to translate words like
``sees'' into ``SEE +S'' and ``seeing'' into ``SEE +ING''.
Fields inherited from class BottomUpChartParser |
agenda, categoryCounters, chart, grammar, inputLength, lexicon, nParsesFound, nParsesWanted, SYMBOL_S, tokenizer, tokens |
Method Summary |
(package private) Arc |
extendArcWithEntry(Arc arc,
Entry entry)
From BottomUpChartParser:
If the constituent of the given Entry matches the next Constituent
of the given Arc, then create and return a new Arc extending the given
one, otherwise return null. |
static void |
main(java.lang.String[] argv)
Test the augmented bottom-up chart parser. |
Methods inherited from class BottomUpChartParser |
addArcToChart, addEntryToChart, createEntryForCompletedArc, createEntryId, entryIsCompleteParse, extendArcsForEntry, fireRulesForEntry, initializeAgenda, initializeAgendaForWord, main, parse, parseDone, setGrammar, setLexicon, setNParsesWanted, setTokenizer, tokensAsString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AugmentedChartParser
public AugmentedChartParser()
extendArcWithEntry
Arc extendArcWithEntry(Arc arc,
Entry entry)
- From BottomUpChartParser:
If the constituent of the given Entry matches the next Constituent
of the given Arc, then create and return a new Arc extending the given
one, otherwise return null.
The augmented parser differs from the basic one in that
(a) when extending an arc, the constituents are unified rather
than simply matching their categories, and (b) the rule used
to instantiate the new arc has the unifying substitution applied.
Implementation note: The sort of ugly casting here is to avoid
having to redo the entire ChartParser class using ``Augmented''
version of all the data structures (like Arc, Entry, etc.), which
are really the same except for using AugmentedConstituent and
AugmentedRule.
- Overrides:
extendArcWithEntry
in class BottomUpChartParser
main
public static void main(java.lang.String[] argv)
- Test the augmented bottom-up chart parser.