edu.stanford.nlp.parser.lexparser
Class LinearGrammarSmoother

java.lang.Object
  extended by 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

Constructor Summary
LinearGrammarSmoother(TrainOptions trainOptions, Index<String> stateIndex, Index<String> tagIndex)
           
 
Method Summary
 Pair<UnaryGrammar,BinaryGrammar> apply(Pair<UnaryGrammar,BinaryGrammar> bgug)
          Destructively modifies the input and returns it as a convenience.
 String basicCategory(String category)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LinearGrammarSmoother

public LinearGrammarSmoother(TrainOptions trainOptions,
                             Index<String> stateIndex,
                             Index<String> tagIndex)
Method Detail

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