/** * To ensure having border grams, this character is added to the left and right of the text. * * <p>Example: when textPadding is a space ' ' then a text input "foo" becomes " foo ", ensuring that n-grams like " f" * are created.</p> * * <p>If the text already has such a character in that position (eg starts with), it is not added there.</p> * * @param textPadding for example a space ' '. */ public NgramExtractor textPadding(char textPadding) { return new NgramExtractor(this.gramLengths, this.filter, textPadding); }
public NgramExtractor filter(NgramFilter filter) { return new NgramExtractor(this.gramLengths, filter, this.textPadding); }
/** * To ensure having border grams, this character is added to the left and right of the text. * * <p>Example: when textPadding is a space ' ' then a text input "foo" becomes " foo ", ensuring that n-grams like " f" * are created.</p> * * <p>If the text already has such a character in that position (eg starts with), it is not added there.</p> * * @param textPadding for example a space ' '. */ public NgramExtractor textPadding(char textPadding) { return new NgramExtractor(this.gramLengths, this.filter, textPadding); }
public NgramExtractor filter(NgramFilter filter) { return new NgramExtractor(this.gramLengths, filter, this.textPadding); }
public static NgramExtractor gramLengths(Integer... gramLength) { return new NgramExtractor(Arrays.asList(gramLength), null, null); }
public static NgramExtractor gramLength(int gramLength) { return new NgramExtractor(ImmutableList.of(gramLength), null, null); } public static NgramExtractor gramLengths(Integer... gramLength) {
public static NgramExtractor gramLengths(Integer... gramLength) { return new NgramExtractor(Arrays.asList(gramLength), null, null); }
public static NgramExtractor gramLength(int gramLength) { return new NgramExtractor(ImmutableList.of(gramLength), null, null); } public static NgramExtractor gramLengths(Integer... gramLength) {