Package com.optimaize.langdetect.ngram
Class OldNgramExtractor
- java.lang.Object
-
- com.optimaize.langdetect.ngram.OldNgramExtractor
-
@Deprecated public class OldNgramExtractor extends java.lang.Object
Deprecated.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
OldNgramExtractor.Filter
Deprecated.
-
Constructor Summary
Constructors Constructor Description OldNgramExtractor()
Deprecated.
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static @NotNull java.util.List<java.lang.String>
extractNGrams(@NotNull java.lang.CharSequence text, @Nullable OldNgramExtractor.Filter filter)
Deprecated.
-
-
-
Method Detail
-
extractNGrams
@NotNull @Deprecated public static @NotNull java.util.List<java.lang.String> extractNGrams(@NotNull @NotNull java.lang.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).
-
-