|
FreeLing
4.0
|
Class same_coref_group represents the same coreference group relation: two words are related if they are in the same coreference group. More...
#include <relation.h>


Public Member Functions | |
| same_coref_group (std::wstring expr) | |
| Constructor. | |
| 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 |
| Computes the homogeinity index of the given structures using the specific formula of this relation. | |
| 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 |
| Returns true and stores the word w in the list words, list relations and unordered_map unique_words if w is compatible with the words in these structures using this relation. | |
| std::list< word_pos > | order_words_by_weight (const std::unordered_map< std::wstring, std::pair< int, word_pos * > > &unique_words) const |
| Sorts the words in unique_words by word frequency and returns a list with them. | |
Class same_coref_group represents the same coreference group relation: two words are related if they are in the same coreference group.
| freeling::same_coref_group::same_coref_group | ( | std::wstring | expr | ) |
Constructor.
| bool freeling::same_coref_group::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 [virtual] |
Returns true and stores the word w in the list words, list relations and unordered_map unique_words if w is compatible with the words in these structures using this relation.
Implements freeling::relation.
| double freeling::same_coref_group::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 [virtual] |
Computes the homogeinity index of the given structures using the specific formula of this relation.
Implements freeling::relation.
| std::list<word_pos> freeling::same_coref_group::order_words_by_weight | ( | const std::unordered_map< std::wstring, std::pair< int, word_pos * > > & | unique_words | ) | const [virtual] |
Sorts the words in unique_words by word frequency and returns a list with them.
Implements freeling::relation.
1.7.6.1