public final class RegexNameFinder extends Object implements TokenNameFinder
| Constructor and Description |
|---|
RegexNameFinder(Pattern[] patterns) |
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[] tokens)
Generates name tags for the given sequence, typically a sentence, returning token spans for any identified names.
|
public RegexNameFinder(Pattern[] patterns)
public Span[] find(String[] tokens)
TokenNameFinderfind in interface TokenNameFindertokens - an array of the tokens or words of the sequence, typically a sentence.public void clearAdaptiveData()
TokenNameFinderclearAdaptiveData in interface TokenNameFinderCopyright © 2016 The Apache Software Foundation. All rights reserved.