FreeLing  4.0
Public Member Functions
freeling::same_coref_group Class Reference

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>

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

List of all members.

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_posorder_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.

Detailed Description

Class same_coref_group represents the same coreference group relation: two words are related if they are in the same coreference group.


Constructor & Destructor Documentation

Constructor.


Member Function Documentation

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.


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