| Package | Description |
|---|---|
| eus.ixa.ixa.pipe.ml |
Package containing common code for training and evaluating IXA pipes models.
|
| eus.ixa.ixa.pipe.ml.formats |
Classes to directly train NERC models from a variety of corpus formats.
|
| eus.ixa.ixa.pipe.ml.parse |
Package containing the Parser classes.
|
| Modifier and Type | Method and Description |
|---|---|
static opennlp.tools.util.ObjectStream<Parse> |
ShiftReduceParserTrainer.getParseStream(String inputData)
Getting the stream with the right corpus format.
|
| Constructor and Description |
|---|
ParseToCoNLL02Format(opennlp.tools.util.ObjectStream<Parse> in) |
ParseToTabulatedFormat(opennlp.tools.util.ObjectStream<Parse> in) |
| Modifier and Type | Method and Description |
|---|---|
Parse |
Parse.adjoin(Parse sister,
HeadRules rules)
Sister adjoins this node's last child and the specified sister node and returns their
new parent node.
|
Parse |
Parse.adjoinRoot(Parse node,
HeadRules rules,
int parseIndex) |
protected Parse[] |
ShiftReduceParser.advanceChunks(Parse p,
double minChunkScore)
Returns the top chunk sequences for the specified parse.
|
protected Parse[] |
ShiftReduceParser.advanceTags(Parse p)
Advances the parse by assigning it POS tags and returns multiple tag sequences.
|
Parse |
Parse.clone(Parse node)
Clones the right frontier of parse up to the specified node.
|
Parse |
Parse.cloneRoot(Parse node,
int parseIndex)
Clones the right frontier of this root parse up to and including the specified node.
|
static Parse[] |
ShiftReduceParser.collapsePunctuation(Parse[] chunks,
Set<String> punctSet)
Removes the punctuation from the specified set of chunks, adds it to the parses
adjacent to the punctuation is specified, and returns a new array of parses with the punctuation
removed.
|
Parse[] |
Parse.getChildren()
Returns the child constituents of this constituent
.
|
Parse |
Parse.getCommonParent(Parse node)
Returns the deepest shared parent of this node and the specified node.
|
Parse |
Parse.getHead()
Returns the head constituent associated with this constituent.
|
Parse |
PennTreebankHeadRules.getHead(Parse[] constituents,
String type) |
Parse |
HeadRules.getHead(Parse[] constituents,
String type)
Returns the head constituent for the specified constituents of the specified type.
|
Parse |
AncoraHeadRules.getHead(Parse[] constituents,
String type) |
static Parse[] |
AbstractParserEventStream.getInitialChunks(Parse p) |
static Parse[] |
ParserEventStream.getInitialChunks(Parse p) |
Parse |
Parse.getParent()
Returns the parent parse node of this constituent.
|
Parse[] |
Parse.getTagNodes()
Returns the parse nodes which are children of this node and which are pos tags.
|
Parse |
ShiftReduceParser.parse(Parse tokens) |
Parse[] |
ShiftReduceParser.parse(Parse tokens,
int numParses) |
static Parse[] |
ShiftReduceParser.parseLine(String line,
ShiftReduceParser parser,
int numParses) |
static Parse |
Parse.parseParse(String parse)
Parses the specified tree-bank style parse string and return a Parse structure for that string.
|
static Parse |
Parse.parseParse(String parse,
GapLabeler gl)
Parses the specified tree-bank style parse string and return a Parse structure
for that string.
|
protected Parse |
ParserEvaluator.processSample(Parse reference) |
Parse |
ParseSampleStream.read() |
static Parse[] |
ParserEventStream.reduceChunks(Parse[] chunks,
int ci,
Parse parent) |
| Modifier and Type | Method and Description |
|---|---|
Collection<Parse> |
Parse.getNextPunctuationSet()
Returns the set of punctuation parses that occur immediately after this parse.
|
Collection<Parse> |
Parse.getPreviousPunctuationSet()
Returns the set of punctuation parses that occur immediately before this parse.
|
| Modifier and Type | Method and Description |
|---|---|
void |
Parse.add(Parse daughter,
HeadRules rules) |
static void |
Parse.addNames(String tag,
Span[] names,
Parse[] tokens)
Utility method to inserts named entities.
|
void |
Parse.addNextPunctuation(Parse punct)
Designates that the specified punctuation follows this parse.
|
protected abstract void |
AbstractParserEventStream.addParseEvents(List<opennlp.tools.ml.model.Event> newEvents,
Parse[] chunks)
Produces all events for the specified sentence chunks
and adds them to the specified list.
|
void |
Parse.addPreviousPunctuation(Parse punct)
Designates that the specified punctuation should is prior to this parse.
|
Parse |
Parse.adjoin(Parse sister,
HeadRules rules)
Sister adjoins this node's last child and the specified sister node and returns their
new parent node.
|
Parse |
Parse.adjoinRoot(Parse node,
HeadRules rules,
int parseIndex) |
protected Parse[] |
ShiftReduceParser.advanceChunks(Parse p,
double minChunkScore)
Returns the top chunk sequences for the specified parse.
|
protected Parse[] |
ShiftReduceParser.advanceTags(Parse p)
Advances the parse by assigning it POS tags and returns multiple tag sequences.
|
protected void |
AbstractContextGenerator.checkcons(Parse p1,
Parse p2,
String type,
List<String> features) |
protected void |
AbstractContextGenerator.checkcons(Parse child,
String i,
String type,
List<String> features)
Produces features to determine whether the specified child node is part of
a complete constituent of the specified type and adds those features to the
specfied list.
|
Parse |
Parse.clone(Parse node)
Clones the right frontier of parse up to the specified node.
|
Parse |
Parse.cloneRoot(Parse node,
int parseIndex)
Clones the right frontier of this root parse up to and including the specified node.
|
static Parse[] |
ShiftReduceParser.collapsePunctuation(Parse[] chunks,
Set<String> punctSet)
Removes the punctuation from the specified set of chunks, adds it to the parses
adjacent to the punctuation is specified, and returns a new array of parses with the punctuation
removed.
|
int |
Parse.compareTo(Parse p) |
protected String |
AbstractContextGenerator.cons(Parse p,
int i) |
protected String |
AbstractContextGenerator.consbo(Parse p,
int i) |
protected Iterator<opennlp.tools.ml.model.Event> |
AbstractParserEventStream.createEvents(Parse sample) |
protected Iterator<opennlp.tools.ml.model.Event> |
ParserEventStream.createEvents(Parse sample) |
void |
Parse.expandTopNode(Parse root) |
protected boolean |
ParserEventStream.firstChild(Parse child,
Parse parent)
Returns true if the specified child is the first child of the specified
parent.
|
static void |
Parse.fixPossesives(Parse parse) |
Parse |
Parse.getCommonParent(Parse node)
Returns the deepest shared parent of this node and the specified node.
|
String[] |
BuildContextGenerator.getContext(Parse[] constituents,
int index)
Returns the predictive context used to determine how constituent at the specified index
should be combined with other contisuents.
|
String[] |
CheckContextGenerator.getContext(Parse[] constituents,
String type,
int start,
int end)
Returns predictive context for deciding whether the specified constituents between the specified start and end index
can be combined to form a new constituent of the specified type.
|
protected void |
AbstractContextGenerator.getFrontierNodes(List<Parse> rf,
Parse[] nodes)
Populates specified nodes array with left-most right frontier
node with a unique head.
|
Parse |
PennTreebankHeadRules.getHead(Parse[] constituents,
String type) |
Parse |
HeadRules.getHead(Parse[] constituents,
String type)
Returns the head constituent for the specified constituents of the specified type.
|
Parse |
AncoraHeadRules.getHead(Parse[] constituents,
String type) |
static Parse[] |
AbstractParserEventStream.getInitialChunks(Parse p) |
static Parse[] |
ParserEventStream.getInitialChunks(Parse p) |
int |
Parse.indexOf(Parse child)
Returns the index of this specified child.
|
void |
Parse.insert(Parse constituent)
Inserts the specified constituent into this parse based on its text span.This
method assumes that the specified constituent can be inserted into this parse.
|
protected boolean |
AbstractParserEventStream.lastChild(Parse child,
Parse parent)
Returns true if the specified child is the last child of the specified parent.
|
protected boolean |
ParserEventStream.lastChild(Parse child,
Parse parent)
Returns true if the specified child is the last child of the specified parent.
|
Parse |
ShiftReduceParser.parse(Parse tokens) |
Parse[] |
ShiftReduceParser.parse(Parse tokens,
int numParses) |
void |
HeadFinder.printHeads(Parse parse)
Reads a Parse object and adds the heads for each constituent following some
head rules.
|
void |
CollinsHeadFinder.printHeads(Parse parse) |
protected Parse |
ParserEvaluator.processSample(Parse reference) |
protected String |
AbstractContextGenerator.production(Parse p,
boolean includePunctuation)
Generates a string representing the grammar rule production that the specified parse
is starting.
|
static void |
Parse.pruneParse(Parse parse)
Prune the specified sentence parse of vacuous productions.
|
protected String |
AbstractContextGenerator.punct(Parse punct,
int i)
Creates punctuation feature for the specified punctuation at the specified index based on the punctuation mark.
|
protected String |
AbstractContextGenerator.punctbo(Parse punct,
int i)
Creates punctuation feature for the specified punctuation at the specfied index based on the punctuation's tag.
|
static Parse[] |
ParserEventStream.reduceChunks(Parse[] chunks,
int ci,
Parse parent) |
static Parse[] |
ParserEventStream.reduceChunks(Parse[] chunks,
int ci,
Parse parent) |
void |
Parse.setParent(Parse parent)
Specifies the parent parse node for this constituent.
|
static void |
ShiftReduceParser.setParents(Parse p)
Assigns parent references for the specified parse so that they
are consistent with the children references.
|
protected void |
AbstractContextGenerator.surround(Parse node,
int i,
String type,
Collection<Parse> punctuation,
List<String> features)
Generates features for nodes surrounding a completed node of the specified type.
|
| Modifier and Type | Method and Description |
|---|---|
static opennlp.tools.dictionary.Dictionary |
ShiftReduceParser.buildDictionary(opennlp.tools.util.ObjectStream<Parse> data,
HeadRules rules,
int cutoff)
Creates a n-gram dictionary from the specified data stream using the specified head rule and specified cut-off.
|
static opennlp.tools.dictionary.Dictionary |
ShiftReduceParser.buildDictionary(opennlp.tools.util.ObjectStream<Parse> data,
HeadRules rules,
opennlp.tools.util.TrainingParameters params)
Creates a n-gram dictionary from the specified data stream using the specified head rule and specified cut-off.
|
protected void |
AbstractContextGenerator.cons2(List<String> features,
Cons c0,
Cons c1,
Collection<Parse> punct1s,
boolean bigram) |
protected void |
AbstractContextGenerator.cons3(List<String> features,
Cons c0,
Cons c1,
Cons c2,
Collection<Parse> punct1s,
Collection<Parse> punct2s,
boolean trigram,
boolean bigram1,
boolean bigram2)
Creates cons features involving the 3 specified nodes and adds them to the specified feature list.
|
protected void |
AbstractContextGenerator.cons3(List<String> features,
Cons c0,
Cons c1,
Cons c2,
Collection<Parse> punct1s,
Collection<Parse> punct2s,
boolean trigram,
boolean bigram1,
boolean bigram2)
Creates cons features involving the 3 specified nodes and adds them to the specified feature list.
|
protected void |
AbstractContextGenerator.getFrontierNodes(List<Parse> rf,
Parse[] nodes)
Populates specified nodes array with left-most right frontier
node with a unique head.
|
void |
Parse.setNextPunctuation(Collection<Parse> punctSet)
Sets the set of punctuation tags which follow this parse.
|
void |
Parse.setPrevPunctuation(Collection<Parse> punctSet)
Sets the set of punctuation tags which preceed this parse.
|
protected void |
AbstractContextGenerator.surround(Parse node,
int i,
String type,
Collection<Parse> punctuation,
List<String> features)
Generates features for nodes surrounding a completed node of the specified type.
|
static ParserModel |
ShiftReduceParser.train(String languageCode,
opennlp.tools.util.ObjectStream<Parse> parseSamples,
HeadRules rules,
opennlp.tools.util.TrainingParameters trainParams,
ParserFactory parserFactory,
SequenceLabelerModel posModel,
opennlp.tools.util.TrainingParameters chunkerParams,
SequenceLabelerFactory chunkerFactory) |
static ParserModel |
ShiftReduceParser.train(String languageCode,
opennlp.tools.util.ObjectStream<Parse> parseSamples,
HeadRules rules,
opennlp.tools.util.TrainingParameters trainParams,
ParserFactory parserFactory,
opennlp.tools.util.TrainingParameters taggerParams,
SequenceLabelerFactory taggerFactory,
opennlp.tools.util.TrainingParameters chunkerParams,
SequenceLabelerFactory chunkerFactory) |
| Constructor and Description |
|---|
Parse(String text,
Span span,
String type,
double p,
Parse h)
Creates a new parse node for this specified text and span of the specified type with the specified probability
and the specified head and head index.
|
| Constructor and Description |
|---|
AbstractParserEventStream(opennlp.tools.util.ObjectStream<Parse> dataStream,
HeadRules rules,
opennlp.tools.parser.ParserEventTypeEnum etype) |
ParserEventStream(opennlp.tools.util.ObjectStream<Parse> d,
HeadRules rules,
opennlp.tools.parser.ParserEventTypeEnum etype) |
ParserEventStream(opennlp.tools.util.ObjectStream<Parse> samples,
HeadRules rules,
opennlp.tools.parser.ParserEventTypeEnum etype,
ParserFactory factory) |
Copyright © 2016 IXA pipes. All rights reserved.