public final class ScopeInfo extends Object implements Iterator<Token>
ADVANCED: this structure represents advanced scope identification information and may change in incompatible ways in the future.
NOTE: this class implements the Iterator
interface to support iterating over scope tokens efficiently.
Iteration can be reset at any time by calling resetIteration()
.
Modifier | Constructor and Description |
---|---|
|
ScopeInfo()
Create a new ScopeInfo instance (for reuse).
|
protected |
ScopeInfo(com.attivio.sdk.token.TokenList.Element head,
com.attivio.sdk.token.TokenList.Element tail) |
Modifier and Type | Method and Description |
---|---|
int |
endScopeCount() |
int |
getPositionIncrement()
|
boolean |
hasNext() |
boolean |
isPhraseBreak(String... scopes)
Returns
true if a phrase break occurs. |
boolean |
isScopeEnd(String scope)
Check if this ScopeInfo represents the end of
scope . |
boolean |
isScopeStart(String scope)
Check if this ScopeInfo represents the start of
scope . |
Token |
next() |
void |
remove()
Not Supported
|
ScopeInfo |
resetIteration()
Reset iteration.
|
protected static ScopeInfo |
reuse(ScopeInfo reuse,
com.attivio.sdk.token.TokenList.Element head,
com.attivio.sdk.token.TokenList.Element tail)
Get a scope info, reusing if possible.
|
int |
startScopeCount() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEachRemaining
public ScopeInfo()
protected ScopeInfo(com.attivio.sdk.token.TokenList.Element head, com.attivio.sdk.token.TokenList.Element tail)
protected static ScopeInfo reuse(ScopeInfo reuse, com.attivio.sdk.token.TokenList.Element head, com.attivio.sdk.token.TokenList.Element tail)
public ScopeInfo resetIteration()
public int getPositionIncrement()
public boolean isPhraseBreak(String... scopes)
true
if a phrase break occurs.
Phrase breaks include:
scopes
starting or ending.public int startScopeCount()
public int endScopeCount()
public boolean isScopeStart(String scope)
scope
.public boolean isScopeEnd(String scope)
scope
.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.