edu.cmu.minorthird.ui
Class Recommended.MultitokenSpanFE
java.lang.Object
edu.cmu.minorthird.text.learn.SpanFE
edu.cmu.minorthird.ui.Recommended.TokenPropUsingFE
edu.cmu.minorthird.ui.Recommended.TokenFE
edu.cmu.minorthird.ui.Recommended.MultitokenSpanFE
- All Implemented Interfaces:
- MixupCompatible, SpanFeatureExtractor, CommandLineProcessor.Configurable, java.io.Serializable
- Enclosing class:
- Recommended
public static class Recommended.MultitokenSpanFE
- extends Recommended.TokenFE
- implements CommandLineProcessor.Configurable, java.io.Serializable
An extraction-oriented feature extractor to apply to multi-token
spans. By default this extracts features for: the lower-case
version of the phrase inside that span; lexical properties of the
phrase; the length of the span; features for tokens in a small
window to either side of the phrase, analogous to those extracted
by TokenFE; features for the first and last tokens of the phrase,
analogous to those extracted by TokenFE.
- See Also:
- Serialized Form
Methods inherited from class edu.cmu.minorthird.text.learn.SpanFE |
emit, emit, emit, emit, extractFeatures, extractInstance, extractInstance, from, from, getAnnotationProvider, getRequiredAnnotation, requireMyAnnotation, setAnnotationProvider, setAnnotatorLoader, setFeatureStoragePolicy, setRequiredAnnotation, trace |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Recommended.MultitokenSpanFE
public Recommended.MultitokenSpanFE()
setUseFirst
public void setUseFirst(boolean flag)
- Generate features for the first token of the span.
getUseFirst
public boolean getUseFirst()
setUseLast
public void setUseLast(boolean flag)
- Generate features for the last token of the span.
getUseLast
public boolean getUseLast()
setUseLength
public void setUseLength(boolean flag)
- Generate features for the length of the span.
getUseLength
public boolean getUseLength()
setUseInternal
public void setUseInternal(boolean flag)
- Generate features for the span itself
getUseInternal
public boolean getUseInternal()
getCLP
public CommandLineProcessor getCLP()
- Description copied from interface:
CommandLineProcessor.Configurable
- Produce a command-line processor that configures this object.
- Specified by:
getCLP
in interface CommandLineProcessor.Configurable
- Overrides:
getCLP
in class Recommended.TokenFE
extractFeatures
public void extractFeatures(TextLabels labels,
Span span)
- Description copied from class:
SpanFE
- Implement this with a specific set of SpanFE 'pipelines'. Each pipeline
will typically start with 'start(span)' and end with 'emit()'.
- Overrides:
extractFeatures
in class Recommended.TokenFE