FreeLing  4.0
Public Member Functions | Public Attributes
freeling::word_pos Struct Reference

Struct that allow us to compare words easily. More...

#include <relation.h>

Collaboration diagram for freeling::word_pos:
Collaboration graph
[legend]

List of all members.

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::wordw
const freeling::sentences
int n_paragraph
int n_sentence
int position

Detailed Description

Struct that allow us to compare words easily.


Constructor & Destructor Documentation

freeling::word_pos::word_pos ( const freeling::word w_p,
const freeling::sentence s_p,
int  n_paragraph,
int  n_sentence,
int  position 
)

Member Function Documentation

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.


Member Data Documentation


The documentation for this struct was generated from the following file: