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

Parameters retrived in the configuration file: More...

#include <linguisticProcessing/core/AnalysisDumpers/BowGeneration.h>

Public Member Functions

 BowGenerator ()
 
virtual ~BowGenerator ()
 
 BowGenerator (const BowGenerator &)=delete
 
BowGenerator & operator= (const BowGenerator &)=delete
 
void init (Common::XMLConfigurationFiles::GroupConfigurationStructure &unitConfiguration, MediaId language)
 
std::vector< std::pair< boost::shared_ptr< Common::BagOfWords::BoWRelation >, boost::shared_ptr< Common::BagOfWords::BoWToken > > > buildTermFor (const AnnotationGraphVertex &vx, const AnnotationGraphVertex &tgt, const LinguisticGraph &anagraph, const LinguisticGraph &posgraph, const uint64_t offset, const SyntacticAnalysis::SyntacticData *syntacticData, const Common::AnnotationGraphs::AnnotationData *annotationData, std::set< LinguisticGraphVertex > &visited) const
 Creates the terms reachable from the given annotation vertex.
 
std::vector< std::pair< boost::shared_ptr< Common::BagOfWords::BoWRelation >, boost::shared_ptr< Common::BagOfWords::AbstractBoWElement > > > createAbstractBoWElement (const LinguisticGraphVertex v, const LinguisticGraph &anagraph, const LinguisticGraph &posgraph, const uint64_t offsetBegin, const Common::AnnotationGraphs::AnnotationData *annotationData, std::set< LinguisticGraphVertex > &visited, bool keepAnyway=false) const
 
QList< boost::shared_ptr< Common::BagOfWords::BoWPredicate > > createSemanticRelationPredicate (const LinguisticGraphVertex &lgvs, const AnnotationGraphVertex &agvs, const AnnotationGraphVertex &agvt, const SemanticAnalysis::SemanticRelationAnnotation &annot, const Common::AnnotationGraphs::AnnotationData *annotationData, const LinguisticGraph &anagraph, const LinguisticGraph &posgraph, uint64_t offset, std::set< LinguisticGraphVertex > &visited, bool keepAnyway) const
 Builds a BoWPredicate corresponding to a semantic relation (an edge in the annotation graph holding a SemanticRelation annotation.
 
boost::shared_ptr< Common::BagOfWords::BoWNamedEntity > createSpecificEntity (const LinguisticGraphVertex &vertex, const AnnotationGraphVertex &v, const Common::AnnotationGraphs::AnnotationData *annotationData, const LinguisticGraph &anagraph, const LinguisticGraph &posgraph, const uint64_t offset, bool frompos) const
 

Friends

class BowGeneratorPrivate
 

Detailed Description

Parameters retrived in the configuration file:

  • useStopList
  • stopList
  • useEmptyMacro
  • useEmptyMicro
  • NEmacroCategories : the list of categories associated to the entities types
  • properNounCategory
  • commonNounCategory
  • keepAllNamedEntityParts
  • NEnormalization
  • group : the entities group to use to find the enities names (optional, default is SpecificEntities)
    Author
    Gael de Chalendar

Definition at line 73 of file BowGeneration.h.

Constructor & Destructor Documentation

◆ BowGenerator() [1/2]

Lima::LinguisticProcessing::Compounds::BowGenerator::BowGenerator ( )

Definition at line 226 of file BowGeneration.cpp.

◆ ~BowGenerator()

Lima::LinguisticProcessing::Compounds::BowGenerator::~BowGenerator ( )
virtual

Definition at line 231 of file BowGeneration.cpp.

◆ BowGenerator() [2/2]

Lima::LinguisticProcessing::Compounds::BowGenerator::BowGenerator ( const BowGenerator &  )
delete

Member Function Documentation

◆ buildTermFor()

std::vector< std::pair< boost::shared_ptr< BoWRelation >, boost::shared_ptr< BoWToken > > > Lima::LinguisticProcessing::Compounds::BowGenerator::buildTermFor ( const AnnotationGraphVertex &  vx,
const AnnotationGraphVertex &  tgt,
const LinguisticGraph &  anagraph,
const LinguisticGraph &  posgraph,
const uint64_t  offset,
const SyntacticAnalysis::SyntacticData *  syntacticData,
const Common::AnnotationGraphs::AnnotationData *  annotationData,
std::set< LinguisticGraphVertex > &  visited 
) const

Creates the terms reachable from the given annotation vertex.

Supposes that all edges pointing to vx are edges to be used in the term Builds terms for vertex vx, possibly extension of vertex tgt. If this is the case, the edge between vx and tgt is used to build the BoWRelations of the returned vector

Definition at line 353 of file BowGeneration.cpp.

◆ createAbstractBoWElement()

std::vector< std::pair< boost::shared_ptr< BoWRelation >, boost::shared_ptr< AbstractBoWElement > > > Lima::LinguisticProcessing::Compounds::BowGenerator::createAbstractBoWElement ( const LinguisticGraphVertex  v,
const LinguisticGraph &  anagraph,
const LinguisticGraph &  posgraph,
const uint64_t  offsetBegin,
const Common::AnnotationGraphs::AnnotationData *  annotationData,
std::set< LinguisticGraphVertex > &  visited,
bool  keepAnyway = false 
) const

Definition at line 708 of file BowGeneration.cpp.

◆ createSemanticRelationPredicate()

QList< boost::shared_ptr< Common::BagOfWords::BoWPredicate > > Lima::LinguisticProcessing::Compounds::BowGenerator::createSemanticRelationPredicate ( const LinguisticGraphVertex &  lgvs,
const AnnotationGraphVertex &  agvs,
const AnnotationGraphVertex &  agvt,
const SemanticAnalysis::SemanticRelationAnnotation &  annot,
const Common::AnnotationGraphs::AnnotationData *  annotationData,
const LinguisticGraph &  anagraph,
const LinguisticGraph &  posgraph,
uint64_t  offset,
std::set< LinguisticGraphVertex > &  visited,
bool  keepAnyway 
) const

Builds a BoWPredicate corresponding to a semantic relation (an edge in the annotation graph holding a SemanticRelation annotation.

Note that if several semantic relations hold between the source and target vertices, then the annotation type value is the comma-concatenated list of the semantic relations ids

Parameters
lgvssource linguistic graph vertex
agvssource annotation graph vertex matching lgvs
agvttarget annotation graph vertex of the relation
annotthe semantic relation itself (holding its type)

Definition at line 1473 of file BowGeneration.cpp.

◆ createSpecificEntity()

boost::shared_ptr< BoWNamedEntity > Lima::LinguisticProcessing::Compounds::BowGenerator::createSpecificEntity ( const LinguisticGraphVertex &  vertex,
const AnnotationGraphVertex &  v,
const Common::AnnotationGraphs::AnnotationData *  annotationData,
const LinguisticGraph &  anagraph,
const LinguisticGraph &  posgraph,
const uint64_t  offset,
bool  frompos 
) const

Definition at line 1175 of file BowGeneration.cpp.

◆ init()

void Lima::LinguisticProcessing::Compounds::BowGenerator::init ( Common::XMLConfigurationFiles::GroupConfigurationStructure &  unitConfiguration,
MediaId  language 
)

Definition at line 236 of file BowGeneration.cpp.

◆ operator=()

BowGenerator & Lima::LinguisticProcessing::Compounds::BowGenerator::operator= ( const BowGenerator &  )
delete

Friends And Related Symbol Documentation

◆ BowGeneratorPrivate

friend class BowGeneratorPrivate
friend

Definition at line 75 of file BowGeneration.h.


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