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 classGlobDictionary.MatchTypestatic classGlobDictionary.PatternParserstatic classGlobDictionary.Tokenstatic classGlobDictionary.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 GlobDictionarycompilePatterns(Stream<String> entries)booleantest(CharSequence input)StringtoString()
-
-
-
Constructor Detail
-
GlobDictionary
public GlobDictionary(Stream<GlobDictionary.WordPattern> patterns)
-
-
Method Detail
-
test
public boolean test(CharSequence input)
- Specified by:
testin interfacePredicate<CharSequence>
-
compilePatterns
public static GlobDictionary compilePatterns(Stream<String> entries)
-
-