edu.stanford.nlp.parser.lexparser
Class LinearGrammarSmoother
java.lang.Object
edu.stanford.nlp.parser.lexparser.LinearGrammarSmoother
- All Implemented Interfaces:
- Function<Pair<UnaryGrammar,BinaryGrammar>,Pair<UnaryGrammar,BinaryGrammar>>
public class LinearGrammarSmoother
- extends Object
- implements Function<Pair<UnaryGrammar,BinaryGrammar>,Pair<UnaryGrammar,BinaryGrammar>>
Implements linear rule smoothing a la Petrov et al. (2006).
- Author:
- Spence Green
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LinearGrammarSmoother
public LinearGrammarSmoother(TrainOptions trainOptions,
Index<String> stateIndex,
Index<String> tagIndex)
apply
public Pair<UnaryGrammar,BinaryGrammar> apply(Pair<UnaryGrammar,BinaryGrammar> bgug)
- Destructively modifies the input and returns it as a convenience.
- Specified by:
apply
in interface Function<Pair<UnaryGrammar,BinaryGrammar>,Pair<UnaryGrammar,BinaryGrammar>>
- Parameters:
bgug
- The function's argument
- Returns:
- The function's evaluated value
basicCategory
public String basicCategory(String category)
Stanford NLP Group