Structure describing a token in the document by its start and end position.
More...
#include <token.hpp>
|
| | Token () |
| | Default constructor. More...
|
| |
| | Token (int ordpos_, const Position &origpos_, int origsize_) |
| | Constructor. More...
|
| |
| | Token (const Token &o) |
| | Copy constructor. More...
|
| |
| int | ordpos () const |
| | Get the ordinal (counting) position in the document. This value is used to assign the term position, that is not the byte position but a number taken from the enumeration of all distinct feature byte postions. More...
|
| |
| const Position & | origpos () const |
| | Get the start position of this token in the original document. More...
|
| |
| Position & | origpos () |
| | Get the start position of this token in the original document. More...
|
| |
| int | origsize () const |
| | Get the byte size of the translated token string (UTF-8) in the original document segment. More...
|
| |
| void | setOrigPosition (const Position &origpos_) |
| | Set the original segment index of the token in the source. More...
|
| |
| void | setOrigSize (int origsize_) |
| | Set the original size of the token in the source. More...
|
| |
| void | setOrdpos (int ordpos_) |
| | Set the ordinal position of the token in the source (adjusted in case of multiple segments) More...
|
| |
| int | compare (const Token &o) const |
| | Compare with another token. More...
|
| |
| bool | operator< (const Token &o) const |
| | Compare operator for sort. More...
|
| |
Structure describing a token in the document by its start and end position.
| strus::analyzer::Token::Token |
( |
| ) |
|
|
inline |
| strus::analyzer::Token::Token |
( |
int |
ordpos_, |
|
|
const Position & |
origpos_, |
|
|
int |
origsize_ |
|
) |
| |
|
inline |
Constructor.
- Parameters
-
| [in] | ordpos_ | oridinal term position assigned to the the token |
| [in] | origpos_ | position of the token start in the original document |
| [in] | origsize_ | size of the token in bytes in the translated document segment (UTF-8) |
| strus::analyzer::Token::Token |
( |
const Token & |
o | ) |
|
|
inline |
| int strus::analyzer::Token::compare |
( |
const Token & |
o | ) |
const |
|
inline |
Compare with another token.
| bool strus::analyzer::Token::operator< |
( |
const Token & |
o | ) |
const |
|
inline |
Compare operator for sort.
| int strus::analyzer::Token::ordpos |
( |
| ) |
const |
|
inline |
Get the ordinal (counting) position in the document. This value is used to assign the term position, that is not the byte position but a number taken from the enumeration of all distinct feature byte postions.
| const Position& strus::analyzer::Token::origpos |
( |
| ) |
const |
|
inline |
Get the start position of this token in the original document.
| Position& strus::analyzer::Token::origpos |
( |
| ) |
|
|
inline |
Get the start position of this token in the original document.
| int strus::analyzer::Token::origsize |
( |
| ) |
const |
|
inline |
Get the byte size of the translated token string (UTF-8) in the original document segment.
| void strus::analyzer::Token::setOrdpos |
( |
int |
ordpos_ | ) |
|
|
inline |
Set the ordinal position of the token in the source (adjusted in case of multiple segments)
- Parameters
-
| [in] | ordpos_ | oridinal term position assigned to the the token |
| void strus::analyzer::Token::setOrigPosition |
( |
const Position & |
origpos_ | ) |
|
|
inline |
Set the original segment index of the token in the source.
- Parameters
-
| [in] | origpos_ | position of the token start in the original document |
| void strus::analyzer::Token::setOrigSize |
( |
int |
origsize_ | ) |
|
|
inline |
Set the original size of the token in the source.
- Parameters
-
| [in] | origsize_ | size of the token in bytes |
The documentation for this struct was generated from the following file:
- /home/patrick/Projects/github/strusAnalyzer/include/strus/analyzer/token.hpp