LIMA
Libre Multilingual Analyzer — C++ API
Loading...
Searching...
No Matches
BowTextHandler.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_LINGUISTICPROCESSINGBOWTEXTHANDLER_H
11#define LIMA_LINGUISTICPROCESSINGBOWTEXTHANDLER_H
12
14#include "BowTextWriter.h"
15
21
22namespace Lima {
23
24namespace LinguisticProcessing {
25
31{
32 Q_OBJECT
33public:
35
36 virtual ~BowTextHandler();
37
38 virtual void endAnalysis() override;
39 virtual void endDocument() override;
40 virtual void handle(const char* buf, int length) override ;
41 virtual void startAnalysis() override;
42 virtual void startDocument(const Common::Misc::GenericDocumentProperties& props) override;
43 virtual void startNode( const std::string& elementName, bool forIndexing ) override;
44 virtual void endNode( const Common::Misc::GenericDocumentProperties& props ) override;
45
46 Common::BagOfWords::BoWText& getBowText();
47
48 void set_filePath(std::string path){m_filePath=path;};
49 virtual void setOut( std::ostream* out ) override {LIMA_UNUSED(out);}
50
51private:
52
53 std::ostringstream* m_bowstream;
54 BowTextWriter* m_writer;
56 std::string m_filePath;
57};
58
59}
60
61}
62
63#endif
#define LIMA_ANALYSISHANDLERS_EXPORT
Common Types.
#define LIMA_UNUSED(x)
Definition LimaCommon.h:224
This class represents a list of elements, that are pointers on polymmorphic tokens that can be simple...
Definition bowText.h:48
manipulateur de contenu
BowTextHandler is a handler for BoW documents that gives access to the resulting BoWText through an a...
virtual void setOut(std::ostream *out) override
set the output stream.
NAUTITIA.