FreeLing  4.0
Public Member Functions | Public Attributes | Static Public Attributes | Protected Attributes
freeling::relation Class Reference

Class relation is a non-instantiable class which defines many virtual methods to check if a word is compatible with the relation or if a word can be stored in the structures of a lexical chain. More...

#include <relation.h>

Inheritance diagram for freeling::relation:
Inheritance graph
[legend]
Collaboration diagram for freeling::relation:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 relation (const std::wstring s, const std::wstring t)
 Constructor.
 ~relation ()
 Destructor.
bool is_compatible (const freeling::word &w) const
 True if the words tag is compatible with the relation.
virtual bool compute_word (const freeling::word &w, const freeling::sentence &s, const freeling::document &doc, int n_paragraph, int n_sentence, int position, std::list< word_pos > &words, std::list< related_words > &relations, std::unordered_map< std::wstring, std::pair< int, word_pos * > > &unique_words) const =0
virtual double get_homogeneity_index (const std::list< word_pos > &words, const std::list< related_words > &relations, const std::unordered_map< std::wstring, std::pair< int, word_pos * > > &unique_words) const =0
virtual std::list< word_posorder_words_by_weight (const std::unordered_map< std::wstring, std::pair< int, word_pos * > > &unique_words) const =0

Public Attributes

const std::wstring label
 Label with the name of the related. It is used for debugging.

Static Public Attributes

static int max_distance
 The maximum distance in phrases between two words to be related.

Protected Attributes

const freeling::regexp compatible_tag
 If a word tag matchs with compatible_tag, then the word is compatible with the relation.

Detailed Description

Class relation is a non-instantiable class which defines many virtual methods to check if a word is compatible with the relation or if a word can be stored in the structures of a lexical chain.


Constructor & Destructor Documentation

freeling::relation::relation ( const std::wstring  s,
const std::wstring  t 
)

Constructor.

Destructor.


Member Function Documentation

virtual bool freeling::relation::compute_word ( const freeling::word w,
const freeling::sentence s,
const freeling::document doc,
int  n_paragraph,
int  n_sentence,
int  position,
std::list< word_pos > &  words,
std::list< related_words > &  relations,
std::unordered_map< std::wstring, std::pair< int, word_pos * > > &  unique_words 
) const [pure virtual]
virtual double freeling::relation::get_homogeneity_index ( const std::list< word_pos > &  words,
const std::list< related_words > &  relations,
const std::unordered_map< std::wstring, std::pair< int, word_pos * > > &  unique_words 
) const [pure virtual]

True if the words tag is compatible with the relation.

virtual std::list<word_pos> freeling::relation::order_words_by_weight ( const std::unordered_map< std::wstring, std::pair< int, word_pos * > > &  unique_words) const [pure virtual]

Member Data Documentation

If a word tag matchs with compatible_tag, then the word is compatible with the relation.

const std::wstring freeling::relation::label

Label with the name of the related. It is used for debugging.

The maximum distance in phrases between two words to be related.


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