ActiveAnno

Web-based responsive document annotation tool

View the Project on GitHub MaxMello/ActiveAnno

activeannoservice / document.annotation

Package document.annotation

Types

Name Summary
Annotation Base class for any annotation. An Annotation is defined as the actual value associated with an AnnotationDefinition. For example, a BooleanAnnotationDefinition will produce a single annotation of boolean type. This annotation might be created by a human annotator, or automatically generated or imported. Every Annotation needs to be associated with an annotation ID / key in a map or comparable structuresealed class Annotation<T : Target>
AnnotationMap typealias AnnotationMap = MutableMap<AnnotationID, Annotation<*>>
AnnotationResult Data class representing a single annotation result by either an annotator, a curator or a merge of annotator responses by the policy logic.data class AnnotationResult
AnnotationResultCreator The AnnotationResultCreator represents by whom an AnnotationResult was created, which can be by humans (Annotator, Curator), a machine Generators, externally Import or through consensus of all the previous Consensus.sealed class AnnotationResultCreator
AnnotationResultID typealias AnnotationResultID = String
DocumentTargetAnnotation An annotation which is targeted on the whole document, not a specific part of it. For example, a class label “SPAM” or “NO SPAM” for the whole document.data class DocumentTargetAnnotation : Annotation<DocumentTarget>
ExportStatistics Data class holding information about where and how often the annotations were exported.data class ExportStatistics
FinalizedAnnotationResult Data class representing a finalized annotation, which can be one or multiple annotations (referenced by their IDs). It also contains meta data about why the document was finalized, which policy was used, when the finalization happened, and statistics about how the annotations were exported.data class FinalizedAnnotationResult
FinalizedReason Sealed class with two options why a annotation can be finalizedsealed class FinalizedReason
GeneratedAnnotationData When a Project has any AnnotationGenerator defined through the AnnotationSchema, they will store their results here. Every time annotation generation is triggered, every generator will be executed again and a new instance of this class will be added to the ProjectAnnotationDatadata class GeneratedAnnotationData
InteractionLog Data class representing log data from the interaction of the user with the document during annotation.data class InteractionLog
RestCall Information about an export via rest call, mainly the route called, how often, and when.data class RestCall
Span A span is a single piece of a string, expressed by begin and end.data class Span
SpanTargetAnnotation All annotation values for a single AnnotationDefinition on a span target are represented by a SpanTargetAnnotation. For example, a document might have spans of positive and negative sentiment. All annotations regarding sentiment would be stored in a single SpanTargetAnnotation, holding a list of annotations of which each defines the spans concering the annotation as well as the actual value, in this case POSITIVE or NEGATIVE sentiment.data class SpanTargetAnnotation : Annotation<SpanTarget>
SpanTargetSingleAnnotation A SpanTargetSingleAnnotation maps a single annotation value to the spans (often only a single span) which the annotation value is associated with.data class SpanTargetSingleAnnotation
ValueToProbability In some contexts, a value might have an associated probability. This is the case when annotations are imported or generated with a probability of how likely this annotation has the value.data class ValueToProbability
WebHookExport Information about a web hook export, containing the export URL, how often it was tries, if it was successful, and possible failure logs for debugging purposes (for example when the web hook returns a 401 unauthorized etc.)data class WebHookExport

Functions

Name Summary
buildAnnotationResult Build an AnnotationResult from an GeneratedAnnotationData, transforming the annotations based on the AnnotationDefinitions transformGeneratedAnnotation methodfun GeneratedAnnotationData.buildAnnotationResult(document: Document, projectID: String, annotationSchema: DenormalizedAnnotationSchema): AnnotationResult