edu.stanford.nlp.parser.lexparser.NullGrammarProjection Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of stanford-parser Show documentation
Show all versions of stanford-parser Show documentation
Stanford Parser processes raw text in English, Chinese, German, Arabic, and French, and extracts constituency parse trees.
package edu.stanford.nlp.parser.lexparser;
/** @author Dan Klein */
class NullGrammarProjection implements GrammarProjection {
UnaryGrammar ug;
BinaryGrammar bg;
public int project(int state) {
return state;
}
public UnaryGrammar sourceUG() {
return ug;
}
public BinaryGrammar sourceBG() {
return bg;
}
public UnaryGrammar targetUG() {
return ug;
}
public BinaryGrammar targetBG() {
return bg;
}
NullGrammarProjection(BinaryGrammar bg, UnaryGrammar ug) {
this.ug = ug;
this.bg = bg;
}
}