LIMA
Libre Multilingual Analyzer — C++ API
Loading...
Searching...
No Matches
LTRTextHandler.h
Go to the documentation of this file.
1// Copyright 2002-2013 CEA LIST
2// SPDX-FileCopyrightText: 2022 CEA LIST <gael.de-chalendar@cea.fr>
3//
4// SPDX-License-Identifier: MIT
5
6/***************************************************************************
7 * Copyright (C) 2004-2012 by CEA LIST *
8 * *
9 ***************************************************************************/
10#ifndef LIMA_LINGUISTICPROCESSINGLTRTEXTHANDLER_H
11#define LIMA_LINGUISTICPROCESSINGLTRTEXTHANDLER_H
12
14
18
19namespace Lima {
20
21namespace LinguisticProcessing {
22
27{
28 Q_OBJECT
29public:
31
32 virtual ~LTRTextHandler();
33
34 virtual void endAnalysis() override;
35 virtual void handle(const char* buf, int length) override ;
36 virtual void startAnalysis() override;
37
39 void endDocument() override;
40 void startNode( const std::string& elementName, bool forIndexing ) override;
41 void endNode(const Common::Misc::GenericDocumentProperties& props) override;
42
44
45 virtual void setOut( std::ostream* /*out*/ ) override {}
46
47private:
48 std::stringstream m_ltrstream;
50};
51
52}
53
54}
55
56#endif
#define LIMA_ANALYSISHANDLERS_EXPORT
Common Types.
a linear text representation
Definition ltrText.h:41
virtual void endAnalysis() override
function called by the LIMA analyzer on the end of a text part that is to be analyzed
virtual void setOut(std::ostream *) override
set the output stream.
void endDocument() override
notify the end of the document
virtual void handle(const char *buf, int length) override
gives content.
Common::BagOfWords::LTR_Text & getLTRText()
void endNode(const Common::Misc::GenericDocumentProperties &props) override
notify the end of a hierarchyNode
void startNode(const std::string &elementName, bool forIndexing) override
notify the start of a new hierarchyNode
void startDocument(const Common::Misc::GenericDocumentProperties &) override
notify the start of a new document, and give its properties
virtual void startAnalysis() override
function called by the LIMA analyzer on start of a new document
=======================================================================
NAUTITIA.