LIMA
Libre Multilingual Analyzer — C++ API
Loading...
Searching...
No Matches
MultimediaStructureReaderClasses.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
5#ifndef MULTIMEDIASTRUCTUREREADERCLASSES_H
6#define MULTIMEDIASTRUCTUREREADERCLASSES_H
7
9
12
13
17
18namespace Lima {
19namespace Handler {
20
21
24 public Lima::ContentHandler<Common::Misc::GenericDocumentProperties>,
25 public Lima::ContentHandler< std::vector<float> >,
26 public Lima::ContentHandler< Common::BagOfWords::BoWText >
27{
28public:
29
31
33
36
37 void processBoWText(const Common::BagOfWords::BoWText* text, int cId);
38
39 void processSBinNum(const std::vector<float>& vect, const std::string& SID, int CID);
40
41 void openSNode(const Common::Misc::GenericDocumentProperties* /*unused properties*/,
42 const std::string& elementName );
43
44 void openSIndexingNode(const Common::Misc::GenericDocumentProperties* /*unused properties*/,
45 const std::string& elementName );
46
47 void closeSNode();
48
49 void processSContent( const Common::Misc::GenericDocumentProperties* properties );
50
51 void closeSContent();
52
53 void writeMultimediaFeature(const std::vector<float>& vect);
54
55 void writeVectorFloat(const std::vector<float>& vect);
56
57 void closePropertiesNode(const Common::Misc::GenericDocumentProperties* prop);
58
59 void addContentNode(const Lima::Node& node);
60
61 uint64_t lastNode() const;
62 void lastNode(uint64_t n);
63
64private:
65 uint64_t m_lastNode;
66 std::vector<uint64_t> m_openedNodes;
67 std::map<std::string,std::string> m_metadata;
68 std::map<int, std::map<int, std::map< uint64_t , Lima::Node > > > m_mapNodes;
69
70};
71
74{
75 public:
80
81 void readMultimediaDocumentBlock(std::istream& file,
84 bool useIterator);
85
86 void readBinNum(std::istream& file,
87 uint64_t& cid,
88 std::string& path,
89 std::string& name,
90 std::vector<float>& vect);
91
92 private:
93};
94
95}
96}
97
98#endif
#define LIMA_ANALYSISHANDLERS_EXPORT
represent a document as a Bag Of Word, with associated document properties.
Definition bowDocument.h:57
This class represents a list of elements, that are pointers on polymmorphic tokens that can be simple...
Definition bowText.h:48
manipulateur de contenu
MultimediaBinaryStructureReader(const MultimediaBinaryStructureReader &)=delete
MultimediaBinaryStructureReader & operator=(const MultimediaBinaryStructureReader &)=delete
MultimediaXMLStructureReader & operator=(const MultimediaXMLStructureReader &)=delete
void writeMultimediaFeature(const std::vector< float > &vect)
MultimediaXMLStructureReader(const MultimediaXMLStructureReader &)=delete
void writeVectorFloat(const std::vector< float > &vect)
noeud de contenu au sein d'une structure.
Definition DataTypes.h:62
NAUTITIA.