edu.cmu.minorthird.ui
Class Recommended.TokenPropUsingFE

java.lang.Object
  extended by edu.cmu.minorthird.text.learn.SpanFE
      extended by edu.cmu.minorthird.ui.Recommended.TokenPropUsingFE
All Implemented Interfaces:
MixupCompatible, SpanFeatureExtractor, java.io.Serializable
Direct Known Subclasses:
Recommended.DocumentFE, Recommended.HMMTokenFE, Recommended.TokenFE
Enclosing class:
Recommended

public abstract static class Recommended.TokenPropUsingFE
extends SpanFE
implements java.io.Serializable

A simple bag-of-words feature extractor, with words being put in lower case.

See Also:
Serialized Form

Nested Class Summary
 
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
protected  java.lang.String[] 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.TokenPropUsingFE()
           
 
Method Summary
 java.lang.String getTokenPropertyFeatures()
           
protected  void setMyTokenPropertyList(TextLabels labels)
           
 void setRequiredAnnotation(java.lang.String requiredAnnotation, java.lang.String annotationProvider)
          tokenProperties depends on the requiredAnnotation, so override default setRequiredAnnotation() method to reset the tokenPropertyFeatures to null when this changes.
 void setTokenPropertyFeatures(java.util.Set propertySet)
          Specify the token properties from the TextLabels environment that will be used as features.
 void setTokenPropertyFeatures(java.lang.String commaSeparatedTokenPropertyList)
          Specify the token properties from the TextLabels environment that will be used as features.
 
Methods inherited from class edu.cmu.minorthird.text.learn.SpanFE
emit, emit, emit, emit, extractFeatures, 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
 

Field Detail

tokenPropertyFeatures

protected java.lang.String[] tokenPropertyFeatures
Constructor Detail

Recommended.TokenPropUsingFE

public Recommended.TokenPropUsingFE()
Method Detail

setRequiredAnnotation

public void setRequiredAnnotation(java.lang.String requiredAnnotation,
                                  java.lang.String annotationProvider)
tokenProperties depends on the requiredAnnotation, so override default setRequiredAnnotation() method to reset the tokenPropertyFeatures to null when this changes.

Overrides:
setRequiredAnnotation in class SpanFE

setTokenPropertyFeatures

public void setTokenPropertyFeatures(java.lang.String commaSeparatedTokenPropertyList)
Specify the token properties from the TextLabels environment that will be used as features. A value of '*' or null means to use all defined token properties.


getTokenPropertyFeatures

public java.lang.String getTokenPropertyFeatures()

setTokenPropertyFeatures

public void setTokenPropertyFeatures(java.util.Set propertySet)
Specify the token properties from the TextLabels environment that will be used as features.


setMyTokenPropertyList

protected void setMyTokenPropertyList(TextLabels labels)