public abstract class TokenSink extends Object
Modifier and Type | Field and Description |
---|---|
protected static int |
DEFAULT_POSITION_INCREMENT
Default position increment (1).
|
Constructor and Description |
---|
TokenSink() |
Modifier and Type | Method and Description |
---|---|
void |
add(String t)
Appends a token using the default position increment.
|
void |
add(String t,
int increment)
Appends a token.
|
void |
add(Token t)
Appends a token using the default position increment.
|
abstract void |
add(Token t,
int increment)
Appends a token.
|
void |
add(TokenList tokens)
Adds all Tokens for the passed in TokenList to this TokenList.
|
void |
add(TokenList tokens,
int increment)
Adds all Tokens for the passed in TokenList
|
TokenSink |
append(String t)
Appends a token to this TokenList using the default position increment.
|
TokenSink |
append(String t,
int increment)
Appends a token.
|
TokenSink |
append(Token t)
Appends a token using the default position increment.
|
TokenSink |
append(Token t,
int increment)
Appends a token.
|
void |
endScope(String name)
Add an
TokenAnnotation.SCOPE_END token to the token list. |
void |
endScope(String name,
int endOffset)
Add an
TokenAnnotation.SCOPE_END token to the token list. |
Token |
startLanguageRegion(Locale locale)
Start a language region for
locale . |
void |
startScope(String name)
Add an
TokenAnnotation.SCOPE_START token to the token list. |
void |
startScope(String name,
int startOffset)
Add a
TokenAnnotation.SCOPE_START token to the token list. |
protected static final int DEFAULT_POSITION_INCREMENT
public void startScope(String name)
TokenAnnotation.SCOPE_START
token to the token list.public void startScope(String name, int startOffset)
TokenAnnotation.SCOPE_START
token to the token list.public Token startLanguageRegion(Locale locale)
locale
.
A null
locale
will be encoded as an empty string.
public void endScope(String name)
TokenAnnotation.SCOPE_END
token to the token list.public void endScope(String name, int endOffset)
TokenAnnotation.SCOPE_END
token to the token list.public final void add(String t)
t
- The string value of a Token to addpublic final void add(String t, int increment)
t
- The string value of a Token to addincrement
- The position increment for the newly added tokenpublic final void add(Token t)
t
- The Token to add to this TokenListpublic abstract void add(Token t, int increment)
t
- The Token to addincrement
- The position increment for the newly added tokenpublic final void add(TokenList tokens)
The first Token copied from the passed in TokenList will have the default position increment in this TokenList.
NOTE: The tokens in the passed in TokenList will be cloned prior to adding to this TokenList. Modifications to the passed in TokenList after calling add(TokenList) will not impact this TokenList.
tokens
- The TokenList to copy onto the end of this TokenList.public void add(TokenList tokens, int increment)
NOTE: The tokens in the passed in TokenList will be cloned prior to being added. Modifications to the passed in TokenList after calling add(TokenList) will not impact this TokenSink.
tokens
- The TokenList to add.increment
- The increment for the first Token added from tokens
public TokenSink append(String t)
t
- The string value of a Token to add to this TokenListthis
(supports call chaining)public TokenSink append(String t, int increment)
t
- The string value of a Token to addincrement
- The position increment for the Token to addthis
(supports call chaining)public TokenSink append(Token t)
t
- The Token to addthis
(supports call chaining)Copyright © 2018 Attivio, Inc. All Rights Reserved.
PATENT NOTICE: Attivio, Inc. Software Related Patents. With respect to the Attivio software product(s) being used, the following patents apply: Querying Joined Data Within A Search Engine Index: United States Patent No.(s): 8,073,840. Ordered Processing of Groups of Messages: U.S. Patent No.(s) 8,495,656. Signal processing approach to sentiment analysis for entities in documents: U.S. Patent No.(s) 8,725,494. Other U.S. and International Patents Pending.