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
38 void startDocument(const Common::Misc::GenericDocumentProperties&) override;
39 void endDocument() override;
40 void startNode( const std::string& elementName, bool forIndexing ) override;
41 void endNode(const Common::Misc::GenericDocumentProperties& props) override;
42
43 Common::BagOfWords::LTR_Text& getLTRText();
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
LTRTextHandler is a handler for LTR text that gives access to the resulting LTRText through an access...
virtual void setOut(std::ostream *) override
set the output stream.
=======================================================================
NAUTITIA.