FreeLing  4.0
Public Member Functions | Public Attributes | Private Attributes
freeling::analysis Class Reference

Class analysis stores a possible reading (lemma, PoS, probability, distance) for a word. More...

#include <language.h>

List of all members.

Public Member Functions

 analysis ()
 constructor
 analysis (const std::wstring &, const std::wstring &)
 constructor
analysisoperator= (const analysis &)
 assignment
void init (const std::wstring &l, const std::wstring &t)
void set_lemma (const std::wstring &)
 Set lemma for analysis.
void set_tag (const std::wstring &)
 Set PoS tag for analysis.
void set_prob (double)
 Set probability for analysis.
void set_distance (double)
 Set distance for analysis.
void set_retokenizable (const std::list< word > &)
 Set retokenization info for analysis.
bool has_prob () const
 Check whether probability has been set.
bool has_distance () const
 Check whether distance has been set.
const std::wstring & get_lemma () const
 Get lemma value for analysis.
const std::wstring & get_tag () const
 Get PoS tag value for analysis.
double get_prob () const
 Get probability value for analysis (-1 if not set).
double get_distance () const
 Get distance value for analysis (-1 if not set).
bool is_retokenizable () const
 Find out if the analysis may imply retokenization.
std::list< word > & get_retokenizable ()
 Get retokenization info for analysis.
const std::list< word > & get_retokenizable () const
 Get retokenization info for analysis.
const std::list< std::pair
< std::wstring, double > > & 
get_senses () const
 get analysis sense list
std::list< std::pair
< std::wstring, double > > & 
get_senses ()
 get ref to analysis sense list
void set_senses (const std::list< std::pair< std::wstring, double > > &)
 set analiysis sense list
std::wstring get_senses_string () const
int max_kbest () const
bool is_selected (int k=0) const
 find out whether the analysis is selected in the tagger k-th best sequence
void mark_selected (int k=0)
 mark this analysis as selected in k-th best sequence
void unmark_selected (int k=0)
 unmark this analysis as selected in k-th best sequence
bool operator> (const analysis &) const
 Comparison to sort analysis by *decreasing* probability.
bool operator< (const analysis &) const
 Comparison to sort analysis by *increasing* probability.
bool operator== (const analysis &) const
 Comparison (to please MSVC)

Public Attributes

std::vector< std::wstring > user
 user-managed data, we just store it.

Private Attributes

std::wstring lemma
 lemma
std::wstring tag
 PoS tag.
double prob
 probability of that lemma-tag given the word
double distance
 distance from a added analysis from corrector to the original word
std::list< std::pair
< std::wstring, double > > 
senses
 list of possible senses for that analysis, along with their rank as attributed by the ukb PPR algorithm
std::list< wordretok
 information to retokenize the word after tagging if this analysis is selected
std::set< intselected_kbest

Detailed Description

Class analysis stores a possible reading (lemma, PoS, probability, distance) for a word.


Constructor & Destructor Documentation

constructor

Class analysis stores a possible reading (lemma, PoS, probability, distance) for a word.

Create empty analysis

freeling::analysis::analysis ( const std::wstring &  ,
const std::wstring &   
)

constructor


Member Function Documentation

Get distance value for analysis (-1 if not set).

const wstring & freeling::analysis::get_lemma ( ) const

Get lemma value for analysis.

Referenced by freeling::dictionary::add_analysis(), and freeling::probabilities::less().

double freeling::analysis::get_prob ( ) const

Get probability value for analysis (-1 if not set).

Referenced by freeling::probabilities::less().

Get retokenization info for analysis.

Get retokenization info for analysis.

const list< pair< wstring, double > > & freeling::analysis::get_senses ( ) const

get analysis sense list

list< pair< wstring, double > > & freeling::analysis::get_senses ( )

get ref to analysis sense list

const wstring & freeling::analysis::get_tag ( ) const

Get PoS tag value for analysis.

Referenced by freeling::dictionary::add_analysis(), and freeling::probabilities::less().

Check whether distance has been set.

Check whether probability has been set.

void freeling::analysis::init ( const std::wstring &  l,
const std::wstring &  t 
)

Find out if the analysis may imply retokenization.

bool freeling::analysis::is_selected ( int  k = 0) const

find out whether the analysis is selected in the tagger k-th best sequence

mark this analysis as selected in k-th best sequence

bool freeling::analysis::operator< ( const analysis a) const

Comparison to sort analysis by *increasing* probability.

Comparison to sort analysis by *descending* probability and ascending alphabetical tag.

References prob, and tag.

analysis & freeling::analysis::operator= ( const analysis a)

assignment

Assignment.

References distance, lemma, prob, retok, selected_kbest, senses, tag, and user.

bool freeling::analysis::operator== ( const analysis a) const

Comparison (to please MSVC)

comparison (just to please MSVC)

References lemma, and tag.

bool freeling::analysis::operator> ( const analysis a) const

Comparison to sort analysis by *decreasing* probability.

Comparison to sort analysis by *ascending* probability and ascending alphabetical tag.

References prob, and tag.

Set distance for analysis.

void freeling::analysis::set_lemma ( const std::wstring &  )

Set lemma for analysis.

void freeling::analysis::set_prob ( double  p)

Set probability for analysis.

Referenced by freeling::senses::analyze(), and freeling::probabilities::guesser().

void freeling::analysis::set_retokenizable ( const std::list< word > &  )

Set retokenization info for analysis.

Referenced by freeling::affixes::ApplyRule().

void freeling::analysis::set_senses ( const std::list< std::pair< std::wstring, double > > &  )

set analiysis sense list

Referenced by freeling::senses::analyze().

void freeling::analysis::set_tag ( const std::wstring &  )

Set PoS tag for analysis.

unmark this analysis as selected in k-th best sequence


Member Data Documentation

double freeling::analysis::distance [private]

distance from a added analysis from corrector to the original word

Referenced by operator=().

std::wstring freeling::analysis::lemma [private]

lemma

Referenced by operator=(), and operator==().

double freeling::analysis::prob [private]

probability of that lemma-tag given the word

Referenced by operator<(), operator=(), and operator>().

std::list<word> freeling::analysis::retok [private]

information to retokenize the word after tagging if this analysis is selected

Referenced by operator=().

Referenced by operator=().

std::list<std::pair<std::wstring,double> > freeling::analysis::senses [private]

list of possible senses for that analysis, along with their rank as attributed by the ukb PPR algorithm

Referenced by operator=().

std::wstring freeling::analysis::tag [private]

PoS tag.

Referenced by operator<(), operator=(), operator==(), and operator>().

std::vector<std::wstring> freeling::analysis::user

user-managed data, we just store it.

Referenced by operator=().


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