public final class RegexNameFinder extends java.lang.Object implements TokenNameFinder
Constructor and Description |
---|
RegexNameFinder(java.util.Map<java.lang.String,java.util.regex.Pattern[]> regexMap) |
RegexNameFinder(java.util.regex.Pattern[] patterns)
Deprecated.
|
RegexNameFinder(java.util.regex.Pattern[] patterns,
java.lang.String type) |
Modifier and Type | Method and Description |
---|---|
void |
clearAdaptiveData()
Forgets all adaptive data which was collected during previous
calls to one of the find methods.
|
Span[] |
find(java.lang.String text)
NEW.
|
Span[] |
find(java.lang.String[] tokens)
Generates name tags for the given sequence, typically a sentence, returning token spans for any identified names.
|
java.util.regex.Pattern[] |
getmPatterns() |
java.lang.String |
getsType() |
void |
setmPatterns(java.util.regex.Pattern[] mPatterns) |
void |
setsType(java.lang.String sType) |
public RegexNameFinder(java.util.Map<java.lang.String,java.util.regex.Pattern[]> regexMap)
public RegexNameFinder(java.util.regex.Pattern[] patterns, java.lang.String type)
@Deprecated public RegexNameFinder(java.util.regex.Pattern[] patterns)
RegexNameFinder(Pattern[], String)
for single types, and/or constructor
RegexNameFinder(Map)
public Span[] find(java.lang.String[] tokens)
TokenNameFinder
find
in interface TokenNameFinder
tokens
- an array of the tokens or words of the sequence, typically a sentence.public Span[] find(java.lang.String text)
text
- public void clearAdaptiveData()
TokenNameFinder
clearAdaptiveData
in interface TokenNameFinder
public java.util.regex.Pattern[] getmPatterns()
public void setmPatterns(java.util.regex.Pattern[] mPatterns)
public java.lang.String getsType()
public void setsType(java.lang.String sType)
Copyright © 2010 - 2020 Adobe. All Rights Reserved