Package com.gengoai.hermes.ml
Class POSTagger
- java.lang.Object
-
- com.gengoai.hermes.ml.BaseHStringMLModel
-
- com.gengoai.hermes.ml.POSTagger
-
- All Implemented Interfaces:
Model
,Transform
,Copyable<Transform>
,SerializableFunction<HString,HString>
,HStringMLModel
,Serializable
,Function<HString,HString>
- Direct Known Subclasses:
ENPOSTagger
public class POSTagger extends BaseHStringMLModel
A
HStringMLModel
for assigningPartOfSpeech
to tokens.- Author:
- David B. Bracewell
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description POSTagger(@NonNull HStringDataSetGenerator inputGenerator, @NonNull Model labeler)
Instantiates a new POSTagger.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
onEstimate(HString sentence, Datum result)
On estimate.-
Methods inherited from class com.gengoai.hermes.ml.BaseHStringMLModel
apply, delegate
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.gengoai.hermes.ml.HStringMLModel
estimate, estimate, getDataGenerator, getEvaluator, getFitParameters, getInputs, getLabelType, getOutput, getOutputs, getVersion, setVersion, transform, transform, transform, transform
-
Methods inherited from interface com.gengoai.apollo.ml.model.Model
copy, fitAndTransform, getLabelType, save
-
Methods inherited from interface com.gengoai.function.SerializableFunction
andThen, asConsumer, compose
-
-
-
-
Constructor Detail
-
POSTagger
public POSTagger(@NonNull @NonNull HStringDataSetGenerator inputGenerator, @NonNull @NonNull Model labeler)
Instantiates a new POSTagger.- Parameters:
inputGenerator
- the generator to convert HString into input for the modellabeler
- the model to use to perform the part-of-speech tagging
-
-
Method Detail
-
onEstimate
protected void onEstimate(HString sentence, Datum result)
Description copied from class:BaseHStringMLModel
On estimate.- Specified by:
onEstimate
in classBaseHStringMLModel
- Parameters:
sentence
- the h stringresult
- the datum
-
-