Namespace EarleyParser
Classes
ContextFreeGrammar
Implements Context Free Grammar - a list of context free production Rules. It supports the tentative addition and substraction of rules, as well as the possibility to accept/reject these changes.
Note: The terminals corresponding to parts of speech (e.g. D -> 'the', A -> 'big') appear in a separate vocabulary.json file See CFGExample.txt for an example. Many other example grammar appear also in the unit test project.
EarleyColumn
Represents a column in the Earley parsing chart, corresponding to a specific position in the input.
EarleyGenerator
A specialized version of the Earley parser that generates all possible sentences from a grammar.
EarleyParser
The main class responsible for parsing using the Earley algorithm (Earley 1970, Stolcke 1995).
EarleyParserParams
Parameters for configuring the Earley parser.
EarleySpan
Represents a collection of ambiguous completed states with the same left-hand side and span.
EarleyState
Represents an Earley Item/State in the parsing chart.
Grammar
Abstract base class for grammar implementations in the Earley parser.
GrammarFileReader
This class generates list of Context Free or Context Sensitive Rules from a text file. see CFGExample.txt and LIGExample.txt for example grammars.
MaxHeap
A binary heap implementation that maintains the maximum element at the root.
Pseudorandom
Provides thread-safe pseudorandom number generation using cryptographically secure seeds.
Rule
This class implements a production rule, which is of the form: Left Hand Side -> Right Hand Side Left hand side can be a single nonterminal, right hand side can be a sequence of nonterminals. see class description of Nonterminal for more details about the nonterminal type. (Right hand side with length 0 expands to the empty string, i.e. an epsilon rule)
TooManyEarleyItemsGeneratedException
Exception thrown when the Earley parser generates too many completed items in a set.
Vocabulary
Manages the vocabulary and part-of-speech relationships for the parser.
Enums
Color
Represents the color state used in cycle detection when visiting completed states.