public double getOOV(String txt) {
        List<TextStatsCalculator> calculators = new ArrayList<>();
        calculators.add(new CommonTokens());
        CompositeTextStatsCalculator calc = new CompositeTextStatsCalculator(calculators);
        Map<Class, Object> results = calc.calculate(txt);

        /*
            Note that the OOV requires language id, so you can also
            retrieve the detected languages with this:

            List<Language> detectedLanguages = (List<Language>) results.get(LanguageIDWrapper.class);

         */

        CommonTokenResult result = (CommonTokenResult) results.get(CommonTokens.class);
        return result.getOOV();
    }
@Test
    public void testOOV() throws Exception {
        TextStatsFromTikaEval textStats = new TextStatsFromTikaEval();
        String s = "the quick brown fox jumped over the lazy dog asdfas asdf asdfasfasf";
        assertEquals(textStats.getOOV(s), 0.25, 0.01);
    }