edu.cmu.minorthird.ui
Class Recommended.MultitokenSpanFE

java.lang.Object
  extended by edu.cmu.minorthird.text.learn.SpanFE
      extended by edu.cmu.minorthird.ui.Recommended.TokenPropUsingFE
          extended by edu.cmu.minorthird.ui.Recommended.TokenFE
              extended by 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

Nested Class Summary
 class Recommended.MultitokenSpanFE.MyCLP
           
 
Nested classes/interfaces inherited from class edu.cmu.minorthird.text.learn.SpanFE
SpanFE.Filter, SpanFE.Function, SpanFE.Result, SpanFE.SetResult<T>, SpanFE.SpanResult, SpanFE.SpanSetResult, SpanFE.StringBagResult, SpanFE.TokenSetResult
 
Field Summary
 
Fields inherited from class edu.cmu.minorthird.ui.Recommended.TokenFE
useCharType, useCharTypePattern, useTokenValues, windowSize
 
Fields inherited from class edu.cmu.minorthird.ui.Recommended.TokenPropUsingFE
tokenPropertyFeatures
 
Fields inherited from class edu.cmu.minorthird.text.learn.SpanFE
annotatorLoader, instance, requiredAnnotation, requiredAnnotationFileToLoad, STORE_AS_BINARY, STORE_AS_COUNTS, STORE_COMPACTLY
 
Constructor Summary
Recommended.MultitokenSpanFE()
           
 
Method Summary
 void extractFeatures(TextLabels labels, Span span)
          Implement this with a specific set of SpanFE 'pipelines'.
 CommandLineProcessor getCLP()
          Produce a command-line processor that configures this object.
 boolean getUseFirst()
           
 boolean getUseInternal()
           
 boolean getUseLast()
           
 boolean getUseLength()
           
 void setUseFirst(boolean flag)
          Generate features for the first token of the span.
 void setUseInternal(boolean flag)
          Generate features for the span itself
 void setUseLast(boolean flag)
          Generate features for the last token of the span.
 void setUseLength(boolean flag)
          Generate features for the length of the span.
 
Methods inherited from class edu.cmu.minorthird.ui.Recommended.TokenFE
getFeatureWindowSize, getUseCharType, getUseCharTypePattern, getUseTokenValues, setFeatureWindowSize, setUseCharType, setUseCharTypePattern, setUseTokenValues
 
Methods inherited from class edu.cmu.minorthird.ui.Recommended.TokenPropUsingFE
getTokenPropertyFeatures, setMyTokenPropertyList, setRequiredAnnotation, setTokenPropertyFeatures, setTokenPropertyFeatures
 
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
 

Constructor Detail

Recommended.MultitokenSpanFE

public Recommended.MultitokenSpanFE()
Method Detail

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