FreeLing
4.0
|
Struct that allow us to compare words easily. More...
#include <relation.h>
Public Member Functions | |
word_pos (const freeling::word &w_p, const freeling::sentence &s_p, int n_paragraph, int n_sentence, int position) | |
bool | operator== (word_pos other) const |
Two words are equal if they are in the same position, phrase and paragraph. | |
bool | operator< (word_pos other) const |
One word is smaller than other one if it appears later in the text. | |
bool | operator> (word_pos other) const |
One word is greater than other one if it appears sooner in the text. | |
std::wstring | toString () const |
Get a string representation of the word_pos to debug. | |
Public Attributes | |
const freeling::word & | w |
const freeling::sentence & | s |
int | n_paragraph |
int | n_sentence |
int | position |
Struct that allow us to compare words easily.
freeling::word_pos::word_pos | ( | const freeling::word & | w_p, |
const freeling::sentence & | s_p, | ||
int | n_paragraph, | ||
int | n_sentence, | ||
int | position | ||
) |
bool freeling::word_pos::operator< | ( | word_pos | other | ) | const |
One word is smaller than other one if it appears later in the text.
bool freeling::word_pos::operator== | ( | word_pos | other | ) | const |
Two words are equal if they are in the same position, phrase and paragraph.
bool freeling::word_pos::operator> | ( | word_pos | other | ) | const |
One word is greater than other one if it appears sooner in the text.
std::wstring freeling::word_pos::toString | ( | ) | const |
Get a string representation of the word_pos to debug.