C# 클래스 CFGLib.CNFGrammar

Represents a concrete (probabilistic) context free grammar in Chomsky normal form (CNF)
상속: BaseGrammar
파일 보기 프로젝트 열기: ellisonch/CFGLib 1 사용 예제들

Private Properties

프로퍼티 타입 설명
BuildLookups void
CNFGrammar System
ProductionsFrom IEnumerable
ProductionsProductingTerminal ICollection

공개 메소드들

메소드 설명
Accepts ( Sentence s ) : bool

Returns whether this grammar accepts the given sentence

AddProduction ( Production production ) : void
CNFGrammar ( IEnumerable productions, Nonterminal start ) : System
Cyk ( Sentence s ) : double
ShallowClone ( ) : BaseGrammar

보호된 메소드들

메소드 설명
RemoveProductionWithoutSimplifying ( Production production ) : void

비공개 메소드들

메소드 설명
BuildLookups ( ) : void
CNFGrammar ( ) : System
ProductionsFrom ( Nonterminal lhs ) : IEnumerable
ProductionsProductingTerminal ( Terminal terminal ) : ICollection

메소드 상세

Accepts() 공개 메소드

Returns whether this grammar accepts the given sentence
public Accepts ( Sentence s ) : bool
s Sentence
리턴 bool

AddProduction() 공개 메소드

public AddProduction ( Production production ) : void
production Production
리턴 void

CNFGrammar() 공개 메소드

public CNFGrammar ( IEnumerable productions, Nonterminal start ) : System
productions IEnumerable
start Nonterminal
리턴 System

Cyk() 공개 메소드

public Cyk ( Sentence s ) : double
s Sentence
리턴 double

RemoveProductionWithoutSimplifying() 보호된 메소드

protected RemoveProductionWithoutSimplifying ( Production production ) : void
production Production
리턴 void

ShallowClone() 공개 메소드

public ShallowClone ( ) : BaseGrammar
리턴 BaseGrammar