|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectedu.stanford.nlp.pipeline.TokensRegexAnnotator
public class TokensRegexAnnotator
Uses TokensRegex patterns to annotate tokens.
Configuration:
rules - Name of file containing extraction rules
(see CoreMapExpressionExtractor and SequenceMatchRulesoptions.xxx = ...)
setTokenOffsets - whether to explicit set the token offsets of individual tokens (needed to token sequence matches to work)extractWithTokens - whether to return unmatched tokens as wellflatten - whether to flatten matched expressions into individual tokensmatchedExpressionsAnnotationKey - Annotation key where matched expressions are stored as a listMultiple TokensRegexAnnotator can be configured using the same properties file by specifying
difference prefix for the TokensRegexAnnotator
| Nested Class Summary | |
|---|---|
static class |
TokensRegexAnnotator.Options
|
| Nested classes/interfaces inherited from interface edu.stanford.nlp.pipeline.Annotator |
|---|
Annotator.Requirement |
| Field Summary |
|---|
| Constructor Summary | |
|---|---|
TokensRegexAnnotator(java.util.Properties props)
|
|
TokensRegexAnnotator(java.lang.String... files)
|
|
TokensRegexAnnotator(java.lang.String name,
java.util.Properties props)
|
|
| Method Summary | |
|---|---|
void |
addTokenOffsets(CoreMap annotation)
|
void |
annotate(Annotation annotation)
Given an Annotation, perform a task on this Annotation. |
java.util.Set<Annotator.Requirement> |
requirementsSatisfied()
Returns a set of requirements for which tasks this annotator can provide. |
java.util.Set<Annotator.Requirement> |
requires()
Returns the set of tasks which this annotator requires in order to perform. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TokensRegexAnnotator(java.lang.String... files)
public TokensRegexAnnotator(java.lang.String name,
java.util.Properties props)
public TokensRegexAnnotator(java.util.Properties props)
| Method Detail |
|---|
public void addTokenOffsets(CoreMap annotation)
public void annotate(Annotation annotation)
Annotator
annotate in interface Annotatorpublic java.util.Set<Annotator.Requirement> requires()
Annotator
requires in interface Annotatorpublic java.util.Set<Annotator.Requirement> requirementsSatisfied()
Annotator
requirementsSatisfied in interface Annotator
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||