public abstract class RegexNamedEntityFactory extends Object
RegexNamedEntityFactory.NamedPattern.
For matching RegexNamedEntityFactory.NamedPattern the createNamedEntity(String, MatchResult)
is called with the name of the matching pattern and the matching result.RegexNerDetector,
NamedRegexDetector| Modifier and Type | Class and Description |
|---|---|
static class |
RegexNamedEntityFactory.NamedPattern
A regex
Pattern with an assigned Name. |
| Modifier and Type | Field and Description |
|---|---|
protected org.slf4j.Logger |
log |
| Constructor and Description |
|---|
RegexNamedEntityFactory() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract RegexNerProcessor.NamedEntity |
createNamedEntity(String patternName,
MatchResult match)
Creates a token for the parsed
MatchResult originating from the
RegexNamedEntityFactory.NamedPattern with the parsed name |
protected abstract List<RegexNamedEntityFactory.NamedPattern> |
getRegexes(SpanCollection section,
String language)
Getter for the
RegexNamedEntityFactory.NamedPattern to be used by the RegexNerProcessor |
void |
process(SpanCollection section,
String lang,
List<RegexNerProcessor.NamedEntity> namedEntities) |
public final void process(SpanCollection section, String lang, List<RegexNerProcessor.NamedEntity> namedEntities)
protected abstract RegexNerProcessor.NamedEntity createNamedEntity(String patternName, MatchResult match)
MatchResult originating from the
RegexNamedEntityFactory.NamedPattern with the parsed namepatternName - the name of the RegexNamedEntityFactory.NamedPatternmatch - the MatchResultRegexNerProcessor.NamedEntity or null if no Token was created.protected abstract List<RegexNamedEntityFactory.NamedPattern> getRegexes(SpanCollection section, String language)
RegexNamedEntityFactory.NamedPattern to be used by the RegexNerProcessorsection - the section of an AnalyzedText to be analyzed with the
returned patternslanguage - the language of the parsed text sectionRegexNamedEntityFactory.NamedPattern or an empty list if noneCopyright © 2016–2017 Redlink GmbH. All rights reserved.