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)
TokenNameFinder
find
in interface TokenNameFinder
tokens
- an array of the tokens or words of the sequence, typically a sentence.public void clearAdaptiveData()
TokenNameFinder
clearAdaptiveData
in interface TokenNameFinder
Copyright © 2017 The Apache Software Foundation. All rights reserved.