@Deprecated
public class OldNgramExtractor
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
OldNgramExtractor.Filter
Deprecated.
|
| Constructor and Description |
|---|
OldNgramExtractor()
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
static @NotNull java.util.List<java.lang.String> |
extractNGrams(@NotNull java.lang.CharSequence text,
@Nullable OldNgramExtractor.Filter filter)
Deprecated.
|
@NotNull
@Deprecated
public static @NotNull java.util.List<java.lang.String> extractNGrams(@NotNull
@NotNull java.lang.CharSequence text,
@Nullable
@Nullable OldNgramExtractor.Filter filter)
com.cybozu.labs.langdetect.Detector class, it was used to extract
grams from the to-analyze text.
NOTE: although it adds the first ngram with space, it does not add the last n-gram with space. example: "foo" gives " fo" but not "oo "!.
It is not clear yet whether this is desired (and why) or a bug.
TODO replace this algorithm with a simpler, faster one that uses less memory: only by position shifting. also, the returned list size
can be computed before making it (based on text length and number of n-grams).