public class CacheParseHypotheses
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
java.util.function.Predicate<Tree> |
treeFilter |
Constructor and Description |
---|
CacheParseHypotheses(LexicalizedParser parser) |
Modifier and Type | Method and Description |
---|---|
java.util.IdentityHashMap<Tree,byte[]> |
convertToBytes(java.util.IdentityHashMap<Tree,java.util.List<Tree>> uncompressed) |
byte[] |
convertToBytes(java.util.List<Tree> input) |
static java.util.List<Tree> |
convertToTrees(byte[] input) |
static java.util.IdentityHashMap<Tree,java.util.List<Tree>> |
convertToTrees(java.util.Collection<Tree> keys,
java.util.IdentityHashMap<Tree,byte[]> compressed,
int numThreads) |
static java.util.IdentityHashMap<Tree,java.util.List<Tree>> |
convertToTrees(java.util.IdentityHashMap<Tree,byte[]> compressed,
int numThreads) |
static void |
main(java.lang.String[] args)
An example of a command line is
java -mx1g edu.stanford.nlp.parser.dvparser.CacheParseHypotheses -model /scr/horatio/dvparser/wsjPCFG.nocompact.simple.ser.gz -output cached9.simple.ser.gz -treebank /afs/ir/data/linguistic-data/Treebank/3/parsed/mrg/wsj 200-202 java -mx4g edu.stanford.nlp.parser.dvparser.CacheParseHypotheses -model ~/scr/dvparser/wsjPCFG.nocompact.simple.ser.gz -output cached.train.simple.ser.gz -treebank /afs/ir/data/linguistic-data/Treebank/3/parsed/mrg/wsj 200-2199 -numThreads 6 java -mx4g edu.stanford.nlp.parser.dvparser.CacheParseHypotheses -model ~/scr/dvparser/chinese/xinhuaPCFG.ser.gz -output cached.xinhua.train.ser.gz -treebank /afs/ir/data/linguistic-data/Chinese-Treebank/6/data/utf8/bracketed 026-270,301-499,600-999 |
public final java.util.function.Predicate<Tree> treeFilter
public CacheParseHypotheses(LexicalizedParser parser)
public byte[] convertToBytes(java.util.List<Tree> input)
public java.util.IdentityHashMap<Tree,byte[]> convertToBytes(java.util.IdentityHashMap<Tree,java.util.List<Tree>> uncompressed)
public static java.util.List<Tree> convertToTrees(byte[] input)
public static java.util.IdentityHashMap<Tree,java.util.List<Tree>> convertToTrees(java.util.IdentityHashMap<Tree,byte[]> compressed, int numThreads)
public static java.util.IdentityHashMap<Tree,java.util.List<Tree>> convertToTrees(java.util.Collection<Tree> keys, java.util.IdentityHashMap<Tree,byte[]> compressed, int numThreads)
public static void main(java.lang.String[] args) throws java.io.IOException
java.io.IOException