Package com.optimaize.langdetect.ngram
Class OldNgramExtractor
java.lang.Object
com.optimaize.langdetect.ngram.OldNgramExtractor
Deprecated.
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionextractNGrams
(@NotNull CharSequence text, @Nullable OldNgramExtractor.Filter filter) Deprecated.
-
Constructor Details
-
OldNgramExtractor
public OldNgramExtractor()Deprecated.
-
-
Method Details
-
extractNGrams
@NotNull @Deprecated public static @NotNull List<String> extractNGrams(@NotNull @NotNull CharSequence text, @Nullable @Nullable OldNgramExtractor.Filter filter) Deprecated.This was the method found in the 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).
-