LIMA
Libre Multilingual Analyzer — C++ API
Loading...
Searching...
No Matches
Lima::LinguisticProcessing::WordSenseDisambiguation::WordSenseAnnotation Class Reference

#include <linguisticProcessing/core/WordSenseAnalysis/WordSenseAnnotation.h>

Public Member Functions

 WordSenseAnnotation ()
 WordSenseAnnotation (const Mode mode, const Mapping mapping, const float confidence, LinguisticGraphVertex v)
 WordSenseAnnotation (const Mode mode, const Mapping mapping, LinguisticGraphVertex v)
 WordSenseAnnotation (const WordSenseAnnotation &wsa)
WordSenseAnnotation & operator= (const WordSenseAnnotation &wsa)
virtual ~WordSenseAnnotation ()
uint64_t senseId ()
uint64_t senseId () const
std::string senseTag ()
std::string senseTag () const
std::string mode ()
std::string mapping ()
const std::string mode () const
const std::string mapping () const
float confidence () const
LinguisticGraphVertex morphVertex ()
LinguisticGraphVertex morphVertex () const
AnnotationGraphVertex av ()
AnnotationGraphVertex av () const
void senseId (uint64_t newSenseId)
void confidence (const float newConfidence)
void morphVertex (LinguisticGraphVertex v)
void av (AnnotationGraphVertex av)
void dump (std::ostream &os)
bool isDisambiguated () const
 general test functions
bool disambiguate (const WordUnit &wu)
 main functions of the global algorithm (called by WordSenseDisambiguator)
bool disambiguate (KnnSearcher *searcher, const WordUnit &wu, const SemanticContext &context, double thres, char method)
AnnotationGraphVertex writeAnnotation (Common::AnnotationGraphs::AnnotationData *ad) const
virtual void outputXml (std::ostream &xmlStream, const LinguisticGraph &g) const

Protected Member Functions

std::set< WordSenseUnit >::iterator classify (const WordUnit &wu, const SemanticContext &context, const std::map< int, std::map< std::string, double > > &cvListRep, const double thres, const char method)
int computeConfidenceVector (const WordUnit &wu, const NNList &knns, const SemanticContext::const_iterator itContext, std::map< int, std::map< std::string, double > > &cvListRep)
double cvCluster (const std::map< int, std::map< std::string, double > > &cvListRep, const std::string &relation, int id_cluster)
 cv_cluster_rep: @cv_list_rep: la matrice 'cv_list_rep' (voir fonction précédente) @nb_clusters: nombre de clusters découverts pour le mot @id_relation: numero d'une relation @id_cluster: numero d'un cluster
double sumCvCluster (std::map< int, std::map< std::string, double > > &cvListRep, std::string relation)
 sum_cv_cluster_rep: @cv_list_rep: la matrice 'cv_list_rep' (voir fonction précédente) @nb_clusters: nombre de clusters découverts pour le mot @id_relation: numero d'une relation
double sumLogCv (const std::map< int, std::map< std::string, double > > &cvListRep, const std::string &relation)
double sumLogCvList (const std::map< int, std::map< std::string, double > > &cvListRep)
void retrieveSense (std::set< WordSenseUnit >::iterator itSenses)
float classifKnnMRD (KnnSearcher *searcher, const WordUnit &wu, const SemanticContext &context, double thres, char method)

Protected Attributes

WordSenseUnit m_wsu
Mode m_mode
Mapping m_mapping
float m_confidence
LinguisticGraphVertex m_morphVertex
std::string m_senseTag

Friends

LIMA_WORDSENSEANALYSIS_EXPORT std::ostream & operator<< (std::ostream &os, const WordSenseAnnotation &wsa)

Detailed Description

Definition at line 40 of file WordSenseAnnotation.h.

Constructor & Destructor Documentation

◆ WordSenseAnnotation() [1/4]

Lima::LinguisticProcessing::WordSenseDisambiguation::WordSenseAnnotation::WordSenseAnnotation ( )
inline

