public Language resolveLanguage(Linguistics linguistics) {
        if (language != Language.UNKNOWN) return language;
        if (linguistics == null) return Language.ENGLISH;

        Detection detection = linguistics.getDetector().detect(String.valueOf(currentValue), null);
        if (detection == null) return Language.ENGLISH;

        Language detected = detection.getLanguage();
        if (detected == Language.UNKNOWN) return Language.ENGLISH;
        return detected;
    }
Returns a mutable reference to the cache of this.
indexinglanguage/src/main/java/com/yahoo/vespa/indexinglanguage/expressions/ExecutionContext.java