public static Annotation termAnnotation(String term, String originalTerm) {
        if (term.equals(originalTerm))
            return new Annotation(AnnotationTypes.TERM);
        else
            return new Annotation(AnnotationTypes.TERM, new StringFieldValue(term));
    }
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