@Deprecated public class OldNgramExtractor extends 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 List<String> |
extractNGrams(@NotNull CharSequence text,
@Nullable OldNgramExtractor.Filter filter)
Deprecated.
|
@NotNull @Deprecated public static @NotNull List<String> extractNGrams(@NotNull @NotNull 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).Copyright © 2018. All rights reserved.