public final class RegexNameFinder extends Object implements TokenNameFinder
Constructor and Description |
---|
RegexNameFinder(Map<String,Pattern[]> regexMap) |
RegexNameFinder(Pattern[] patterns)
Deprecated.
|
RegexNameFinder(Pattern[] patterns,
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(String text)
NEW.
|
Span[] |
find(String[] tokens)
Generates name tags for the given sequence, typically a sentence, returning token spans for any identified names.
|
Pattern[] |
getmPatterns() |
String |
getsType() |
void |
setmPatterns(Pattern[] mPatterns) |
void |
setsType(String sType) |
@Deprecated public RegexNameFinder(Pattern[] patterns)
RegexNameFinder(Pattern[], String)
for single types, and/or constructor
RegexNameFinder(Map)
public Span[] find(String[] tokens)
TokenNameFinder
find
in interface TokenNameFinder
tokens
- an array of the tokens or words of the sequence, typically a sentence.public Span[] find(String text)
text
- public void clearAdaptiveData()
TokenNameFinder
clearAdaptiveData
in interface TokenNameFinder
public Pattern[] getmPatterns()
public void setmPatterns(Pattern[] mPatterns)
public String getsType()
public void setsType(String sType)
Copyright © 2015 The Apache Software Foundation. All rights reserved.