C# Class CFGLib.Parsers.CYK.CykParser

Inheritance: Parser
Show file Open project: ellisonch/CFGLib Class Usage Examples

Public Methods

Method Description
CykParser ( CNFGrammar grammar ) : CFGLib.Parsers.Forests
ParseGetForest ( Sentence s ) : ForestInternal
ParseGetProbability ( Sentence s ) : double

Returns the probability that this grammar generated the given sentence

Private Methods

Method Description
BuildLocalCYKProductionList ( int>.Dictionary RToJ ) : IEnumerable

Returns a representation of the nt productions that is efficient for CYK

BuildRToJ ( ISet nonterminals_R ) : int>.Dictionary
CykFillInBase ( Sentence s, double P, int>.Dictionary RToJ ) : bool
PrintP ( Sentence s, double P ) : void

Method Details

CykParser() public method

public CykParser ( CNFGrammar grammar ) : CFGLib.Parsers.Forests
grammar CNFGrammar
return CFGLib.Parsers.Forests

ParseGetForest() public method

public ParseGetForest ( Sentence s ) : ForestInternal
s Sentence
return CFGLib.Parsers.Forests.ForestInternal

ParseGetProbability() public method

Returns the probability that this grammar generated the given sentence
public ParseGetProbability ( Sentence s ) : double
s Sentence
return double