Class RuleManager
java.lang.Object
net.loomchild.segment.srx.RuleManager
Represents segmentation rules manager.
Responsible for constructing and storing break and exception rules.
- Author:
- loomchild
-
Constructor Summary
ConstructorsConstructorDescriptionRuleManager(SrxDocument document, List<LanguageRule> languageRuleList, int maxLookbehindConstructLength) Constructor. -
Method Summary
-
Constructor Details
-
RuleManager
public RuleManager(SrxDocument document, List<LanguageRule> languageRuleList, int maxLookbehindConstructLength) Constructor. Responsible for retrieving rules from SRX document for given language code, constructing patterns and storing them in quick accessible format. Adds break rules tobreakRuleListand constructs corresponding exception patterns inexceptionPatternMap. Uses document cache to store rules and patterns.- Parameters:
document- SRX documentlanguageRuleList- list of language rulesmaxLookbehindConstructLength- Maximum length of regular expression in lookbehind (seeUtil.finitize(String, int)).
-
-
Method Details
-
getBreakRuleList
-
getExceptionPattern
-