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

This class is a processing unit that can be inserted in an analysis pipeline. More...

#include <linguisticProcessing/core/SyntacticAnalysis/SyntacticAnalyzer-nochains.h>

Inheritance diagram for Lima::LinguisticProcessing::SyntacticAnalysis::SyntacticAnalyzerNoChains:
Lima::MediaProcessUnit Lima::AbstractProcessUnit< MediaProcessUnit, MediaProcessUnitInitializationParameters > Lima::InitializableObject< Base, InitializationParameters >

Public Member Functions

 SyntacticAnalyzerNoChains ()
 Default constructor.
 
virtual ~SyntacticAnalyzerNoChains ()
 Default destructor.
 
void init (Common::XMLConfigurationFiles::GroupConfigurationStructure &unitConfiguration, Manager *manager) override
 Process unit initialization function.
 
LimaStatusCode process (AnalysisContent &analysis) const override
 Process unit main processing function.
 
void identifyChains (SyntacticData *data, const LinguisticGraphVertex &s, const LinguisticGraphVertex &t, uint64_t &startChainId) const
 First step of the syntactic analysis.
 
MediaId language () const
 Read accessor to the language of the analyzed text.
 
- Public Member Functions inherited from Lima::InitializableObject< Base, InitializationParameters >
 InitializableObject ()
 
 InitializableObject (const InitializableObject &object)
 
InitializableObject & operator= (const InitializableObject &object)
 
virtual ~InitializableObject ()
 
const std::string & getId () const
 get the object id
 
void setId (const std::string &id)
 set the object id
 

Protected Attributes

MediaId m_language
 The language of the analyzed text.
 
std::shared_ptr< SyntagmDefStruct > m_chainMatrix
 A pointer onto the chains definition matrices.
 
uint64_t m_maxChainsNbByVertex
 Sets the max number of chains on one vertex.
 
uint64_t m_maxChainLength
 Sets the max length of a chain.
 
const Common::PropertyCode::PropertyAccessor * m_macroAccessor
 
const Common::PropertyCode::PropertyAccessor * m_microAccessor
 
LinguisticCode m_ponctuCategory
 
- Protected Attributes inherited from Lima::InitializableObject< Base, InitializationParameters >
std::string m_id
 

Additional Inherited Members

- Public Types inherited from Lima::InitializableObject< Base, InitializationParameters >
typedef InitializableObjectManager< Base, InitializationParameters > Manager
 Manager is the type of the Manager associated to the initializableObject.
 
typedef InitializableObjectFactory< Base > Factory
 Factory is the type of the Factory associated to the initializableObject.
 

Detailed Description

This class is a processing unit that can be inserted in an analysis pipeline.

It builds the nominal and verbal chains.

This is the first step of the syntactic analysis. It works on a pointer to a graph holding all syntactic data. Nominal and verbal chains are maximal syntagms linking together words related to, repectively, a noun and a verb. They have no real linguistic validity but are useful to find compounds

It is a MediaProcessUnit. It accepts the following parameters:

  • param:chainMatrix :
  • param:maxChainsNbByVertex :
  • param:maxChainLength :
  • param:ponctuCategory :

Definition at line 56 of file SyntacticAnalyzer-nochains.h.

Constructor & Destructor Documentation

◆ SyntacticAnalyzerNoChains()

Lima::LinguisticProcessing::SyntacticAnalysis::SyntacticAnalyzerNoChains::SyntacticAnalyzerNoChains ( )

Default constructor.

Nothing to do.

Definition at line 46 of file SyntacticAnalyzer-nochains.cpp.

◆ ~SyntacticAnalyzerNoChains()

virtual Lima::LinguisticProcessing::SyntacticAnalysis::SyntacticAnalyzerNoChains::~SyntacticAnalyzerNoChains ( )
inlinevirtual

Default destructor.

Nothing to do.

Definition at line 70 of file SyntacticAnalyzer-nochains.h.

Member Function Documentation

◆ identifyChains()

void Lima::LinguisticProcessing::SyntacticAnalysis::SyntacticAnalyzerNoChains::identifyChains ( SyntacticData *  data,
const LinguisticGraphVertex &  s,
const LinguisticGraphVertex &  t,
uint64_t &  startChainId 
) const

First step of the syntactic analysis.

Identify nominal and verbal chains in the subgraph defined by the given two vertices.

