public class DVParser
extends java.lang.Object
Constructor and Description |
---|
DVParser(DVModel model,
LexicalizedParser parser) |
DVParser(LexicalizedParser parser) |
Modifier and Type | Method and Description |
---|---|
LexicalizedParser |
attachModelToLexicalizedParser() |
static TreeTransformer |
buildTrainTransformer(Options op) |
void |
executeOneTrainingBatch(java.util.List<Tree> trainingBatch,
java.util.IdentityHashMap<Tree,byte[]> compressedParses,
double[] sumGradSquare) |
LexicalizedParser |
getBaseParser() |
DVModel |
getDVModel() |
static DVModel |
getModelFromLexicalizedParser(LexicalizedParser parser) |
Options |
getOp() |
static java.util.List<Tree> |
getTopParsesForOneTree(LexicalizedParser parser,
int dvKBest,
Tree tree,
TreeTransformer transformer) |
static void |
help() |
static DVParser |
loadModel(java.lang.String filename,
java.lang.String[] args) |
static void |
main(java.lang.String[] args)
An example command line for training a new parser:
nohup java -mx6g edu.stanford.nlp.parser.dvparser.DVParser -cachedTrees /scr/nlp/data/dvparser/wsj/cached.wsj.train.simple.ser.gz -train -testTreebank /afs/ir/data/linguistic-data/Treebank/3/parsed/mrg/wsj/22 2200-2219 -debugOutputFrequency 400 -nofilter -trainingThreads 5 -parser /u/nlp/data/lexparser/wsjPCFG.nocompact.simple.ser.gz -trainingIterations 40 -batchSize 25 -model /scr/nlp/data/dvparser/wsj/wsj.combine.v2.ser.gz -unkWord "*UNK*" -dvCombineCategories > /scr/nlp/data/dvparser/wsj/wsj.combine.v2.out 2>&1 & |
boolean |
runGradientCheck(java.util.List<Tree> sentences,
java.util.IdentityHashMap<Tree,byte[]> compressedParses) |
void |
saveModel(java.lang.String filename) |
void |
train(java.util.List<Tree> sentences,
java.util.IdentityHashMap<Tree,byte[]> compressedParses,
Treebank testTreebank,
java.lang.String modelPath,
java.lang.String resultsRecordPath) |
public DVParser(DVModel model, LexicalizedParser parser)
public DVParser(LexicalizedParser parser)
public Options getOp()
public DVModel getDVModel()
public LexicalizedParser getBaseParser()
public static java.util.List<Tree> getTopParsesForOneTree(LexicalizedParser parser, int dvKBest, Tree tree, TreeTransformer transformer)
public void train(java.util.List<Tree> sentences, java.util.IdentityHashMap<Tree,byte[]> compressedParses, Treebank testTreebank, java.lang.String modelPath, java.lang.String resultsRecordPath) throws java.io.IOException
java.io.IOException
public void executeOneTrainingBatch(java.util.List<Tree> trainingBatch, java.util.IdentityHashMap<Tree,byte[]> compressedParses, double[] sumGradSquare)
public boolean runGradientCheck(java.util.List<Tree> sentences, java.util.IdentityHashMap<Tree,byte[]> compressedParses)
public static TreeTransformer buildTrainTransformer(Options op)
public LexicalizedParser attachModelToLexicalizedParser()
public void saveModel(java.lang.String filename)
public static DVParser loadModel(java.lang.String filename, java.lang.String[] args)
public static DVModel getModelFromLexicalizedParser(LexicalizedParser parser)
public static void help()
public static void main(java.lang.String[] args) throws java.io.IOException, java.lang.ClassNotFoundException
java.io.IOException
java.lang.ClassNotFoundException