Package com.gengoai.hermes.extraction
Class TermExtractor
- java.lang.Object
-
- com.gengoai.apollo.ml.feature.Featurizer<HString>
-
- com.gengoai.hermes.extraction.FeaturizingExtractor
-
- com.gengoai.hermes.extraction.MultiPhaseExtractor
-
- com.gengoai.hermes.extraction.TermExtractor
-
- All Implemented Interfaces:
FeatureExtractor<HString>
,ObservationExtractor<HString>
,Copyable<FeaturizingExtractor>
,Extractor
,Serializable
public class TermExtractor extends MultiPhaseExtractor
Implementation of theMultiPhaseExtractor
for extracting terms where a term is a single annotation (TOKEN by default).- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
TermExtractor.Builder
Builder Class for constructingTermExtractor
-
Nested classes/interfaces inherited from class com.gengoai.hermes.extraction.MultiPhaseExtractor
MultiPhaseExtractor.MultiPhaseExtractorBuilder<T extends MultiPhaseExtractor,V extends MultiPhaseExtractor.MultiPhaseExtractorBuilder<T,V>>
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static TermExtractor.Builder
builder()
protected Stream<HString>
createStream(HString hString)
Creates a stream of extractions from the given inputTermExtractor.Builder
toBuilder()
Converts the Extractor into a builder.-
Methods inherited from class com.gengoai.hermes.extraction.MultiPhaseExtractor
applyAsFeatures, copy, extract, toString
-
Methods inherited from class com.gengoai.apollo.ml.feature.Featurizer
booleanFeaturizer, chain, chain, countFeaturizer, extractObservation, multiValueFeaturizer, predicateFeaturizer, realFeaturizer, valueFeaturizer, valueFeaturizer, withContext, withContext
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.gengoai.apollo.ml.feature.FeatureExtractor
contextualize, extractSequence
-
-
-
-
Method Detail
-
builder
public static TermExtractor.Builder builder()
- Returns:
- A term extractor builder
-
createStream
protected Stream<HString> createStream(HString hString)
Description copied from class:MultiPhaseExtractor
Creates a stream of extractions from the given input- Specified by:
createStream
in classMultiPhaseExtractor
- Parameters:
hString
- the input text- Returns:
- the stream of extractions
-
toBuilder
public TermExtractor.Builder toBuilder()
Description copied from class:MultiPhaseExtractor
Converts the Extractor into a builder.- Specified by:
toBuilder
in classMultiPhaseExtractor
- Returns:
- the builder initialized with values from this extractor
-
-