public class TokenMergeContainer.AlignedTokensMap extends Object
SToken objects by their start position. Moreover, a
search for the start and length of a specific SToken object is
possible.| Constructor and Description |
|---|
AlignedTokensMap() |
| Modifier and Type | Method and Description |
|---|---|
void |
addToken(org.corpus_tools.salt.common.SToken tok,
int left,
int right)
This method adds a
SToken with its left and right index to
the internal structures. |
int |
getEnd(org.corpus_tools.salt.common.SToken tok)
This method returns the end index of the given
SToken aligned
to the normalized text. |
int |
getLength(org.corpus_tools.salt.common.SToken tok)
This method returns the length of the given
SToken aligned to
the normalized text. |
int |
getStart(org.corpus_tools.salt.common.SToken tok)
This method returns the start index of the given
SToken
aligned to the normalized text. |
org.corpus_tools.salt.common.SToken |
getTokenByStart(int start)
This method searches a
SToken specified by the start |
List<org.corpus_tools.salt.common.SToken> |
getTokens()
This method returns all
SToken objects contained in this
TokenMergeContainer.AlignedTokensMap |
public List<org.corpus_tools.salt.common.SToken> getTokens()
SToken objects contained in this
TokenMergeContainer.AlignedTokensMapSToken objectspublic void addToken(org.corpus_tools.salt.common.SToken tok,
int left,
int right)
SToken with its left and right index to
the internal structures.tok - the SToken to addleft - the start valueright - the end valuepublic org.corpus_tools.salt.common.SToken getTokenByStart(int start)
SToken specified by the startstart - the start valueSToken object or null on failurepublic int getLength(org.corpus_tools.salt.common.SToken tok)
SToken aligned to
the normalized text.tok - the SToken to search the length forpublic int getStart(org.corpus_tools.salt.common.SToken tok)
SToken
aligned to the normalized text.tok - the SToken to search the start forpublic int getEnd(org.corpus_tools.salt.common.SToken tok)
SToken aligned
to the normalized text.tok - the SToken to search the end forCopyright © 2014–2019 Humboldt-Universität zu Berlin. All rights reserved.