Definition at line 60 of file WordSenseAnnotation.h.

◆ WordSenseAnnotation() [2/4]

Lima::LinguisticProcessing::WordSenseDisambiguation::WordSenseAnnotation::WordSenseAnnotation ( const Mode mode,
const Mapping mapping,
const float confidence,
LinguisticGraphVertex v )
inline

Definition at line 62 of file WordSenseAnnotation.h.

◆ WordSenseAnnotation() [3/4]

Lima::LinguisticProcessing::WordSenseDisambiguation::WordSenseAnnotation::WordSenseAnnotation ( const Mode mode,
const Mapping mapping,
LinguisticGraphVertex v )
inline

Definition at line 74 of file WordSenseAnnotation.h.

◆ WordSenseAnnotation() [4/4]

Lima::LinguisticProcessing::WordSenseDisambiguation::WordSenseAnnotation::WordSenseAnnotation ( const WordSenseAnnotation & wsa)
inline

Definition at line 85 of file WordSenseAnnotation.h.

◆ ~WordSenseAnnotation()

virtual Lima::LinguisticProcessing::WordSenseDisambiguation::WordSenseAnnotation::~WordSenseAnnotation ( )
inlinevirtual

Definition at line 106 of file WordSenseAnnotation.h.

Member Function Documentation

◆ av() [1/3]

AnnotationGraphVertex Lima::LinguisticProcessing::WordSenseDisambiguation::WordSenseAnnotation::av ( )
inline

◆ av() [2/3]

AnnotationGraphVertex Lima::LinguisticProcessing::WordSenseDisambiguation::WordSenseAnnotation::av ( ) const
inline

◆ av() [3/3]

void Lima::LinguisticProcessing::WordSenseDisambiguation::WordSenseAnnotation::av ( AnnotationGraphVertex av)
inline

◆ classifKnnMRD()

float Lima::LinguisticProcessing::WordSenseDisambiguation::WordSenseAnnotation::classifKnnMRD ( KnnSearcher * searcher,
const WordUnit & wu,
const SemanticContext & context,
double thres,
char method )
protected

Definition at line 144 of file WordSenseAnnotation.cpp.

◆ classify()

std::set< WordSenseUnit >::iterator Lima::LinguisticProcessing::WordSenseDisambiguation::WordSenseAnnotation::classify ( const WordUnit & wu,
const SemanticContext & context,
const std::map< int, std::map< std::string, double > > & cvListRep,
const double thres,
const char method )
protected

Definition at line 193 of file WordSenseAnnotation.cpp.

◆ computeConfidenceVector()

int Lima::LinguisticProcessing::WordSenseDisambiguation::WordSenseAnnotation::computeConfidenceVector ( const WordUnit & wu,
const NNList & knns,
const SemanticContext::const_iterator itContext,
std::map< int, std::map< std::string, double > > & cvListRep )
protected

Definition at line 281 of file WordSenseAnnotation.cpp.

◆ confidence() [1/2]

float Lima::LinguisticProcessing::WordSenseDisambiguation::WordSenseAnnotation::confidence ( ) const
inline

Definition at line 312 of file WordSenseAnnotation.h.

◆ confidence() [2/2]

void Lima::LinguisticProcessing::WordSenseDisambiguation::WordSenseAnnotation::confidence ( const float newConfidence)
inline

Definition at line 330 of file WordSenseAnnotation.h.

◆ cvCluster()

double Lima::LinguisticProcessing::WordSenseDisambiguation::WordSenseAnnotation::cvCluster ( const std::map< int, std::map< std::string, double > > & cvListRep,
const std::string & relation,
int id_cluster )
protected

cv_cluster_rep: @cv_list_rep: la matrice 'cv_list_rep' (voir fonction précédente) @nb_clusters: nombre de clusters découverts pour le mot @id_relation: numero d'une relation @id_cluster: numero d'un cluster

Return: le vecteur de confiance de 'id_cluster' dans 'id_relation'

