TextStatsFromTikaEval { 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); CommonTokenResult result = (CommonTokenResult)results.get(CommonTokens.class); result.getLangCode(); return result.getOOV(); }  double getOOV(String txt);  }
@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); }