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

#include <linguisticProcessing/client/AnalysisHandlers/BowDocumentHandler.h>

Inheritance diagram for Lima::LinguisticProcessing::BowDocumentHandler:
Lima::AbstractTextualAnalysisHandler Lima::LinguisticProcessing::AbstractResource Lima::AbstractXmlAnalysisHandler Lima::LinguisticProcessing::AbstractResourceBase Lima::InitializableObject< AbstractResource, ResourceInitializationParameters > Lima::AbstractAnalysisHandler Lima::AnalysisData

Public Member Functions

 BowDocumentHandler ()
 
virtual ~BowDocumentHandler ()
 
void startDocument (const Common::Misc::GenericDocumentProperties &props) override
 notify the start of a new document
 
void endDocument () override
 notify the end of the document
 
void startAnalysis () override
 notify the start of an analysis content
 
void endAnalysis () override
 notify the end of an analysis content
 
void handle (const char *buf, int length) override
 gives content.
 
std::string getSBoWContent () const
 
const std::vector< Common::BagOfWords::BoWDocument > & getBoWDocuments () const
 
void startNode (const std::string &elementName, bool forIndexing) override
 notify the start of a new hierarchyNode
 
void endNode (const Common::Misc::GenericDocumentProperties &props) override
 notify the end of a hierarchyNode
 
virtual void setOut (std::ostream *out) override
 set the output stream.
 
- Public Member Functions inherited from Lima::AbstractTextualAnalysisHandler
 AbstractTextualAnalysisHandler ()
 
virtual ~AbstractTextualAnalysisHandler ()
 
virtual void init (Common::XMLConfigurationFiles::GroupConfigurationStructure &unitConfiguration, Manager *manager) override
 initialize with parameters from configuration file.
 
virtual const std::string & suffix () const
 
virtual void setSuffix (const std::string &suffix)
 
- Public Member Functions inherited from Lima::LinguisticProcessing::AbstractResource
 AbstractResource (QObject *parent=0)
 
virtual ~AbstractResource ()
 
 AbstractResource (const AbstractResource &)
 
virtual void init (Common::XMLConfigurationFiles::GroupConfigurationStructure &unitConfiguration, Manager *manager) override=0
 initialize with parameters from configuration file.
 
- Public Member Functions inherited from Lima::LinguisticProcessing::AbstractResourceBase
 AbstractResourceBase (QObject *parent=0)
 
virtual ~AbstractResourceBase ()
 
 AbstractResourceBase (const AbstractResourceBase &)
 
QString getResourceFileName (const QString &paramName)
 
- Public Member Functions inherited from Lima::InitializableObject< AbstractResource, ResourceInitializationParameters >
 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
 
- Public Member Functions inherited from Lima::AbstractXmlAnalysisHandler
 AbstractXmlAnalysisHandler (std::shared_ptr< const ShiftFrom > shiftFrom)
 
virtual ~AbstractXmlAnalysisHandler ()
 
std::shared_ptr< const ShiftFrom > shiftFrom () const
 
- Public Member Functions inherited from Lima::AbstractAnalysisHandler
virtual ~AbstractAnalysisHandler ()
 
- Public Member Functions inherited from Lima::AnalysisData
virtual ~AnalysisData ()
 

Additional Inherited Members

- Public Types inherited from Lima::InitializableObject< AbstractResource, ResourceInitializationParameters >
typedef InitializableObjectManager< AbstractResource, ResourceInitializationParameters > Manager
 Manager is the type of the Manager associated to the initializableObject.
 
typedef InitializableObjectFactory< AbstractResource > Factory
 Factory is the type of the Factory associated to the initializableObject.
 
- Signals inherited from Lima::LinguisticProcessing::AbstractResourceBase
void resourceFileChanged (const QString &path)
 Signal triggered whenever one of the registered files changes on disk.
 
