Package org.coordinatekit.crf.annotator
Interface AnnotatorToken<F,T extends Comparable<T>>
- Type Parameters:
F- the feature typeT- the tag type
public interface AnnotatorToken<F,T extends Comparable<T>>
A view-model entry for a single token within an
AnnotatorSequence.
Carries the per-token data the user-interface needs: the raw token string, its extracted feature
set, the starting tag and confidence to show, and the full set of alternative tags with their
scores. The initialConfidence and the values of
alternativeTagScores may be null when no model produced a
prediction for that token (or tag).
-
Method Summary
Modifier and TypeMethodDescriptionReturns the map from tag to score for the edit screen, in canonical iteration order: tags with a non-null score first (sorted by score descending), then tags with anullscore, with the natural tag order breaking ties.features()Returns the key display features for this token, produced by the display feature extractor configured on the annotator.Returns the starting confidence value, ornullwhen no model produced a confidence.Returns the starting tag shown to the user.token()Returns the raw token string.Returns the verbose display features for this token — the noisier extras shown only in the all-features view, in addition tofeatures.
-
Method Details
-
alternativeTagScores
Returns the map from tag to score for the edit screen, in canonical iteration order: tags with a non-null score first (sorted by score descending), then tags with anullscore, with the natural tag order breaking ties.- Returns:
- the alternative tag scores
-
features
Returns the key display features for this token, produced by the display feature extractor configured on the annotator. Empty when no display feature extractor is configured. These features are presentational only — they have no effect on tagging or training output.- Returns:
- the key display features, empty when unconfigured
-
initialConfidence
Returns the starting confidence value, ornullwhen no model produced a confidence.- Returns:
- the starting confidence, or
null
-
initialTag
T initialTag()Returns the starting tag shown to the user.- Returns:
- the starting tag
-
token
String token()Returns the raw token string.- Returns:
- the token
-
verboseFeatures
Returns the verbose display features for this token — the noisier extras shown only in the all-features view, in addition tofeatures. Empty when no verbose feature source is configured. These features are presentational only — they have no effect on tagging or training output.- Returns:
- the verbose display features, empty when unconfigured
-