public class DVParser extends 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(List<Tree> trainingBatch,
IdentityHashMap<Tree,byte[]> compressedParses,
double[] sumGradSquare) |
static DVModel |
getModelFromLexicalizedParser(LexicalizedParser parser) |
Options |
getOp() |
static List<Tree> |
getTopParsesForOneTree(LexicalizedParser parser,
int dvKBest,
Tree tree,
TreeTransformer transformer) |
static void |
help() |
static DVParser |
loadModel(String filename,
String[] args) |
static void |
main(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(List<Tree> sentences,
IdentityHashMap<Tree,byte[]> compressedParses) |
void |
saveModel(String filename) |
void |
train(List<Tree> sentences,
IdentityHashMap<Tree,byte[]> compressedParses,
Treebank testTreebank,
String modelPath,
String resultsRecordPath) |
public DVParser(DVModel model, LexicalizedParser parser)
public DVParser(LexicalizedParser parser)
public Options getOp()
public static List<Tree> getTopParsesForOneTree(LexicalizedParser parser, int dvKBest, Tree tree, TreeTransformer transformer)
public void train(List<Tree> sentences, IdentityHashMap<Tree,byte[]> compressedParses, Treebank testTreebank, String modelPath, String resultsRecordPath) throws IOException
IOException
public void executeOneTrainingBatch(List<Tree> trainingBatch, IdentityHashMap<Tree,byte[]> compressedParses, double[] sumGradSquare)
public boolean runGradientCheck(List<Tree> sentences, IdentityHashMap<Tree,byte[]> compressedParses)
public static TreeTransformer buildTrainTransformer(Options op)
public LexicalizedParser attachModelToLexicalizedParser()
public void saveModel(String filename)
public static DVModel getModelFromLexicalizedParser(LexicalizedParser parser)
public static void help()
public static void main(String[] args) throws IOException, ClassNotFoundException
IOException
ClassNotFoundException