- Protected Member Functions inherited from Lima::LinguisticProcessing::AbstractResourceBase
LimaFileSystemWatcher & resourceFileWatcher ()
 Accessor to the file watcher used to register resource files to be watched for changes.
 
- Protected Attributes inherited from Lima::LinguisticProcessing::AbstractResourceBase
AbstractResourceBasePrivate * m_d
 
- Protected Attributes inherited from Lima::InitializableObject< AbstractResource, ResourceInitializationParameters >
std::string m_id
 

Detailed Description

Author
Benoit Mathieu

Definition at line 28 of file BowDocumentHandler.h.

Constructor & Destructor Documentation

◆ BowDocumentHandler()

Lima::LinguisticProcessing::BowDocumentHandler::BowDocumentHandler ( )

Definition at line 21 of file BowDocumentHandler.cpp.

◆ ~BowDocumentHandler()

Lima::LinguisticProcessing::BowDocumentHandler::~BowDocumentHandler ( )
virtual

Definition at line 29 of file BowDocumentHandler.cpp.

Member Function Documentation

◆ endAnalysis()

void Lima::LinguisticProcessing::BowDocumentHandler::endAnalysis ( )
overridevirtual

notify the end of an analysis content

Implements Lima::AbstractAnalysisHandler.

Definition at line 104 of file BowDocumentHandler.cpp.

◆ endDocument()

void Lima::LinguisticProcessing::BowDocumentHandler::endDocument ( )
overridevirtual

notify the end of the document

Implements Lima::AbstractXmlAnalysisHandler.

Definition at line 52 of file BowDocumentHandler.cpp.

◆ endNode()

void Lima::LinguisticProcessing::BowDocumentHandler::endNode ( const Common::Misc::GenericDocumentProperties &  props)
overridevirtual

notify the end of a hierarchyNode

Implements Lima::AbstractXmlAnalysisHandler.

Definition at line 90 of file BowDocumentHandler.cpp.

◆ getBoWDocuments()

const std::vector< Common::BagOfWords::BoWDocument > & Lima::LinguisticProcessing::BowDocumentHandler::getBoWDocuments ( ) const
inline

Definition at line 53 of file BowDocumentHandler.h.

◆ getSBoWContent()

std::string Lima::LinguisticProcessing::BowDocumentHandler::getSBoWContent ( ) const

Definition at line 33 of file BowDocumentHandler.cpp.

◆ handle()

void Lima::LinguisticProcessing::BowDocumentHandler::handle ( const char *  buf,
int  length 
)
overridevirtual

gives content.

Content is a serialized form of the expected resultType

Implements Lima::AbstractXmlAnalysisHandler.

Definition at line 111 of file BowDocumentHandler.cpp.

◆ setOut()

virtual void Lima::LinguisticProcessing::BowDocumentHandler::setOut ( std::ostream *  out)
inlineoverridevirtual

set the output stream.

Implementations can be empty if the handler should not write its output to a stream

Implements Lima::AbstractXmlAnalysisHandler.

Definition at line 64 of file BowDocumentHandler.h.

◆ startAnalysis()

void Lima::LinguisticProcessing::BowDocumentHandler::startAnalysis ( )
overridevirtual

notify the start of an analysis content

Implements Lima::AbstractAnalysisHandler.

Definition at line 97 of file BowDocumentHandler.cpp.

◆ startDocument()

void Lima::LinguisticProcessing::BowDocumentHandler::startDocument ( const Common::Misc::GenericDocumentProperties &  props)
overridevirtual

notify the start of a new document

Implements Lima::AbstractXmlAnalysisHandler.

Definition at line 41 of file BowDocumentHandler.cpp.

◆ startNode()

void Lima::LinguisticProcessing::BowDocumentHandler::startNode ( const std::string &  elementName,
bool  forIndexing 
)
overridevirtual

notify the start of a new hierarchyNode

Implements Lima::AbstractXmlAnalysisHandler.

Definition at line 82 of file BowDocumentHandler.cpp.


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