|
FreeLing
4.0
|
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>


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_pos > | order_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. | |
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.
| freeling::relation::relation | ( | const std::wstring | s, |
| const std::wstring | t | ||
| ) |
Constructor.
Destructor.
| 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] |
Implemented in freeling::same_coref_group, freeling::hypernymy, and freeling::same_word.
| 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] |
Implemented in freeling::same_coref_group, freeling::hypernymy, and freeling::same_word.
| bool freeling::relation::is_compatible | ( | const freeling::word & | w | ) | const |
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] |
Implemented in freeling::same_coref_group, freeling::hypernymy, and freeling::same_word.
const freeling::regexp freeling::relation::compatible_tag [protected] |
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.
int freeling::relation::max_distance [static] |
The maximum distance in phrases between two words to be related.
1.7.6.1