public class ShiftReduceParserTrainer extends Object
| Constructor and Description |
|---|
ShiftReduceParserTrainer(opennlp.tools.util.TrainingParameters params,
opennlp.tools.util.TrainingParameters chunkerParams)
Construct a trainer with training and test data, and with options for
language, beamsize for decoding, sequence codec and corpus format (conll or
opennlp).
|
ShiftReduceParserTrainer(opennlp.tools.util.TrainingParameters params,
opennlp.tools.util.TrainingParameters taggerParams,
opennlp.tools.util.TrainingParameters chunkerParams)
Construct a trainer with training and test data, and with options for
language, beamsize for decoding, sequence codec and corpus format.
|
| Modifier and Type | Method and Description |
|---|---|
void |
createParserFactory(opennlp.tools.util.TrainingParameters params) |
SequenceLabelerFactory |
createSequenceLabelerFactory(opennlp.tools.util.TrainingParameters params) |
SequenceLabelerFactory |
getChunkerFactory()
Get the features which are implemented in each of the trainers extending
this class.
|
static HeadRules |
getHeadRules(opennlp.tools.util.TrainingParameters params) |
ParserFactory |
getParserFactory()
Get the features which are implemented in each of the trainers extending
this class.
|
static opennlp.tools.util.ObjectStream<Parse> |
getParseStream(String inputData)
Getting the stream with the right corpus format.
|
String |
getSequenceCodec()
Get the Sequence codec.
|
SequenceLabelerFactory |
getTaggerFactory()
Get the features which are implemented in each of the trainers extending
this class.
|
SequenceLabelerFactory |
setChunkerFactory(SequenceLabelerFactory tokenNameFinderFactory) |
ParserFactory |
setParserFactory(ParserFactory parserFactory) |
void |
setSequenceCodec(String aSeqCodec)
Set the sequence codec.
|
SequenceLabelerFactory |
setTaggerFactory(SequenceLabelerFactory tokenNameFinderFactory) |
ParserModel |
train(opennlp.tools.util.TrainingParameters params,
InputStream taggerModel,
opennlp.tools.util.TrainingParameters chunkerParams)
Train a parser model providing an already trained POS tagger.
|
ParserModel |
train(opennlp.tools.util.TrainingParameters params,
opennlp.tools.util.TrainingParameters taggerParams,
opennlp.tools.util.TrainingParameters chunkerParams)
Train a parser model from the Treebank data.
|
public ShiftReduceParserTrainer(opennlp.tools.util.TrainingParameters params,
opennlp.tools.util.TrainingParameters taggerParams,
opennlp.tools.util.TrainingParameters chunkerParams)
throws IOException
params - the training parameterstaggerParams - the tagger parameterschunkerParams - the chunker parametersIOException - io exceptionpublic ShiftReduceParserTrainer(opennlp.tools.util.TrainingParameters params,
opennlp.tools.util.TrainingParameters chunkerParams)
throws IOException
params - the training parameterschunkerParams - the chunker parametersIOException - io exceptionpublic void createParserFactory(opennlp.tools.util.TrainingParameters params)
throws IOException
IOExceptionpublic SequenceLabelerFactory createSequenceLabelerFactory(opennlp.tools.util.TrainingParameters params) throws IOException
IOExceptionpublic final ParserModel train(opennlp.tools.util.TrainingParameters params, opennlp.tools.util.TrainingParameters taggerParams, opennlp.tools.util.TrainingParameters chunkerParams)
params - the parser parameterstaggerParams - the pos tagger parameterschunkerParams - the chunker parameterspublic final ParserModel train(opennlp.tools.util.TrainingParameters params, InputStream taggerModel, opennlp.tools.util.TrainingParameters chunkerParams)
params - the parser parameterstaggerModel - the POS tagger modelchunkerParams - the chunker parameterspublic static opennlp.tools.util.ObjectStream<Parse> getParseStream(String inputData) throws IOException
inputData - the input dataIOException - the io exceptionpublic static HeadRules getHeadRules(opennlp.tools.util.TrainingParameters params) throws IOException
IOExceptionpublic final SequenceLabelerFactory getTaggerFactory()
public final SequenceLabelerFactory setTaggerFactory(SequenceLabelerFactory tokenNameFinderFactory)
public final SequenceLabelerFactory getChunkerFactory()
public final SequenceLabelerFactory setChunkerFactory(SequenceLabelerFactory tokenNameFinderFactory)
public final ParserFactory getParserFactory()
public final ParserFactory setParserFactory(ParserFactory parserFactory)
public final String getSequenceCodec()
public final void setSequenceCodec(String aSeqCodec)
aSeqCodec - the sequence codec to be setCopyright © 2017 IXA pipes. All rights reserved.