6#ifndef LIMA_WORDSENSEDISAMBIGUATION_WORDSENSEANNOTATION_H
7#define LIMA_WORDSENSEDISAMBIGUATION_WORDSENSEANNOTATION_H
28namespace AnnotationGraphs {
32namespace LinguisticProcessing
34namespace SyntacticAnalysis {
37namespace WordSenseDisambiguation
64 const float confidence,
69 m_confidence(confidence),
88 m_mapping(wsa.m_mapping),
89 m_confidence(wsa.m_confidence),
90 m_morphVertex(wsa.m_morphVertex),
91 m_senseTag(wsa.m_senseTag)
108 inline uint64_t senseId();
109 inline uint64_t senseId()
const;
110 inline std::string senseTag();
111 inline std::string senseTag()
const;
112 inline std::string mode();
113 inline std::string mapping();
114 inline const std::string mode()
const;
115 inline const std::string mapping()
const;
116 inline float confidence()
const;
122 inline void confidence(
const float newConfidence);
125 inline void dump(std::ostream& os);
128 bool isDisambiguated()
const;
144 bool disambiguate(
const WordUnit& wu);
154 virtual void outputXml(std::ostream& xmlStream,
164 std::set<WordSenseUnit>::iterator classify(
const WordUnit& wu,
166 const std::map<
int, std::map<std::string, double> >& cvListRep,
170 int computeConfidenceVector(
const WordUnit& wu,
172 const SemanticContext::const_iterator itContext,
173 std::map<
int, std::map<std::string, double> >& cvListRep);
185 double cvCluster(
const std::map<
int, std::map<std::string, double> >& cvListRep,
186 const std::string& relation,
197 double sumCvCluster(std::map<
int, std::map<std::string, double> >& cvListRep,
198 std::string relation);
200 double sumLogCv(
const std::map<
int, std::map<std::string, double> >& cvListRep,
201 const std::string& relation);
203 double sumLogCvList(
const std::map<
int, std::map<std::string, double> >& cvListRep);
207 void retrieveSense(std::set<WordSenseUnit>::iterator itSenses);
248 return "b_Most_Frequent";
250 return "b_Romanseval_Most_Frequent";
252 return "b_Jaws_Most_Frequent";
256 return "s_Wsi_Dempster_Schaffer";
268 return "b_Most_Frequent";
270 return "b_Romanseval_Most_Frequent";
272 return "b_Jaws_Most_Frequent";
276 return "s_Wsi_Dempster_Schaffer";
288 return "m_Romanseval_Senses";
290 return "m_Jaws_Senses";
302 return "m_Romanseval_Senses";
304 return "m_Jaws_Senses";
This file is the main header file for the data related to annotation graphs.
A graph that stores the relations of syntactic dependency between the elements of a DependencyGraph.
QDebug & operator<<(QDebug &qd, const std::string &str)
A graph structure for linguistic analysis.
LinguisticGraph::vertex_descriptor LinguisticGraphVertex
boost::adjacency_list< boost::vecS, boost::vecS, boost::bidirectionalS, LinguisticVertexProperties > LinguisticGraph
Property to identify the chains in the graph.
#define LIMA_WORDSENSEANALYSIS_EXPORT
Holds an annotation graph and gives an API to manipulate it.
This class allows to convert any object into an annotation by inheritance.
Definition of a function suitable to be used as a dumper for WordSense Annotations of an Annotation g...
virtual int dump(std::ostream &os, Common::AnnotationGraphs::GenericAnnotation &ga) const override
void dump(std::ostream &os)
WordSenseAnnotation(const Mode mode, const Mapping mapping, const float confidence, LinguisticGraphVertex v)
LinguisticGraphVertex m_morphVertex
AnnotationGraphVertex av()
WordSenseAnnotation & operator=(const WordSenseAnnotation &wsa)
WordSenseAnnotation(const Mode mode, const Mapping mapping, LinguisticGraphVertex v)
WordSenseAnnotation(const WordSenseAnnotation &wsa)
virtual ~WordSenseAnnotation()
AnnotationGraphVertex av() const
LinguisticGraphVertex morphVertex()
void av(AnnotationGraphVertex av)
void senseId(uint64_t newSenseId)
AnnotationGraph::vertex_descriptor AnnotationGraphVertex
@ B_ROMANSEVAL_MOST_FREQUENT
std::map< std::string, std::set< uint64_t > > SemanticContext
std::map< uint64_t, float > NNList