public class Config
extends java.lang.Object
DependencyParser
Modifier and Type | Field and Description |
---|---|
double |
adaAlpha
Initial global learning rate for AdaGrad training
|
double |
adaEps
An epsilon value added to the denominator of the AdaGrad
expression for numerical stability
|
int |
batchSize
Size of mini-batch for training.
|
int |
clearGradientsPerIter
During training, clear AdaGrad gradient histories after every
clearGradientsPerIter iterations. |
boolean |
cPOS
Use coarse POS instead of fine-grained POS if cPOS = true.
|
boolean |
doWordEmbeddingGradUpdate
Update word embeddings when performing gradient descent.
|
double |
dropProb
Dropout probability.
|
int |
embeddingSize
Dimensionality of the word embeddings used
|
java.util.function.Function<java.util.List<HasWord>,java.util.List<HasWord>> |
escaper
Defines a word-escaper to use when parsing raw sentences.
|
int |
evalPerIter
During training, run a full UAS evaluation after every
evalPerIter iterations. |
int |
hiddenSize
Size of the neural network hidden layer.
|
double |
initRange
Model weights will be initialized to random values within the
range
[-initRange, initRange] . |
Language |
language
The language being parsed.
|
int |
maxIter
Maximum number of iterations for training
|
static int |
NONEXIST
Represent a non-existent token.
|
boolean |
noPunc
Exclude punctuations in evaluation if noPunc = true.
|
static java.lang.String |
NULL
Non-existent token string.
|
int |
numCached
Number of hidden layer activations to cache.
|
int |
numPreComputed
Number of input tokens for which we should compute hidden-layer
unit activations.
|
static int |
numTokens
Total number of tokens provided as input to the classifier.
|
boolean |
preTokenized
Provided text is tokenized by whitespace.
|
double |
regParameter
Regularization parameter.
|
static java.lang.String |
ROOT
Root token string.
|
boolean |
saveIntermediate
Save an intermediate model file whenever we see an improved UAS
evaluation.
|
java.lang.String |
sentenceDelimiter
If non-null, when parsing raw text assume sentences have already
been split and are separated by the given delimiter.
|
static java.lang.String |
SEPARATOR
For printing messages.
|
java.lang.String |
tagger
Path to a tagger file compatible with
MaxentTagger . |
TreebankLanguagePack |
tlp
Describes language-specific properties necessary for training and
testing.
|
int |
trainingThreads
Number of threads to use during training.
|
static java.lang.String |
UNKNOWN
Out-of-vocabulary token string.
|
boolean |
unlabeled
Train a labeled parser if labeled = true, and a unlabeled one otherwise.
|
int |
wordCutOff
Refuse to train on words which have a corpus frequency less than
this number.
|
Constructor and Description |
---|
Config(java.util.Properties properties) |
Modifier and Type | Method and Description |
---|---|
static Language |
getLanguage(java.lang.String languageStr)
Get the
Language
object corresponding to the given language string. |
void |
printParameters() |
public static final java.lang.String UNKNOWN
public static final java.lang.String ROOT
public static final java.lang.String NULL
public static final int NONEXIST
public static final java.lang.String SEPARATOR
public Language language
public int trainingThreads
public int wordCutOff
public double initRange
[-initRange, initRange]
.public int maxIter
public int batchSize
public double adaEps
public double adaAlpha
public double regParameter
public double dropProb
public int hiddenSize
public int embeddingSize
public static final int numTokens
public int numPreComputed
public int numCached
public int evalPerIter
evalPerIter
iterations.public int clearGradientsPerIter
clearGradientsPerIter
iterations. (If zero, never clear
gradients.)public boolean saveIntermediate
evalPerIter
.)public boolean unlabeled
public boolean cPOS
public boolean noPunc
public boolean doWordEmbeddingGradUpdate
public TreebankLanguagePack tlp
PennTreebankLanguagePack
will be
used.public java.lang.String sentenceDelimiter
public java.util.function.Function<java.util.List<HasWord>,java.util.List<HasWord>> escaper
Function<List<HasWord>, List<HasWord>>
).public java.lang.String tagger
MaxentTagger
.public boolean preTokenized