edu.stanford.nlp.parser.lexparser
Class ChineseSimWordAvgDepGrammar
java.lang.Object
edu.stanford.nlp.parser.lexparser.AbstractDependencyGrammar
edu.stanford.nlp.parser.lexparser.MLEDependencyGrammar
edu.stanford.nlp.parser.lexparser.ChineseSimWordAvgDepGrammar
- All Implemented Interfaces:
- DependencyGrammar, Serializable
public class ChineseSimWordAvgDepGrammar
- extends MLEDependencyGrammar
A Dependency grammar that smooths by averaging over similar words.
- Author:
- Galen Andrew, Pi-Chuan Chang
- See Also:
- Serialized Form
Methods inherited from class edu.stanford.nlp.parser.lexparser.MLEDependencyGrammar |
addRule, countHistory, dumpSizes, expandDependency, getStopProb, probTB, pruneTW, readData, scoreAll, toString, treeToDependencyHelper, treeToDependencyList, tune, writeData |
Methods inherited from class edu.stanford.nlp.parser.lexparser.AbstractDependencyGrammar |
courseDistanceBin, distanceBin, intern, numDistBins, numTagBins, regDistanceBin, rootTW, score, score, scoreTB, tagBin, tagNumberer, valenceBin, wordNumberer |
ChineseSimWordAvgDepGrammar
public ChineseSimWordAvgDepGrammar(TreebankLangParserParams tlpParams,
boolean directional,
boolean distance,
boolean coarseDistance)
getMap
public static Map<Pair<Integer,String>,List<Triple<Integer,String,Double>>> getMap(String filename)
scoreTB
public double scoreTB(edu.stanford.nlp.parser.lexparser.Dependency dependency)
- Description copied from interface:
DependencyGrammar
- Score a Dependency according to the grammar.
- Specified by:
scoreTB
in interface DependencyGrammar
- Overrides:
scoreTB
in class MLEDependencyGrammar
- Parameters:
dependency
- The dependency object to be scored, where the tags in
the dependency have already been mapped to a reduced space by a
tagProjection function.
- Returns:
- The negative log probability given to the dependency by the
grammar. This may be Double.NEGATIVE_INFINITY for "impossible".
setLex
public void setLex(Lexicon lex)
finalize
protected void finalize()
throws Throwable
- Overrides:
finalize
in class Object
- Throws:
Throwable
Stanford NLP Group