LIMA
Libre Multilingual Analyzer — C++ API
Loading...
Searching...
No Matches
AbstractBoWDocumentHandler.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 *
8 * @file abstractBowDocumentHandler.h
9 * @author Mesnard Olivier (olivier.mesnard@.cea.fr)
10 * @date Wed Oct 12 2005
11 * copyright Copyright (C) 2005-2012 by CEA LIST
12 * Project BagOfWords
13 *
14 * @brief handler to deal with parts of structured BoW documents
15 *
16 *
17 ***********************************************************************/
18
19#ifndef ABSTRACTBOWDOCUMENTHANDLER_H
20#define ABSTRACTBOWDOCUMENTHANDLER_H
21
22#include <string>
23#include <vector>
24
27
28namespace Lima {
29namespace Common {
30namespace Misc {
31 class GenericDocumentProperties;
32}
33namespace BagOfWords {
34
35class BoWText;
36
38{
39 public:
41
43 const std::string& elementName) = 0;
44
46 const std::string& elementName) = 0;
47
48 virtual void processSBoWText(const BoWText* boWText,
49 bool useIterators,
50 bool useIndexIterator) = 0;
51
52 virtual void processProperties(const Misc::GenericDocumentProperties* properties,
53 bool useIterators,
54 bool useIndexIterator) override = 0;
55
56 virtual void closeSBoWNode() = 0;
57
58// virtual void writeDocumentsHeader() = 0;
59// virtual void writeDocumentsFooter() = 0;
60
62 const std::string& elementName) override
63 {
64 openSBoWNode(properties,elementName);
65 }
66
68 const std::string& elementName) override
69 {
70 openSBoWIndexingNode(properties,elementName);
71 }
72
73 void closeSNode() override
74 {
75 closeSBoWNode();
76 }
77
79 {
80 }
81
82};
83
84} // end namespace
85} // end namespace
86} // end namespace
87
88#endif
#define LIMA_BOW_EXPORT
Callback to handle multimedia documents.
virtual void openSBoWIndexingNode(const Lima::Common::Misc::GenericDocumentProperties *properties, const std::string &elementName)=0
virtual void processSBoWText(const BoWText *boWText, bool useIterators, bool useIndexIterator)=0
void processSContent(const Lima::Common::Misc::GenericDocumentProperties *) override
void openSNode(const Lima::Common::Misc::GenericDocumentProperties *properties, const std::string &elementName) override
void openSIndexingNode(const Lima::Common::Misc::GenericDocumentProperties *properties, const std::string &elementName) override
virtual void processProperties(const Misc::GenericDocumentProperties *properties, bool useIterators, bool useIndexIterator) override=0
virtual void openSBoWNode(const Lima::Common::Misc::GenericDocumentProperties *properties, const std::string &elementName)=0
This class represents a list of elements, that are pointers on polymmorphic tokens that can be simple...
Definition bowText.h:48
NAUTITIA.