LIMA
Libre Multilingual Analyzer — C++ API
Loading...
Searching...
No Matches
Lima::LinguisticProcessing::SemanticAnalysis::ConllHandler Struct Reference

Public Member Functions

 ConllHandler (MediaId language, AnalysisContent &analysis, LinguisticAnalysisStructure::AnalysisGraph *graph)
 
virtual ~ConllHandler ()
 
bool extractSemanticInformation (int sentenceIndex, LimaConllTokenIdMapping *limaConllMapping, const QString &sentence)
 extract semantic annotations associated to token
 
QStringList splitSegment (const QString &segment, QRegularExpression separator)
 split a text into different types segments
 
LinguisticGraphVertex getLimaTokenId (int conllTokenId, int sentenceIndex, LimaConllTokenIdMapping *limaConllMapping)
 get the lima token id matching any conll token one from the same text
 

Public Attributes

MediaId m_language
 
AnalysisContent & m_analysis
 
LinguisticAnalysisStructure::AnalysisGraph * m_graph
 
QRegularExpression m_descriptorSeparator
 
QRegularExpression m_tokenSeparator
 
QVector< QPair< LinguisticGraphVertex, QString > > m_verbalClasses
 
QVector< std::vector< std::pair< LinguisticGraphVertex, QString > > > m_semanticRoles
 
int m_verbalClassNb
 

Detailed Description

Definition at line 61 of file SemanticRoleLabelingLoader.cpp.

Constructor & Destructor Documentation

◆ ConllHandler()

Lima::LinguisticProcessing::SemanticAnalysis::ConllHandler::ConllHandler ( MediaId  language,
AnalysisContent &  analysis,
LinguisticAnalysisStructure::AnalysisGraph *  graph 
)

Definition at line 264 of file SemanticRoleLabelingLoader.cpp.

◆ ~ConllHandler()

Lima::LinguisticProcessing::SemanticAnalysis::ConllHandler::~ConllHandler ( )
virtual

Definition at line 275 of file SemanticRoleLabelingLoader.cpp.

Member Function Documentation

◆ extractSemanticInformation()

bool Lima::LinguisticProcessing::SemanticAnalysis::ConllHandler::extractSemanticInformation ( int  sentenceIndex,
LimaConllTokenIdMapping *  limaConllMapping,
const QString &  sentence 
)

extract semantic annotations associated to token

Parameters
sentenceIndexthe index of the current sentence
limaConllMappingthe chosen lima conll token id mapping
sentencethe current sentence
Returns
true if any verbal class is found, false otherwise

Definition at line 280 of file SemanticRoleLabelingLoader.cpp.

◆ getLimaTokenId()

LinguisticGraphVertex Lima::LinguisticProcessing::SemanticAnalysis::ConllHandler::getLimaTokenId ( int  conllTokenId,
int  sentenceIndex,
LimaConllTokenIdMapping *  limaConllMapping 
)

get the lima token id matching any conll token one from the same text

Parameters
conllTokenIdthe conll token id one search the matched lima id
sentenceNbthe index of the current sentence
limaConllMappingthe chosen lima conll token id mapping
Returns
the lima token id
Note
function to put in the LimaConllTokenIdMapping class?

Definition at line 376 of file SemanticRoleLabelingLoader.cpp.

◆ splitSegment()

QStringList Lima::LinguisticProcessing::SemanticAnalysis::ConllHandler::splitSegment ( const QString &  segment,
QRegularExpression  separator 
)

split a text into different types segments

Parameters
segmentthe segment to split
separatorthe separator used to split
Returns
the segment split

Definition at line 365 of file SemanticRoleLabelingLoader.cpp.

Member Data Documentation

◆ m_analysis

AnalysisContent& Lima::LinguisticProcessing::SemanticAnalysis::ConllHandler::m_analysis

Definition at line 95 of file SemanticRoleLabelingLoader.cpp.

◆ m_descriptorSeparator

QRegularExpression Lima::LinguisticProcessing::SemanticAnalysis::ConllHandler::m_descriptorSeparator

Definition at line 97 of file SemanticRoleLabelingLoader.cpp.

◆ m_graph

LinguisticAnalysisStructure::AnalysisGraph* Lima::LinguisticProcessing::SemanticAnalysis::ConllHandler::m_graph

Definition at line 96 of file SemanticRoleLabelingLoader.cpp.

◆ m_language

MediaId Lima::LinguisticProcessing::SemanticAnalysis::ConllHandler::m_language

Definition at line 94 of file SemanticRoleLabelingLoader.cpp.

◆ m_semanticRoles

QVector< std::vector<std::pair<LinguisticGraphVertex,QString> > > Lima::LinguisticProcessing::SemanticAnalysis::ConllHandler::m_semanticRoles

Definition at line 100 of file SemanticRoleLabelingLoader.cpp.

◆ m_tokenSeparator

QRegularExpression Lima::LinguisticProcessing::SemanticAnalysis::ConllHandler::m_tokenSeparator

Definition at line 98 of file SemanticRoleLabelingLoader.cpp.

◆ m_verbalClasses

QVector< QPair<LinguisticGraphVertex,QString> > Lima::LinguisticProcessing::SemanticAnalysis::ConllHandler::m_verbalClasses

Definition at line 99 of file SemanticRoleLabelingLoader.cpp.

◆ m_verbalClassNb

int Lima::LinguisticProcessing::SemanticAnalysis::ConllHandler::m_verbalClassNb

Definition at line 101 of file SemanticRoleLabelingLoader.cpp.


The documentation for this struct was generated from the following file: