LIMA
Libre Multilingual Analyzer — C++ API
Loading...
Searching...
No Matches
MultimediaDocumentReaderWriter.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: 2022 CEA LIST <gael.de-chalendar@cea.fr>
2//
3// SPDX-License-Identifier: MIT
4
6
10
11namespace Lima {
12
13
14namespace Common {
15namespace BagOfWords {
16 enum BoWBlocType: unsigned char;
17}
18}
19
20namespace Handler {
21
22class MultimediaXMLWriterPrivate;
25{
26public:
27 MultimediaXMLWriter(std::ostream& os);
28 virtual ~MultimediaXMLWriter();
29
30 void writeMultimediaDocumentsHeader();
31
32 void writeMultimediaDocumentsFooter();
33
34 void processSBinNum(std::vector<float> vect, bool useIterator);
35
36 void openSNode(const Common::Misc::GenericDocumentProperties* /*unused properties*/,
37 const std::string& elementName ) override;
38
39 void openSIndexingNode(const Common::Misc::GenericDocumentProperties* /*unused properties*/,
40 const std::string& elementName ) override;
41
42 void closeSNode() override;
43
44 void processSContent( const Common::Misc::GenericDocumentProperties* properties ) override;
45
46 void closeSContent() override;
47
48 void setSpaces(const std::string& s);
49
50 void incIndent();
51 void decIndent();
52
53private:
55};
56
57
60{
61 public:
64
65 Common::BagOfWords::BoWBlocType readMultimediaDocumentBlock(std::istream& file,
68 bool useIterator,
69 bool useIndexIterator);
70
71 void readBinNum(std::istream& file,
72 unsigned int& cid,
73 std::string& path,
74 std::string& name,
75 std::vector<float>& vect);
76
77 private:
78
79 unsigned int m_content_id;
80};
81
82
85{
86 public:
87 MultimediaBinaryWriter(std::shared_ptr<const ShiftFrom> shiftFrom = std::shared_ptr<const ShiftFrom>()):
88 Common::BagOfWords::BoWBinaryWriter(shiftFrom) {};
90
91
92 private:
93
94};
95
96
97
98}
99}
#define LIMA_ANALYSISHANDLERS_EXPORT
represent a document as a Bag Of Word, with associated document properties.
Definition bowDocument.h:57
MultimediaBinaryWriter(std::shared_ptr< const ShiftFrom > shiftFrom=std::shared_ptr< const ShiftFrom >())
NAUTITIA.