@ScalarFunction
  public static String[] uniqueNgrams(String input, int length) {
    if (length == 0 || length > input.length()) {
      return new String[0];
    }
    ObjectSet<String> ngramSet = new ObjectLinkedOpenHashSet<>();
    for (int i = 0; i < input.length() - length + 1; i++) {
      ngramSet.add(input.substring(i, i + length));
    }
    return ngramSet.toArray(new String[0]);
  }
@Test(dataProvider = "ngramTestCases")
  public void testNGram(String input, int minGram, int maxGram, String[] expectedExactNGram, String[] expectedNGram) {
    assertEquals(StringFunctions.uniqueNgrams(input, maxGram), expectedExactNGram);
    assertEquals(StringFunctions.uniqueNgrams(input, minGram, maxGram), expectedNGram);
  }