Interface AffixCondition
interface AffixCondition
Checks the "condition" part of affix definition, as in
PFX flag stripping prefix [condition [morphological_fields...]]
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final AffixCondition
static final AffixCondition
static final String
-
Method Summary
Modifier and TypeMethodDescriptionboolean
acceptsStem
(char[] word, int offset, int length) default boolean
acceptsStem
(String stem) static AffixCondition
Analyzes the given affix kind, strip and condition and returns an object able to efficiently check that condition.private static int
countCharPatterns
(String condition) private static String
escapeDash
(String re) private static boolean
private static AffixCondition
regexpCondition
(AffixKind kind, String condition, int charCount) private static int
skipCharPattern
(String condition, int pos) private static int
skipCharPatterns
(String condition, int count) private static AffixCondition
substringCondition
(AffixKind kind, String stemCondition) static String
-
Field Details
-
ALWAYS_TRUE_KEY
- See Also:
-
ALWAYS_TRUE
-
ALWAYS_FALSE
-
-
Method Details
-
acceptsStem
-
acceptsStem
boolean acceptsStem(char[] word, int offset, int length) - Returns:
- whether the given word matches this condition as a stem with both "strip" and "affix" removed
-
uniqueKey
- Returns:
- a key used to deduplicate same condition+strip+kind triples. For trivial conditions
that need no check,
ALWAYS_TRUE_KEY
is returned.
-
compile
Analyzes the given affix kind, strip and condition and returns an object able to efficiently check that condition. -
skipCharPatterns
-
countCharPatterns
-
skipCharPattern
-
isRegexp
-
substringCondition
-
regexpCondition
-
escapeDash
-