public class StatisticalSequenceLabeler extends Object
| Constructor and Description |
|---|
StatisticalSequenceLabeler(Properties props)
Construct a probabilistic sequence labeler.
|
StatisticalSequenceLabeler(Properties props,
SequenceLabelFactory aSeqFactory)
Construct a StatisticalSequenceLabeler specifying the factory to be used.
|
StatisticalSequenceLabeler(String model,
String lang)
Construct a StatisticalSequenceLabeler specifying the model to be used.
|
StatisticalSequenceLabeler(String model,
String lang,
SequenceLabelFactory aSeqFactory)
Construct a StatisticalSequenceLabeler specifying the model and the factory
to be used.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clearAdaptiveData()
Forgets all adaptive data which was collected during previous calls to one
of the find methods.
|
Span[][] |
getAllTags(String[] tokens)
Produces a multidimensional array containing all the taggings possible for
a given sentence.
|
List<SequenceLabel> |
getLemmaSequences(String[] tokens) |
List<SequenceLabel> |
getLemmaSequencesFromSpans(String[] tokens,
Span[] seqSpans) |
com.google.common.collect.ListMultimap<String,String> |
getMultipleLemmas(String[] tokens,
Span[][] posTags)
Takes a sentence with multiple tags alternatives for each word and produces
a lemma for each of the word-tag combinations.
|
List<SequenceLabel> |
getSequences(String[] tokens)
Produce a list of the
SequenceLabel objects classified by the
probabilistic model. |
List<SequenceLabel> |
getSequencesFromSpans(String[] tokens,
Span[] seqSpans)
Creates a list of
SequenceLabel objects from spans and tokens. |
Span[] |
lemmatizeToSpans(String[] tokens) |
Span[] |
seqToSpans(String[] tokens)
Get array of Spans from a list of tokens.
|
String[] |
seqToStrings(String[] tokens) |
public StatisticalSequenceLabeler(Properties props)
props - the properties to be loadedpublic StatisticalSequenceLabeler(String model, String lang)
model - the specific model to be used.lang - the languagepublic StatisticalSequenceLabeler(Properties props, SequenceLabelFactory aSeqFactory)
props - the propertiesaSeqFactory - the name factory to construct Name objectspublic StatisticalSequenceLabeler(String model, String lang, SequenceLabelFactory aSeqFactory)
model - the specific model to be used.lang - the languageaSeqFactory - the factorypublic final Span[] seqToSpans(String[] tokens)
tokens - the sentence tokenspublic final List<SequenceLabel> getSequences(String[] tokens)
SequenceLabel objects classified by the
probabilistic model.
Takes an array of tokens, calls seqToSpans function for probabilistic
Sequence Labeling and returns a List of SequenceLabel objects
containing the string, the type and the Span.tokens - an array of tokenized textpublic final List<SequenceLabel> getLemmaSequences(String[] tokens)
public final List<SequenceLabel> getSequencesFromSpans(String[] tokens, Span[] seqSpans)
SequenceLabel objects from spans and tokens.seqSpans - the sequence spans of a sentencetokens - the tokens in the sentenceSequenceLabel objectspublic final List<SequenceLabel> getLemmaSequencesFromSpans(String[] tokens, Span[] seqSpans)
public final Span[][] getAllTags(String[] tokens)
tokens - the tokenspublic com.google.common.collect.ListMultimap<String,String> getMultipleLemmas(String[] tokens, Span[][] posTags)
tokens - the sentence tokensposTags - the alternative postagspublic final void clearAdaptiveData()
Copyright © 2017 IXA pipes. All rights reserved.