LIMA
Libre Multilingual Analyzer — C++ API
Loading...
Searching...
No Matches
Lima::LinguisticProcessing::AbstractLinguisticProcessingClient Class Referenceabstract

AbstractLinguisticProcessingClient defines the common interface that provides all the services of the LIMA linguistic analyzer. More...

#include <linguisticProcessing/client/AbstractLinguisticProcessingClient.h>

Inheritance diagram for Lima::LinguisticProcessing::AbstractLinguisticProcessingClient:
Lima::AbstractProcessingClient Lima::LinguisticProcessing::CoreLinguisticProcessingClient

Public Member Functions

virtual ~AbstractLinguisticProcessingClient ()
 define a virtual destructor to ensure concrete client destructors to be called
 
virtual std::shared_ptr< AnalysisContent > analyze (const QString &text, const std::map< std::string, std::string > &metaData, const std::string &pipeline, const std::map< std::string, AbstractAnalysisHandler * > &handlers, const std::set< std::string > &inactiveUnits=std::set< std::string >()) const =0
 This function runs the linguistic analysis on a simple text, specifying the language, the pipeline and the expected resultType.
 
virtual std::shared_ptr< AnalysisContent > analyze (const std::string &text, const std::map< std::string, std::string > &metaData, const std::string &pipeline, const std::map< std::string, AbstractAnalysisHandler * > &handlers, const std::set< std::string > &inactiveUnits=std::set< std::string >()) const override=0
 This function is the same as the previous one but takes a text in UTF-8 format.
 
- Public Member Functions inherited from Lima::AbstractProcessingClient
virtual ~AbstractProcessingClient ()
 Define the destructor virtual to ensure concrete client destructors to be called.
 

Detailed Description

AbstractLinguisticProcessingClient defines the common interface that provides all the services of the LIMA linguistic analyzer.

It is implemented in several clients: at least one client that implements the core treatment and links with the dynamic library, and also clients that can wrap, with the same interface local clients that communicate with a LIMA server (e.g. CORBA client), or clients that embed the core processing in a more complex one, such as the parsing of complex XML files.

Definition at line 39 of file AbstractLinguisticProcessingClient.h.

Constructor & Destructor Documentation

◆ ~AbstractLinguisticProcessingClient()

virtual Lima::LinguisticProcessing::AbstractLinguisticProcessingClient::~AbstractLinguisticProcessingClient ( )
inlinevirtual

define a virtual destructor to ensure concrete client destructors to be called

Definition at line 48 of file AbstractLinguisticProcessingClient.h.

Member Function Documentation

◆ analyze() [1/2]

virtual std::shared_ptr< AnalysisContent > Lima::LinguisticProcessing::AbstractLinguisticProcessingClient::analyze ( const QString &  text,
const std::map< std::string, std::string > &  metaData,
const std::string &  pipeline,
const std::map< std::string, AbstractAnalysisHandler * > &  handlers,
const std::set< std::string > &  inactiveUnits = std::set< std::string >() 
) const
pure virtual

This function runs the linguistic analysis on a simple text, specifying the language, the pipeline and the expected resultType.

Parameters
textthe text to analyze in LimaString format (LimaString format is an internal UTF16 format, functions to convert from UTF8 to/from LimaString are available in Lima::Common::Misc)
metaDatasome metadata used by the analyzer: the minimal metadata required is
  • 'FileName' : filename (used to generate file log names)
  • 'Lang' : language as string in a 3-letter format (following the ISO 639-2 code): 'fre','eng',...
pipelinethe name of the analysis pipeline to use (an analysis pipeline is a chain of processUnit). Possible pipelines are defined in the lima-analysis.xml configuration file. Their implementations are defined in the language-specific configuration files lima-lp-xxx.xml (where xxx is the 3-letter code of the language). The pipeline must have been configured in the configuration of the LinguisticProcessingClientFactory.

Implemented in Lima::LinguisticProcessing::CoreLinguisticProcessingClient.

◆ analyze() [2/2]

virtual std::shared_ptr< AnalysisContent > Lima::LinguisticProcessing::AbstractLinguisticProcessingClient::analyze ( const std::string &  text,
const std::map< std::string, std::string > &  metaData,
const std::string &  pipeline,
const std::map< std::string, AbstractAnalysisHandler * > &  handlers,
const std::set< std::string > &  inactiveUnits = std::set< std::string >() 
) const
overridepure virtual

This function is the same as the previous one but takes a text in UTF-8 format.

Implements Lima::AbstractProcessingClient.

Implemented in Lima::LinguisticProcessing::CoreLinguisticProcessingClient.


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