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, java.io.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 |
coarseDistanceBins, directional, expandDependencyMap, lex, numTagBins, regDistanceBins, stopTW, tagBin, tagProjection, tlp, useCoarseDistance, useDistance, wildTW |
Method Summary |
protected void |
finalize()
|
static java.util.Map<Pair<java.lang.Integer,java.lang.String>,java.util.List<Triple<java.lang.Integer,java.lang.String,java.lang.Double>>> |
getMap(java.lang.String filename)
|
double |
scoreTB(IntDependency dependency)
Score a tag binned dependency. |
void |
setLex(Lexicon lex)
|
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 |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
ChineseSimWordAvgDepGrammar
public ChineseSimWordAvgDepGrammar(TreebankLangParserParams tlpParams,
boolean directional,
boolean distance,
boolean coarseDistance)
getMap
public static java.util.Map<Pair<java.lang.Integer,java.lang.String>,java.util.List<Triple<java.lang.Integer,java.lang.String,java.lang.Double>>> getMap(java.lang.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 java.lang.Throwable
- Overrides:
finalize
in class java.lang.Object
- Throws:
java.lang.Throwable
Stanford NLP Group