private Span typedSpan(int from, int length, TokenType tokenType, SpanList spanList) {
        return (Span)spanList.span(from, length).annotate(AnnotationTypes.TOKEN_TYPE, tokenType.getValue());
    }
Creates an executable ngram expression

@param linguistics the gram splitter to use, or null if this is used for representation and will not be executed
@param gramSize the gram size
indexinglanguage/src/main/java/com/yahoo/vespa/indexinglanguage/expressions/NGramExpression.java