@Deprecated public class TextSliceExtractor extends Object implements org.cleartk.classifier.feature.extractor.simple.SimpleNamedFeatureExtractor
| Constructor and Description |
|---|
TextSliceExtractor(int start)
Deprecated.
Create an extractor for a slice of text from a single offset to the end of the string.
|
TextSliceExtractor(int start,
int stop)
Deprecated.
Create an extractor for a given slice of the text.
|
| Modifier and Type | Method and Description |
|---|---|
List<org.cleartk.classifier.Feature> |
extract(org.apache.uima.jcas.JCas view,
org.apache.uima.jcas.tcas.Annotation focusAnnotation)
Deprecated.
|
String |
getFeatureName()
Deprecated.
|
public TextSliceExtractor(int start,
int stop)
new TextSliceExtractor(1, -1) would extract all of the text but its first and last
characters.start - The first character offset of the slice. If negative, it is assumed to count backwards
from the end of the string. If the offset falls before the start of the string, the
start of the string will be used instead.stop - The last character offset of the slice. If negative, it is assumed to count backwards
from the end of the string. If the offset falls after the end of the string, the end
of the string will be used instead.public TextSliceExtractor(int start)
new TextSliceExtractor(-2) would extract a suffix of length 2 from the text.start - The first character offset of the slice. If negative, it is assumed to count backwards
from the end of the string. If the offset falls before the start of the string, the
start of the string will be used instead.public String getFeatureName()
getFeatureName in interface org.cleartk.classifier.feature.extractor.simple.SimpleNamedFeatureExtractorpublic List<org.cleartk.classifier.Feature> extract(org.apache.uima.jcas.JCas view, org.apache.uima.jcas.tcas.Annotation focusAnnotation)
extract in interface org.cleartk.classifier.feature.extractor.simple.SimpleFeatureExtractorCopyright © 2013. All Rights Reserved.