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
Fields inherited from class edu.stanford.nlp.parser.lexparser.MLEDependencyGrammar |
argCounter, interp, MIN_PROBABILITY, numWordTokens, smooth_aPTW_aPT, smooth_aT_hTd, smooth_aT_hTWd, smooth_aTW_aT, smooth_aTW_hTd, smooth_aTW_hTWd, smooth_stop, stopCounter, tagITWList |
Fields inherited from class edu.stanford.nlp.parser.lexparser.AbstractDependencyGrammar |
directional, expandDependencyMap, lex, numTagBins, stopTW, tagBin, tagProjection, tlp, useCoarseDistance, useDistance, wildTW |
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 |
coarseDistanceBin, distanceBin, initTagBins, intern, numDistBins, numTagBins, regDistanceBin, rootTW, score, score, scoreTB, setLexicon, 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(IntDependency dependency)
- Description copied from class:
MLEDependencyGrammar
- Score a tag binned dependency.
- 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