Interface AnnotatorToken<F,T extends Comparable<T>>

Type Parameters:
F - the feature type
T - 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 Type
    Method
    Description
    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 a null score, with the natural tag order breaking ties.
    Returns the key display features for this token, produced by the display feature extractor configured on the annotator.
    Returns the starting confidence value, or null when no model produced a confidence.
    Returns the starting tag shown to the user.
    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 to features.
  • Method Details

    • alternativeTagScores

      Map<T,@Nullable Double> 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 a null score, with the natural tag order breaking ties.
      Returns:
      the alternative tag scores
    • features

      Set<F> 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

      @Nullable Double initialConfidence()
      Returns the starting confidence value, or null when 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

      Set<F> verboseFeatures()
      Returns the verbose display features for this token — the noisier extras shown only in the all-features view, in addition to features. 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