LIMA
Libre Multilingual Analyzer — C++ API
Loading...
Searching...
No Matches
StructuredBoWToBoWDocument.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 StructuredBoWToBoWDocument.h
9 * @author Besancon Romaric (romaric.besancon@cea.fr)
10 * @date Mon Mar 6 2006
11 * @version $Id$
12 * copyright Copyright (C) 2006-2012 by CEA LIST
13 * Project LinguisticProcessing
14 *
15 * @brief handler to transform XML-structured bow document to fit in a standard bowDocument
16 *
17 *
18 ***********************************************************************/
19
20#ifndef STRUCTUREDBOWTOBOWDOCUMENT_H
21#define STRUCTUREDBOWTOBOWDOCUMENT_H
22
27
28namespace Lima {
29namespace LinguisticProcessing {
30
33{
34 public:
35 StructuredBoWToBoWDocument(std::vector<Common::BagOfWords::BoWDocument>* bowDocs);
37
38 void openSBoWNode(const Common::Misc::GenericDocumentProperties* properties,
39 const std::string& elementName) override;
40
41 void openSBoWIndexingNode(const Common::Misc::GenericDocumentProperties* properties,
42 const std::string& elementName) override;
43
44 void processSBoWText(const Common::BagOfWords::BoWText* boWText,
45 bool useIterators, bool useIndexIterator) override;
46
47 void processProperties(const Common::Misc::GenericDocumentProperties* properties,
48 bool useIterators, bool useIndexIterator) override;
49 void closeSBoWNode() override;
50
51 private:
52 std::vector<Common::BagOfWords::BoWDocument>* m_bowDocs;
53 std::vector<bool> m_inIndexingNode;
54 Common::BagOfWords::BoWDocument* m_currentDocument;
55
56 // private member functions
57 void addProperties(Common::BagOfWords::BoWDocument& document,
59
60};
61
62} // end namespace
63} // end namespace
64
65#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
NAUTITIA.