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

An AnalysisData containing a LinguisticGraph with a language and an id. More...

#include <linguisticProcessing/core/LinguisticAnalysisStructure/AnalysisGraph.h>

Inheritance diagram for Lima::LinguisticProcessing::LinguisticAnalysisStructure::AnalysisGraph:
Lima::AnalysisData

Public Member Functions

 AnalysisGraph (const std::string &graphId, MediaId language, bool deleteTokenWhenDestroyed, bool deleteDataWhenDestroyed)
 
 AnalysisGraph (const std::string &graphId, MediaId language, bool deleteTokenWhenDestroyed, bool deleteDataWhenDestroyed, const AnalysisGraph &graph)
 
virtual ~AnalysisGraph ()
 
const LinguisticGraphVertex & firstVertex (void) const
 Returns the first vertex of the graph.
 
const LinguisticGraphVertex & lastVertex (void) const
 Returns the last vertex of the graph.
 
const LinguisticGraph * getGraph (void) const
 Returns the underlying graph structure.
 
LinguisticGraph * getGraph (void)
 Returns the underlying graph structure.
 
const std::string & getGraphId (void) const
 
LinguisticGraphVertex nextMainPathVertex (LinguisticGraphVertex start, const Common::PropertyCode::PropertyAccessor &microAccessor, const std::list< LinguisticCode > microFilters, LinguisticGraphVertex end)
 Finds the next unambiguated vertex for which micro categories are all included in the microFilters list.
 
LinguisticGraphVertex nextChainsBreakFrom (const LinguisticGraphVertex &v, const Common::PropertyCode::PropertyAccessor &macroAccessor, const LinguisticCode &ponctu, const Common::PropertyCode::PropertyAccessor &microAccessor, LinguisticGraphVertex &nextSentenceBreak)
 Finds the next vertex after the input vertex that:
 
void populateAnnotationGraph (Common::AnnotationGraphs::AnnotationData *annotData, const std::string &src)
 Creates the annotations in the agdata corresponding to this graphs vertices.
 
bool ownsTokens () const
 
bool ownsMorphData () const
 
- Public Member Functions inherited from Lima::AnalysisData
virtual ~AnalysisData ()
 

Detailed Description

An AnalysisData containing a LinguisticGraph with a language and an id.

Author
Benoit Mathieu

Definition at line 46 of file AnalysisGraph.h.

Constructor & Destructor Documentation

◆ AnalysisGraph() [1/2]

Lima::LinguisticProcessing::LinguisticAnalysisStructure::AnalysisGraph::AnalysisGraph ( const std::string &  graphId,
MediaId  language,
bool  deleteTokenWhenDestroyed,
bool  deleteDataWhenDestroyed 
)

Definition at line 32 of file AnalysisGraph.cpp.

◆ AnalysisGraph() [2/2]

Lima::LinguisticProcessing::LinguisticAnalysisStructure::AnalysisGraph::AnalysisGraph ( const std::string &  graphId,
MediaId  language,
bool  deleteTokenWhenDestroyed,
bool  deleteDataWhenDestroyed,
const AnalysisGraph &  graph 
)

Definition at line 44 of file AnalysisGraph.cpp.

◆ ~AnalysisGraph()

Lima::LinguisticProcessing::LinguisticAnalysisStructure::AnalysisGraph::~AnalysisGraph ( )
virtual

Definition at line 68 of file AnalysisGraph.cpp.

Member Function Documentation

◆ firstVertex()

const LinguisticGraphVertex & Lima::LinguisticProcessing::LinguisticAnalysisStructure::AnalysisGraph::firstVertex ( void  ) const
inline

Returns the first vertex of the graph.

Returns
LinguisticGraphVertex The first vertex of the graph

Definition at line 63 of file AnalysisGraph.h.

◆ getGraph() [1/2]

LinguisticGraph * Lima::LinguisticProcessing::LinguisticAnalysisStructure::AnalysisGraph::getGraph ( void  )
inline

Returns the underlying graph structure.

