Class FeatureEarleyChartParse
source code
??-173 --+
|
FeatureEarleyChartParse
A chart parser implementing the Earley parsing algorithm, allowing
nonterminals that have features (known as Categories
).
-
For each index end in [0, 1, ..., N]:
-
For each edge s.t. edge.end = end:
-
If edge is incomplete, and edge.next is not a
part of speech:
-
Apply PredictorRule to edge
-
If edge is incomplete, and edge.next is a part
of speech:
-
Apply ScannerRule to edge
-
If edge is complete:
-
Apply CompleterRule to edge
-
Return any complete parses in the chart
FeatureEarleyChartParse
uses a lexicon to decide
whether a leaf has a given part of speech. This lexicon is encoded as a
dictionary that maps each word to a list of parts of speech that word can
have. Unlike in the EarleyChartParse
, this
lexicon is case-insensitive.