edu.stanford.nlp.parser.lexparser
Class ChineseSimWordAvgDepGrammar

java.lang.Object
  extended by edu.stanford.nlp.parser.lexparser.AbstractDependencyGrammar
      extended by edu.stanford.nlp.parser.lexparser.MLEDependencyGrammar
          extended by 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

Field Summary
 
Fields inherited from class edu.stanford.nlp.parser.lexparser.MLEDependencyGrammar
argCounter, interp, MIN_PROBABILITY, numWords, smooth_aT_hTWd, smooth_aTW_hTWd, smooth_stop, stopCounter, tagITWList
 
Fields inherited from class edu.stanford.nlp.parser.lexparser.AbstractDependencyGrammar
directional, expandDependencyMap, numTagBins, stopTW, tagBin, tagProjection, tlp, useCoarseDistance, useDistance, wildTW
 
Constructor Summary
ChineseSimWordAvgDepGrammar(TreebankLangParserParams tlpParams, boolean directional, boolean distance, boolean coarseDistance)
           
 
Method Summary
protected  void finalize()
           
static Map<Pair<Integer,String>,List<Triple<Integer,String,Double>>> getMap(String filename)
           
 double scoreTB(edu.stanford.nlp.parser.lexparser.Dependency dependency)
          Score a Dependency according to the grammar.
 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
courseDistanceBin, distanceBin, intern, numDistBins, numTagBins, regDistanceBin, rootTW, score, score, scoreTB, tagBin, tagNumberer, valenceBin, wordNumberer
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ChineseSimWordAvgDepGrammar

public ChineseSimWordAvgDepGrammar(TreebankLangParserParams tlpParams,
                                   boolean directional,
                                   boolean distance,
                                   boolean coarseDistance)
Method Detail

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