Returns
LinguisticGraph* a mutable pointer to the boost graph containing the data

Definition at line 79 of file AnalysisGraph.h.

◆ getGraph() [2/2]

const LinguisticGraph * Lima::LinguisticProcessing::LinguisticAnalysisStructure::AnalysisGraph::getGraph ( void  ) const
inline

Returns the underlying graph structure.

Returns
const LinguisticGraph* a const pointer to the boost graph containing the data

Definition at line 73 of file AnalysisGraph.h.

◆ getGraphId()

const std::string & Lima::LinguisticProcessing::LinguisticAnalysisStructure::AnalysisGraph::getGraphId ( void  ) const
inline

Definition at line 81 of file AnalysisGraph.h.

◆ lastVertex()

const LinguisticGraphVertex & Lima::LinguisticProcessing::LinguisticAnalysisStructure::AnalysisGraph::lastVertex ( void  ) const
inline

Returns the last vertex of the graph.

Returns
LinguisticGraphVertex The last vertex of the graph

Definition at line 67 of file AnalysisGraph.h.

◆ nextChainsBreakFrom()

LinguisticGraphVertex Lima::LinguisticProcessing::LinguisticAnalysisStructure::AnalysisGraph::nextChainsBreakFrom ( const LinguisticGraphVertex &  v,
const Common::PropertyCode::PropertyAccessor &  macroAccessor,
const LinguisticCode &  ponctu,
const Common::PropertyCode::PropertyAccessor &  microAccessor,
LinguisticGraphVertex &  nextSentenceBreak 
)

Finds the next vertex after the input vertex that:

  1. is on a subgraph with no paralel branch ;
  2. is a punctuation (macro category is "ponctu forte") This method should be called after the disambiguation such that the VertexWordProperty is filled.
    Parameters
    vIN LinguisticGraphVertex& The vertex from which to start the search
    gIN LinguisticGraph& The graph containing v
    Returns
    LinguisticGraphVertex The searched vertex or the last one if there is no such vertex
  1. is on a subgraph with no parallel branch ;
  2. is a punctuation (macro category is "ponctu forte") This method should be called after the disambiguation such that the VertexWordProperty is filled.
    Parameters
    vIN LinguisticGraphVertex& The vertex from which to start the search
    gIN LinguisticGraph& The graph containing v
    Returns
    LinguisticGraphVertex The searched vertex or the last one if there is no such vertex

Definition at line 301 of file AnalysisGraph.cpp.

◆ nextMainPathVertex()

LinguisticGraphVertex Lima::LinguisticProcessing::LinguisticAnalysisStructure::AnalysisGraph::nextMainPathVertex ( LinguisticGraphVertex  start,
const Common::PropertyCode::PropertyAccessor &  microAccessor,
const std::list< LinguisticCode >  microFilters,
LinguisticGraphVertex  end 
)

Finds the next unambiguated vertex for which micro categories are all included in the microFilters list.

Returns last vertex if has reached it.

Parameters
startIN vertex from which to start

Definition at line 189 of file AnalysisGraph.cpp.

◆ ownsMorphData()

bool Lima::LinguisticProcessing::LinguisticAnalysisStructure::AnalysisGraph::ownsMorphData ( ) const
inline

Definition at line 130 of file AnalysisGraph.h.

◆ ownsTokens()

bool Lima::LinguisticProcessing::LinguisticAnalysisStructure::AnalysisGraph::ownsTokens ( ) const
inline

Definition at line 128 of file AnalysisGraph.h.

◆ populateAnnotationGraph()

void Lima::LinguisticProcessing::LinguisticAnalysisStructure::AnalysisGraph::populateAnnotationGraph ( Common::AnnotationGraphs::AnnotationData *  annotData,
const std::string &  src 
)

Creates the annotations in the agdata corresponding to this graphs vertices.

Note
The given annotation data should generaly be a new fresh empty one
Parameters
anagraphIN/OUT AnnotationData& The annatation graph data to be populated

Definition at line 397 of file AnalysisGraph.cpp.


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