edu.cmu.minorthird.text.learn
Class ConditionalSemiMarkovModel.CSMMWithDictionarySpanFE

java.lang.Object
  extended by edu.cmu.minorthird.text.learn.SpanFE
      extended by edu.cmu.minorthird.text.learn.SampleFE.AnnotatedSpanFE
          extended by edu.cmu.minorthird.text.learn.SampleFE.ExtractionFE
              extended by edu.cmu.minorthird.text.learn.ConditionalSemiMarkovModel.CSMMSpanFE
                  extended by edu.cmu.minorthird.text.learn.ConditionalSemiMarkovModel.CSMMWithDictionarySpanFE
All Implemented Interfaces:
MixupCompatible, SpanFeatureExtractor, java.io.Serializable
Enclosing class:
ConditionalSemiMarkovModel

public static class ConditionalSemiMarkovModel.CSMMWithDictionarySpanFE
extends ConditionalSemiMarkovModel.CSMMSpanFE

Feature extractor for providing distance-based features on terms. Dictionary can be specified either as an external file or by using the training spans. - Sunita Sarawagi

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
 
Fields inherited from class edu.cmu.minorthird.text.learn.SampleFE.ExtractionFE
tokenPropertyFeatures, useCharType, useCompressedCharType, windowSize
 
Fields inherited from class edu.cmu.minorthird.text.learn.SpanFE
annotatorLoader, instance, requiredAnnotation, requiredAnnotationFileToLoad, STORE_AS_BINARY, STORE_AS_COUNTS, STORE_COMPACTLY
 
Constructor Summary
ConditionalSemiMarkovModel.CSMMWithDictionarySpanFE(java.lang.String dictionaryFile, java.lang.String distanceNames)
           
ConditionalSemiMarkovModel.CSMMWithDictionarySpanFE(java.lang.String dictionaryFile, java.lang.String distanceNames, boolean addTraining, boolean useCrossValArg)
           
 
Method Summary
 void extractFeatures(TextLabels labels, Span span)
          Implement this with a specific set of SpanFE 'pipelines'.
 void train(java.util.Iterator<AnnotationExample> iter)
           
 void trainDistances()
           
 
Methods inherited from class edu.cmu.minorthird.text.learn.ConditionalSemiMarkovModel.CSMMSpanFE
extractFeatures
 
Methods inherited from class edu.cmu.minorthird.text.learn.SampleFE.ExtractionFE
getFeatureWindowSize, getTokenPropertyFeatures, getUseCharType, getUseCompressedCharType, setFeatureWindowSize, setTokenPropertyFeatures, setTokenPropertyFeatures, setUseCharType, setUseCompressedCharType
 
Methods inherited from class edu.cmu.minorthird.text.learn.SpanFE
emit, emit, emit, emit, extractInstance, extractInstance, from, from, getAnnotationProvider, getRequiredAnnotation, requireMyAnnotation, setAnnotationProvider, setAnnotatorLoader, setFeatureStoragePolicy, setRequiredAnnotation, setRequiredAnnotation, trace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConditionalSemiMarkovModel.CSMMWithDictionarySpanFE

public ConditionalSemiMarkovModel.CSMMWithDictionarySpanFE(java.lang.String dictionaryFile,
                                                           java.lang.String distanceNames)

ConditionalSemiMarkovModel.CSMMWithDictionarySpanFE

public ConditionalSemiMarkovModel.CSMMWithDictionarySpanFE(java.lang.String dictionaryFile,
                                                           java.lang.String distanceNames,
                                                           boolean addTraining,
                                                           boolean useCrossValArg)
Method Detail

trainDistances

public void trainDistances()

train

public void train(java.util.Iterator<AnnotationExample> iter)

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 ConditionalSemiMarkovModel.CSMMSpanFE