private static void addAnnotation(Span here, String term, String orig, TermOccurrences termOccurrences,
                                      int maxTokenLength) {
        if (term.length() > maxTokenLength) return;
        if (termOccurrences.termCountBelowLimit(term))
            here.annotate(termAnnotation(term, orig));
    }
Creates a TERM annotation which has the term as annotation (only) if it is different from the original.
indexinglanguage/src/main/java/com/yahoo/vespa/indexinglanguage/linguistics/LinguisticsAnnotator.java