ActiveAnno

Web-based responsive document annotation tool

View the Project on GitHub MaxMello/ActiveAnno

activeannoservice / annotationdefinition.generator.documenttarget / TagSetDocumentTargetUpdatableGeneratorModel

TagSetDocumentTargetUpdatableGeneratorModel

class TagSetDocumentTargetUpdatableGeneratorModel : UpdatableAnnotationGenerator

Generic updatable AnnotationGenerator for TagSetAnnotationDefinition and DocumentTarget.

Constructors

Name Summary
<init> Generic updatable AnnotationGenerator for TagSetAnnotationDefinition and DocumentTarget.TagSetDocumentTargetUpdatableGeneratorModel(id: String, annotationDefinitionID: String, name: String, description: String, predictUrl: String, updateUrl: String, optimizeUrl: String? = null, httpAuthentication: HttpAuthentication = HttpAuthentication.None, testSize: Double = 0.0, startThreshold: Int, updateThreshold: Int, dataFilter: FilterCondition, versions: MutableList<UpdatableAnnotationGeneratorVersion> = mutableListOf(), input: AnnotationStepKey, finalizeCondition: FinalizeCondition = FinalizeCondition.Always, createdTimestamp: Long = System.currentTimeMillis())

Properties

Name Summary
httpAuthentication var httpAuthentication: HttpAuthentication
optimizeUrl Url to call for optimizing a model, e.g. hyperparameter tuningvar optimizeUrl: String?
predictUrl Url to get predictions fromvar predictUrl: String
testSize var testSize: Double
updateUrl Url to call for updating the modelvar updateUrl: String

Functions

Name Summary
generateAnnotation suspend fun generateAnnotation(document: Document, generatedAnnotationData: GeneratedAnnotationData): DocumentTargetAnnotation
generateAnnotationBulk Open function to generate annotations in bulk, might be more efficient. By default, just iterates through documentsWithGeneratedAnnotationData and calls generateAnnotation for each. Can be overwritten to implement true bulk behavior.suspend fun generateAnnotationBulk(documentsWithGeneratedAnnotationData: List<Pair<Document, GeneratedAnnotationData>>): Map<Document, DocumentTargetAnnotation>
optimize Optionally, subclasses can implement optimize to optimize e.g. hyperparameters of a ML modelsuspend fun optimize(data: Map<Document, List<AnnotationResult>>): Unit
update Implement this for updating the annotation generator given the versionsuspend fun update(version: UpdatableAnnotationGeneratorVersion, data: Map<Document, List<AnnotationResult>>): Unit
updateModel Call this to update the mutable fields of an AnnotationGeneratorfun updateModel(newAnnotationGenerator: AnnotationGenerator): Unit