### Question:
Tokenizer { public static Set<String> calculateCharNGrams(String string, int n) { Iterator<Token> nGramIterator = new CharacterNGramTokenizer(n, n).iterateTokens(string); return CollectionHelper.newHashSet(CollectionHelper.convert(nGramIterator, Token.VALUE_CONVERTER)); } private  Tokenizer(); static List<String> tokenize(String inputString); static Set<String> calculateCharNGrams(String string, int n); static Set<String> calculateAllCharEdgeNGrams(String string, int n1, int n2); static Set<String> calculateAllCharEdgeNGrams(String string, int n1, int n2, boolean mustHitLeftEdge); static Set<String> calculateCharEdgeNGrams(String string, int n, boolean mustHitLeftEdge); static Set<String> calculateWordNGrams(String string, int n); static List<String> calculateWordNGramsAsList(String string, int n); static Set<String> calculateAllCharNGrams(String string, int n1, int n2); static Set<String> calculateAllWordNGrams(String string, int n1, int n2); static Set<List<String>> computeSplits(String string, int n1, int n2, int maxSplits); static List<String> computeStartingWordNGrams(String string, int n1, int n2); static String getSentence(String string, int position); static List<String> getSentences(String inputText, boolean onlyRealSentences); static List<String> getSentences(String inputText, boolean onlyRealSentences, Language language); static List<String> getSentences(String inputText); static List<String> getSentences(String inputText, Language language); static String getPhraseFromBeginningOfSentence(String inputString); static String getPhraseToEndOfSentence(String string); static void main(String[] args); static final String TOKEN_SPLIT_REGEX; static final String SENTENCE_SPLIT_REGEX_EN; static final String SENTENCE_SPLIT_REGEX_DE; }### Answer:
@Test public void testCalculateCharNGrams() { assertEquals(16, Tokenizer.calculateCharNGrams("allthelilacsinohio", 3).size()); assertEquals(3, Tokenizer.calculateCharNGrams("hiatt", 3).size()); assertEquals(81, Tokenizer.calculateAllCharNGrams("allthelilacsinohio", 3, 8).size()); assertEquals(1, Tokenizer.calculateCharNGrams("hiatt", 5).size()); assertEquals(0, Tokenizer.calculateCharNGrams("hiatt", 6).size()); }