Web-based responsive document annotation tool
activeannoservice / annotationdefinition.generator / UpdatableAnnotationGenerator
abstract class UpdatableAnnotationGenerator :
AnnotationGenerator
Base class for AnnotationGenerators which are updatable, for example ML models, as compared to static models like a statistics based generator
Name | Summary |
---|---|
<init> | Base class for AnnotationGenerators which are updatable, for example ML models, as compared to static models like a statistics based generatorUpdatableAnnotationGenerator(id: String , annotationDefinitionID: String , targetType: TargetType , name: String , description: String , input: AnnotationStepKey , finalizeCondition: FinalizeCondition , startThreshold: Int , updateThreshold: Int , dataFilter: FilterCondition , versions: MutableList < UpdatableAnnotationGeneratorVersion > = mutableListOf(), createdTimestamp: Long = System.currentTimeMillis()) |
Name | Summary |
---|---|
dataFilter | How to select the data for updating of this generator. Will be combined with a filter of existing finalized annotation results for the related annotation of this generatorvar dataFilter: FilterCondition |
startThreshold | How many samples are required minimum to start training / updating / predicting.var startThreshold: Int |
updateThreshold | How many new samples are required compared to the previous version to updatevar updateThreshold: Int |
versions | var versions: MutableList < UpdatableAnnotationGeneratorVersion > |
Name | Summary |
---|---|
optimize | Optionally, subclasses can implement optimize to optimize e.g. hyperparameters of a ML modelopen suspend fun optimize(data: Map < Document , List < AnnotationResult >>): Unit |
update | Implement this for updating the annotation generator given the versionabstract suspend fun update(version: UpdatableAnnotationGeneratorVersion , data: Map < Document , List < AnnotationResult >>): Unit |
updateModel | Call this to update the mutable fields of an AnnotationGeneratoropen fun updateModel(newAnnotationGenerator: AnnotationGenerator ): Unit |
Name | Summary |
---|---|
TagSetDocumentTargetUpdatableGeneratorModel | Generic updatable AnnotationGenerator for TagSetAnnotationDefinition and DocumentTarget.class TagSetDocumentTargetUpdatableGeneratorModel : UpdatableAnnotationGenerator |