/** * Run TokensRegex -- annotate patterns found in tokens */ public Annotator tokensregex(Properties properties, String name) { return new TokensRegexAnnotator(name, properties); }
/** * Set up the TokensRegexAnnotator sub-annotator * * @param properties Properties for the TokensRegex sub-annotator */ public void setUpTokensRegexRules(Properties properties) { this.applyTokensRegexRules = (!properties.getProperty("ner.additional.tokensregex.rules","").equals("")); if (this.applyTokensRegexRules) { String tokensRegexRulesPrefix = "ner.additional.tokensregex"; Properties tokensRegexRulesProps = PropertiesUtils.extractPrefixedProperties(properties, tokensRegexRulesPrefix+".", true); // build the additional rules ner TokensRegexNERAnnotator tokensRegexAnnotator = new TokensRegexAnnotator(tokensRegexRulesPrefix, tokensRegexRulesProps); } }
/** * Run TokensRegex -- annotate patterns found in tokens */ public Annotator tokensregex(Properties properties, String name) { return new TokensRegexAnnotator(name, properties); }
/** * Set up the TokensRegexAnnotator sub-annotator * * @param properties Properties for the TokensRegex sub-annotator */ public void setUpTokensRegexRules(Properties properties) { this.applyTokensRegexRules = (!properties.getProperty("ner.additional.tokensregex.rules","").equals("")); if (this.applyTokensRegexRules) { String tokensRegexRulesPrefix = "ner.additional.tokensregex"; Properties tokensRegexRulesProps = PropertiesUtils.extractPrefixedProperties(properties, tokensRegexRulesPrefix+".", true); // build the additional rules ner TokensRegexNERAnnotator tokensRegexAnnotator = new TokensRegexAnnotator(tokensRegexRulesPrefix, tokensRegexRulesProps); } }