public static Set<String> createCharGramsShingles(String text){
  Set<String> shingles=new HashSet<>();
  for (int i=0; i < text.length() - CHAR_GRAM_LENGTH + 1; i++) {
    String shingle=text.substring(i,i + CHAR_GRAM_LENGTH);
    shingles.add(shingle);
  }
  return shingles;
}

public static Set < String > createCharGramsShingles ( String text ) { Set < String > shingles = new HashSet < > ( ) ; for ( int i = 0 ; i < text . length ( ) - CHAR_GRAM_LENGTH + 1 ; i ++ ) { String shingle = text . substring ( i , i + CHAR_GRAM_LENGTH ) ; shingles . add ( shingle ) ; } return shingles ; }
converts a text into a number of " characters n - grams " shingles .
