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

build a LTRText with all the tokens from the analysis More...

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

Public Member Functions

 LTRTextBuilder (const MediaId &language, std::shared_ptr< StopList > stopList)
 
void buildLTRTextFrom (const LinguisticGraph &graph, Lima::LinguisticProcessing::SegmentationData *sb, const LinguisticGraphVertex &graphFirstVertex, const LinguisticGraphVertex &graphLastVertex, boost::shared_ptr< Lima::Common::BagOfWords::LTR_Text > textRep, uint64_t offset)
 build a LTRText representation of the analyzed text
 

word selection

****

bool isWordToSelect (const Lima::LimaString &lemma, LinguisticCode macroCategory) const
 
bool isWordToSelect (const Lima::LimaString &lemma, LinguisticCode macroCategory, LinguisticCode microCategory) const
 

Detailed Description

build a LTRText with all the tokens from the analysis

build a LTR_Text with all the tokens from the analysis

Definition at line 49 of file LTRTextBuilder.h.

Constructor & Destructor Documentation

◆ LTRTextBuilder()

Lima::LinguisticProcessing::AnalysisDumpers::LTRTextBuilder::LTRTextBuilder ( const MediaId &  language,
std::shared_ptr< StopList >  stopList 
)

Definition at line 48 of file LTRTextBuilder.cpp.

Member Function Documentation

◆ buildLTRTextFrom()

void Lima::LinguisticProcessing::AnalysisDumpers::LTRTextBuilder::buildLTRTextFrom ( const LinguisticGraph &  graph,
Lima::LinguisticProcessing::SegmentationData *  sb,
const LinguisticGraphVertex &  graphFirstVertex,
const LinguisticGraphVertex &  graphLastVertex,
boost::shared_ptr< Lima::Common::BagOfWords::LTR_Text >  textRep,
uint64_t  offset 
)

build a LTRText representation of the analyzed text

Parameters
graphthe linguistic graph containing the analyzed text
sba pointer on the sentence boundaries segmentation data: if zero, sentence boundaries are ignored, all text is treated as a single segment
graphFirstVertexthe first vertex of the text in the linguistic graph (needed when sb==0)
graphLastVertexthe last vertex of the text in the linguistic graph (for last segment)
textRepthe LTRText built
offsetthe offset of the text in the document (to have a global correct position)

Definition at line 64 of file LTRTextBuilder.cpp.

◆ isWordToSelect() [1/2]

bool Lima::LinguisticProcessing::AnalysisDumpers::LTRTextBuilder::isWordToSelect ( const Lima::LimaString &  lemma,
LinguisticCode  macroCategory 
) const

Definition at line 263 of file LTRTextBuilder.cpp.

◆ isWordToSelect() [2/2]

bool Lima::LinguisticProcessing::AnalysisDumpers::LTRTextBuilder::isWordToSelect ( const Lima::LimaString &  lemma,
LinguisticCode  macroCategory,
LinguisticCode  microCategory 
) const

Definition at line 251 of file LTRTextBuilder.cpp.


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