Web-based responsive document annotation tool
activeannoservice / document.annotation / SpanTargetSingleAnnotation
data class SpanTargetSingleAnnotation
A SpanTargetSingleAnnotation maps a single annotation value to the spans (often only a single span) which the annotation value is associated with.
Name | Summary |
---|---|
<init> | A SpanTargetSingleAnnotation maps a single annotation value to the spans (often only a single span) which the annotation value is associated with.SpanTargetSingleAnnotation(spans: Set < Span >, values: List < ValueToProbability >) |
Name | Summary |
---|---|
singleValue | For annotations that only store a single value, never a list, this property is a shortcut to accessing itval singleValue: ValueToProbability ? |
spans | A single annotation value can be associated with multiple spans, a span being defined by two numbers indicating the begin and end of the span. Usually it will only be one span, but multiple ones are possible.val spans: Set < Span > |
spansSorted | Property that will sort annotations by span begin and endval spansSorted: List < Span > |
values | We always store a set of values, even though some annotations will be 1 length lists (like a single boolean value) This is to streamline to API and data handling in all steps.val values: List < ValueToProbability > |
Name | Summary |
---|---|
equals | We overwrite equals (and hashCode) because while the order of values should be preserved, for comparison it should not matterfun equals(other: Any ?): Boolean |
hashCode | fun hashCode(): Int |