Package org.carrot2.language
Class GlobDictionary
- java.lang.Object
-
- org.carrot2.language.GlobDictionary
-
- All Implemented Interfaces:
Predicate<CharSequence>
public class GlobDictionary extends Object implements Predicate<CharSequence>
This dictionary implementation is a middle ground between the complexity of regular expressions and sheer speed of plain text matching. It offers case sensitive and case insensitive matching, as well as globs (wildcards matching any character sequence).
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
GlobDictionary.MatchType
static class
GlobDictionary.PatternParser
static class
GlobDictionary.Token
static class
GlobDictionary.WordPattern
-
Constructor Summary
Constructors Constructor Description GlobDictionary(Stream<GlobDictionary.WordPattern> patterns)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static GlobDictionary
compilePatterns(Stream<String> entries)
boolean
test(CharSequence input)
String
toString()
-
-
-
Constructor Detail
-
GlobDictionary
public GlobDictionary(Stream<GlobDictionary.WordPattern> patterns)
-
-
Method Detail
-
test
public boolean test(CharSequence input)
- Specified by:
test
in interfacePredicate<CharSequence>
-
compilePatterns
public static GlobDictionary compilePatterns(Stream<String> entries)
-
-