Package com.gengoai.hermes.ml
Class IOBTagger
- java.lang.Object
-
- com.gengoai.hermes.ml.BaseHStringMLModel
-
- com.gengoai.hermes.ml.IOBTagger
-
- All Implemented Interfaces:
Model
,Transform
,Copyable<Transform>
,SerializableFunction<HString,HString>
,HStringMLModel
,Serializable
,Function<HString,HString>
- Direct Known Subclasses:
EntityTagger
,PhraseChunkTagger
public class IOBTagger extends BaseHStringMLModel
Creates annotations based on the IOB tag output of an underlying model.
- Author:
- David B. Bracewell
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description IOBTagger(@NonNull HStringDataSetGenerator inputGenerator, @NonNull AnnotationType annotationType, @NonNull Model labeler)
Instantiates a new IOBTagger
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description HString
apply(@NonNull HString hString)
Evaluation
getEvaluator()
protected void
onEstimate(HString sentence, Datum datum)
On estimate.-
Methods inherited from class com.gengoai.hermes.ml.BaseHStringMLModel
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, 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
-
IOBTagger
public IOBTagger(@NonNull @NonNull HStringDataSetGenerator inputGenerator, @NonNull @NonNull AnnotationType annotationType, @NonNull @NonNull Model labeler)
Instantiates a new IOBTagger- Parameters:
inputGenerator
- the generator to convert HString into input for the modelannotationType
- the type of annotation to add during tagging.labeler
- the model to use to perform the IOB tagging
-
-
Method Detail
-
getEvaluator
public Evaluation getEvaluator()
-
onEstimate
protected void onEstimate(HString sentence, Datum datum)
Description copied from class:BaseHStringMLModel
On estimate.- Specified by:
onEstimate
in classBaseHStringMLModel
- Parameters:
sentence
- the h stringdatum
- the datum
-
-