public class Parser extends Object implements Tool, Retrainable
| Modifier and Type | Field and Description |
|---|---|
Parse |
d |
Instances |
is |
Long2IntInterface |
l2i |
OptionsSuper |
options |
ParametersFloat |
params |
Pipe |
pipe |
static int |
THREADS |
| Constructor and Description |
|---|
Parser() |
Parser(OptionsSuper options)
Initialize the parser
|
Parser(String modelFileName) |
| Modifier and Type | Method and Description |
|---|---|
SentenceData09 |
apply(SentenceData09 snt09)
Uses the tool and applies it on the input sentence.
|
float[] |
getInfo()
Get the edge scores of the last parse.
|
static void |
main(String[] args) |
SentenceData09 |
parse(SentenceData09 instance,
ParametersFloat params,
boolean labelOnly,
OptionsSuper options)
Parse a single sentence
|
void |
readModel(OptionsSuper options,
Pipe pipe,
Parameters params)
Read the models and mapping
|
boolean |
retrain(SentenceData09 sentence,
float upd,
int iterations)
Retrains with a update factor (upd).
|
boolean |
retrain(SentenceData09 sentence,
float upd,
int iterations,
boolean print) |
void |
train(OptionsSuper options,
Pipe pipe,
ParametersFloat params,
Instances is,
Cluster cluster)
Do the training
|
public static int THREADS
public Long2IntInterface l2i
public ParametersFloat params
public Pipe pipe
public OptionsSuper options
public Instances is
public Parse d
public Parser(OptionsSuper options)
options - public Parser(String modelFileName)
modelFileName - The file name of the parsing modelpublic Parser()
public void readModel(OptionsSuper options, Pipe pipe, Parameters params) throws IOException
options - pipe - params - IOExceptionpublic void train(OptionsSuper options, Pipe pipe, ParametersFloat params, Instances is, Cluster cluster) throws IOException, InterruptedException, ClassNotFoundException
instanceLengths - options - pipe - params - is - cluster - IOExceptionInterruptedExceptionClassNotFoundExceptionpublic SentenceData09 parse(SentenceData09 instance, ParametersFloat params, boolean labelOnly, OptionsSuper options)
instance - params - labelOnly - options - public SentenceData09 apply(SentenceData09 snt09)
Toolpublic float[] getInfo()
public boolean retrain(SentenceData09 sentence, float upd, int iterations)
Retrainableretrain in interface Retrainablesentence - the data container of the new example.upd - the update factor, e.g. 0.01iterations - maximal number of iterations that are tried to adapt the system.public boolean retrain(SentenceData09 sentence, float upd, int iterations, boolean print)
retrain in interface RetrainableCopyright © 2013. All rights reserved.