Parameters
sIN const LinguisticGraphVertex& The source vertex from which chains will be searched for
tIN const LinguisticGraphVertex& The target vertex after which chains will not be searched for
startChainIdIN/OUT uint64_t& The first chain id to use for new chains. Given by reference to be able to update the value in the caller.

Definition at line 165 of file SyntacticAnalyzer-nochains.cpp.

◆ init()

void Lima::LinguisticProcessing::SyntacticAnalysis::SyntacticAnalyzerNoChains::init ( Common::XMLConfigurationFiles::GroupConfigurationStructure &  unitConfiguration,
Manager *  manager 
)
overridevirtual

Process unit initialization function.

Parameters
unitConfigurationIN GroupConfigurationStructure& Reference to this process unit configuration group in the configuration.
managerIN Manager* Process unit manager.
Exceptions
InvalidConfiguration,std::exception

Implements Lima::MediaProcessUnit.

Definition at line 52 of file SyntacticAnalyzer-nochains.cpp.

◆ language()

MediaId Lima::LinguisticProcessing::SyntacticAnalysis::SyntacticAnalyzerNoChains::language ( ) const
inline

Read accessor to the language of the analyzed text.

Returns

Definition at line 264 of file SyntacticAnalyzer-nochains.h.

◆ process()

LimaStatusCode Lima::LinguisticProcessing::SyntacticAnalysis::SyntacticAnalyzerNoChains::process ( AnalysisContent &  analysis) const
overridevirtual

Process unit main processing function.

Parameters
analysisIN/OUT AnalysisContent& Reference to the structure holding the analysis data
Returns
LimaStatusCode The status of the process unit processing (success or failing).

Implements Lima::MediaProcessUnit.

Definition at line 106 of file SyntacticAnalyzer-nochains.cpp.

Member Data Documentation

◆ m_chainMatrix

std::shared_ptr<SyntagmDefStruct> Lima::LinguisticProcessing::SyntacticAnalysis::SyntacticAnalyzerNoChains::m_chainMatrix
protected

A pointer onto the chains definition matrices.

Only used to initialize the SyntacticData in the process method.

Definition at line 238 of file SyntacticAnalyzer-nochains.h.

◆ m_language

MediaId Lima::LinguisticProcessing::SyntacticAnalysis::SyntacticAnalyzerNoChains::m_language
protected

The language of the analyzed text.

Definition at line 232 of file SyntacticAnalyzer-nochains.h.

◆ m_macroAccessor

const Common::PropertyCode::PropertyAccessor* Lima::LinguisticProcessing::SyntacticAnalysis::SyntacticAnalyzerNoChains::m_macroAccessor
protected

Definition at line 259 of file SyntacticAnalyzer-nochains.h.

◆ m_maxChainLength

uint64_t Lima::LinguisticProcessing::SyntacticAnalysis::SyntacticAnalyzerNoChains::m_maxChainLength
protected

Sets the max length of a chain.

This is a combinatorial explosion limiter parameter. A soon as a chain length reach the value of this member, it will no be authorized to be longer. It is then validated or reduced up to the last chain end vertex. It is initialized by the syntactic analysis maxChainLength configuration parameter or has a default value.

Definition at line 257 of file SyntacticAnalyzer-nochains.h.

◆ m_maxChainsNbByVertex

uint64_t Lima::LinguisticProcessing::SyntacticAnalysis::SyntacticAnalyzerNoChains::m_maxChainsNbByVertex
protected

Sets the max number of chains on one vertex.

This is a combinatorial explosion limiter parameter. A soon as there is this number of different chains on one vertex, this one will be added in the list of finished vertices. It is initialized by the syntactic analysis maxChainsNbByVertex configuration parameter or has a default value.

Definition at line 247 of file SyntacticAnalyzer-nochains.h.

◆ m_microAccessor

const Common::PropertyCode::PropertyAccessor* Lima::LinguisticProcessing::SyntacticAnalysis::SyntacticAnalyzerNoChains::m_microAccessor
protected

Definition at line 260 of file SyntacticAnalyzer-nochains.h.

◆ m_ponctuCategory

LinguisticCode Lima::LinguisticProcessing::SyntacticAnalysis::SyntacticAnalyzerNoChains::m_ponctuCategory
protected

Definition at line 261 of file SyntacticAnalyzer-nochains.h.


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