Definition at line 367 of file WordSenseAnnotation.cpp.

◆ disambiguate() [1/2]

bool Lima::LinguisticProcessing::WordSenseDisambiguation::WordSenseAnnotation::disambiguate ( const WordUnit & wu)

main functions of the global algorithm (called by WordSenseDisambiguator)

Definition at line 70 of file WordSenseAnnotation.cpp.

◆ disambiguate() [2/2]

bool Lima::LinguisticProcessing::WordSenseDisambiguation::WordSenseAnnotation::disambiguate ( KnnSearcher * searcher,
const WordUnit & wu,
const SemanticContext & context,
double thres,
char method )

Definition at line 110 of file WordSenseAnnotation.cpp.

◆ dump()

void Lima::LinguisticProcessing::WordSenseDisambiguation::WordSenseAnnotation::dump ( std::ostream & os)
inline

Definition at line 338 of file WordSenseAnnotation.h.

◆ isDisambiguated()

bool Lima::LinguisticProcessing::WordSenseDisambiguation::WordSenseAnnotation::isDisambiguated ( ) const

general test functions

Definition at line 60 of file WordSenseAnnotation.cpp.

◆ mapping() [1/2]

std::string Lima::LinguisticProcessing::WordSenseDisambiguation::WordSenseAnnotation::mapping ( )
inline

Definition at line 284 of file WordSenseAnnotation.h.

◆ mapping() [2/2]

const std::string Lima::LinguisticProcessing::WordSenseDisambiguation::WordSenseAnnotation::mapping ( ) const
inline

Definition at line 298 of file WordSenseAnnotation.h.

◆ mode() [1/2]

std::string Lima::LinguisticProcessing::WordSenseDisambiguation::WordSenseAnnotation::mode ( )
inline

Definition at line 244 of file WordSenseAnnotation.h.

◆ mode() [2/2]

const std::string Lima::LinguisticProcessing::WordSenseDisambiguation::WordSenseAnnotation::mode ( ) const
inline

Definition at line 264 of file WordSenseAnnotation.h.

◆ morphVertex() [1/3]

LinguisticGraphVertex Lima::LinguisticProcessing::WordSenseDisambiguation::WordSenseAnnotation::morphVertex ( )
inline

Definition at line 317 of file WordSenseAnnotation.h.

◆ morphVertex() [2/3]

LinguisticGraphVertex Lima::LinguisticProcessing::WordSenseDisambiguation::WordSenseAnnotation::morphVertex ( ) const
inline

Definition at line 321 of file WordSenseAnnotation.h.

◆ morphVertex() [3/3]

void Lima::LinguisticProcessing::WordSenseDisambiguation::WordSenseAnnotation::morphVertex ( LinguisticGraphVertex v)
inline

Definition at line 334 of file WordSenseAnnotation.h.

◆ operator=()

WordSenseAnnotation & Lima::LinguisticProcessing::WordSenseDisambiguation::WordSenseAnnotation::operator= ( const WordSenseAnnotation & wsa)
inline

Definition at line 94 of file WordSenseAnnotation.h.

◆ outputXml()

void Lima::LinguisticProcessing::WordSenseDisambiguation::WordSenseAnnotation::outputXml ( std::ostream & xmlStream,
const LinguisticGraph & g ) const
virtual

Definition at line 465 of file WordSenseAnnotation.cpp.

◆ retrieveSense()

void Lima::LinguisticProcessing::WordSenseDisambiguation::WordSenseAnnotation::retrieveSense ( std::set< WordSenseUnit >::iterator itSenses)
protected

Definition at line 438 of file WordSenseAnnotation.cpp.

◆ senseId() [1/3]

uint64_t Lima::LinguisticProcessing::WordSenseDisambiguation::WordSenseAnnotation::senseId ( )
inline

Definition at line 226 of file WordSenseAnnotation.h.

◆ senseId() [2/3]

