static int evaluateLevenshteinDistanceAllHits(LevenshteinDistance levenshteinDistance, List<String> terms,
                                                  List<String> texts) {
        logger.debug("evaluateLevenshteinDistanceAllHits {} {}", terms, texts);
        int batchSize = terms.size();
        int limit = texts.size() - batchSize + 1;
        String toSearch = String.join(" ", terms);
        int toReturn = 0;
        for (int i = 0; i < limit; i++) {
            String subText = String.join(" ", texts.subList(i, i + batchSize));
            int distance = evaluateLevenshteinDistance(levenshteinDistance, toSearch, subText);
            if (distance > -1) {
                toReturn++;
            }
        }
        return toReturn;
    }
@Test
    void evaluateLevenshteinDistanceAllHits() {
        String wordSeparatorCharacterRE = "\\s+"; // brown-foxy does not match
        Pattern pattern = Pattern.compile(wordSeparatorCharacterRE);
        List<String> terms = KiePMMLTextIndex.splitText(TERM_0, pattern);
        List<String> texts = KiePMMLTextIndex.splitText(TEXT_0, pattern);
        LevenshteinDistance levenshteinDistance = new LevenshteinDistance(0);
        assertThat(KiePMMLTextIndex.evaluateLevenshteinDistanceAllHits(levenshteinDistance, terms, texts)).isEqualTo(1);
        levenshteinDistance = new LevenshteinDistance(1);
        assertThat(KiePMMLTextIndex.evaluateLevenshteinDistanceAllHits(levenshteinDistance, terms, texts)).isEqualTo(2);
        levenshteinDistance = new LevenshteinDistance(2);
        assertThat(KiePMMLTextIndex.evaluateLevenshteinDistanceAllHits(levenshteinDistance, terms, texts)).isEqualTo(3);
        //---
        wordSeparatorCharacterRE = "[\\s\\-]"; // brown-foxy match
        pattern = Pattern.compile(wordSeparatorCharacterRE);
        terms = KiePMMLTextIndex.splitText(TERM_0, pattern);
        texts = KiePMMLTextIndex.splitText(TEXT_0, pattern);
        levenshteinDistance = new LevenshteinDistance(0);
        assertThat(KiePMMLTextIndex.evaluateLevenshteinDistanceAllHits(levenshteinDistance, terms, texts)).isEqualTo(1);
        levenshteinDistance = new LevenshteinDistance(1);
        assertThat(KiePMMLTextIndex.evaluateLevenshteinDistanceAllHits(levenshteinDistance, terms, texts)).isEqualTo(3);
        levenshteinDistance = new LevenshteinDistance(2);
        assertThat(KiePMMLTextIndex.evaluateLevenshteinDistanceAllHits(levenshteinDistance, terms, texts)).isEqualTo(4);
    }