uint64_t Lima::LinguisticProcessing::WordSenseDisambiguation::WordSenseAnnotation::senseId ( ) const
inline

Definition at line 230 of file WordSenseAnnotation.h.

◆ senseId() [3/3]

void Lima::LinguisticProcessing::WordSenseDisambiguation::WordSenseAnnotation::senseId ( uint64_t newSenseId)
inline

◆ senseTag() [1/2]

std::string Lima::LinguisticProcessing::WordSenseDisambiguation::WordSenseAnnotation::senseTag ( )
inline

Definition at line 234 of file WordSenseAnnotation.h.

◆ senseTag() [2/2]

std::string Lima::LinguisticProcessing::WordSenseDisambiguation::WordSenseAnnotation::senseTag ( ) const
inline

Definition at line 240 of file WordSenseAnnotation.h.

◆ sumCvCluster()

double Lima::LinguisticProcessing::WordSenseDisambiguation::WordSenseAnnotation::sumCvCluster ( std::map< int, std::map< std::string, double > > & cvListRep,
std::string relation )
protected

sum_cv_cluster_rep: @cv_list_rep: la matrice 'cv_list_rep' (voir fonction précédente) @nb_clusters: nombre de clusters découverts pour le mot @id_relation: numero d'une relation

Return: la somme des vecteurs de confiance de chacun des clusters dans 'id_relation'

Definition at line 380 of file WordSenseAnnotation.cpp.

◆ sumLogCv()

double Lima::LinguisticProcessing::WordSenseDisambiguation::WordSenseAnnotation::sumLogCv ( const std::map< int, std::map< std::string, double > > & cvListRep,
const std::string & relation )
protected

Definition at line 394 of file WordSenseAnnotation.cpp.

◆ sumLogCvList()

double Lima::LinguisticProcessing::WordSenseDisambiguation::WordSenseAnnotation::sumLogCvList ( const std::map< int, std::map< std::string, double > > & cvListRep)
protected

Definition at line 420 of file WordSenseAnnotation.cpp.

◆ writeAnnotation()

AnnotationGraphVertex Lima::LinguisticProcessing::WordSenseDisambiguation::WordSenseAnnotation::writeAnnotation ( Common::AnnotationGraphs::AnnotationData * ad) const

Creation of an annotation for the object WordSenseAnnotation

Creation of a new vertex (a new annotation anchor) in the annotation graph.

Definition at line 448 of file WordSenseAnnotation.cpp.

◆ operator<<

LIMA_WORDSENSEANALYSIS_EXPORT std::ostream & operator<< ( std::ostream & os,
const WordSenseAnnotation & wsa )
friend

Definition at line 480 of file WordSenseAnnotation.cpp.

Member Data Documentation

◆ m_confidence

float Lima::LinguisticProcessing::WordSenseDisambiguation::WordSenseAnnotation::m_confidence
protected

Definition at line 217 of file WordSenseAnnotation.h.

◆ m_mapping

Mapping Lima::LinguisticProcessing::WordSenseDisambiguation::WordSenseAnnotation::m_mapping
protected

Definition at line 216 of file WordSenseAnnotation.h.

◆ m_mode

Mode Lima::LinguisticProcessing::WordSenseDisambiguation::WordSenseAnnotation::m_mode
protected

Definition at line 215 of file WordSenseAnnotation.h.

◆ m_morphVertex

LinguisticGraphVertex Lima::LinguisticProcessing::WordSenseDisambiguation::WordSenseAnnotation::m_morphVertex
protected

Definition at line 218 of file WordSenseAnnotation.h.

◆ m_senseTag

std::string Lima::LinguisticProcessing::WordSenseDisambiguation::WordSenseAnnotation::m_senseTag
protected

Definition at line 219 of file WordSenseAnnotation.h.

◆ m_wsu

WordSenseUnit Lima::LinguisticProcessing::WordSenseDisambiguation::WordSenseAnnotation::m_wsu
protected

Definition at line 214 of file WordSenseAnnotation.h.


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