LIMA
Libre Multilingual Analyzer — C++ API
Loading...
Searching...
No Matches
bowDocument.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 bowDocument.h
9
* @author Besancon Romaric (besanconr@zoe.cea.fr)
10
* @date Wed Oct 8 2003
11
* copyright Copyright (C) 2003 by CEA LIST
12
* Project BagOfWords
13
*
14
* @brief bag-of-words representation of a document
15
*
16
*
17
***********************************************************************/
18
19
#ifndef BOWDOCUMENT_H
20
#define BOWDOCUMENT_H
21
22
#include "
linguisticProcessing/LinguisticProcessingCommon.h
"
23
#include "
bowText.h
"
24
#include "
common/Data/genericDocumentProperties.h
"
25
#include <iostream>
26
27
namespace
Lima
28
{
29
namespace
Common
30
{
31
namespace
BagOfWords
32
{
33
34
enum
BoWBlocType
:
unsigned
char
{
35
DOCUMENT_PROPERTIES_BLOC
,
36
BOW_TEXT_BLOC
,
37
BIN_NUM_BLOC
,
38
ST_BLOC
,
39
END_BLOC
,
40
NODE_PROPERTIES_BLOC
,
41
HIERARCHY_BLOC
,
42
INDEXING_BLOC
43
};
44
45
LIMA_BOW_EXPORT
std::ostream&
operator<<
(std::ostream& out,
const
BoWBlocType
& blocType);
46
LIMA_BOW_EXPORT
QDebug&
operator<<
(QDebug& out,
const
BoWBlocType
& blocType);
47
LIMA_BOW_EXPORT
std::istream&
operator>>
(std::istream& in,
BoWBlocType
& blocType);
48
49
LIMA_BOW_EXPORT
std::string
getBlocTypeString
(
BoWBlocType
blocType);
50
54
class
LIMA_BOW_EXPORT
BoWDocument
:
55
public
::Lima::Common::Misc::GenericDocumentProperties
,
56
public
BoWText
57
{
58
public
:
59
BoWDocument
();
60
BoWDocument
(
const
BoWDocument
&);
61
virtual
~BoWDocument
();
62
BoWDocument
& operator = (
const
BoWDocument
&);
63
64
virtual
void
clear()
override
;
65
66
virtual
void
reinit()
override
;
67
68
virtual
void
setProperties(
const
Misc::GenericDocumentProperties
& properties);
69
71
//virtual void read(std::istream& file);
72
//virtual void write(std::ostream& file) const;
73
/* virtual void readPart(std::istream& file, */
74
/* AbstractBowDocumentHandler& handler, */
75
/* bool useIterator, */
76
/* std::ostream& os); */
77
// //@}
78
79
friend
LIMA_BOW_EXPORT
std::ostream&
operator <<
(std::ostream&,
const
BoWDocument
&);
80
friend
LIMA_BOW_EXPORT
QDebug&
operator <<
(QDebug&,
const
BoWDocument
&);
81
82
private
:
83
};
84
85
86
}
// end namespace BagOfWords
87
}
// end namespace Common
88
}
// end namespace Lima
89
90
#endif
operator<<
QDebug & operator<<(QDebug &qd, const std::string &str)
Definition
QsLog.cpp:39
LinguisticProcessingCommon.h
LIMA_BOW_EXPORT
#define LIMA_BOW_EXPORT
Definition
LinguisticProcessingCommon.h:80
bowText.h
Lima::Common::BagOfWords::BoWDocument
represent a document as a Bag Of Word, with associated document properties.
Definition
bowDocument.h:57
Lima::Common::BagOfWords::BoWText
This class represents a list of elements, that are pointers on polymmorphic tokens that can be simple...
Definition
bowText.h:48
Lima::Common::Misc::GenericDocumentProperties
Definition
genericDocumentProperties.h:58
genericDocumentProperties.h
Lima::Common::BagOfWords::getBlocTypeString
std::string getBlocTypeString(BoWBlocType blocType)
Definition
bowDocument.cpp:55
Lima::Common::BagOfWords::BoWBlocType
BoWBlocType
Definition
bowDocument.h:34
Lima::Common::BagOfWords::DOCUMENT_PROPERTIES_BLOC
@ DOCUMENT_PROPERTIES_BLOC
Definition
bowDocument.h:35
Lima::Common::BagOfWords::INDEXING_BLOC
@ INDEXING_BLOC
Definition
bowDocument.h:42
Lima::Common::BagOfWords::BOW_TEXT_BLOC
@ BOW_TEXT_BLOC
Definition
bowDocument.h:36
Lima::Common::BagOfWords::NODE_PROPERTIES_BLOC
@ NODE_PROPERTIES_BLOC
Definition
bowDocument.h:40
Lima::Common::BagOfWords::END_BLOC
@ END_BLOC
Definition
bowDocument.h:39
Lima::Common::BagOfWords::ST_BLOC
@ ST_BLOC
Definition
bowDocument.h:38
Lima::Common::BagOfWords::HIERARCHY_BLOC
@ HIERARCHY_BLOC
Definition
bowDocument.h:41
Lima::Common::BagOfWords::BIN_NUM_BLOC
@ BIN_NUM_BLOC
Definition
bowDocument.h:37
Lima::Common::BagOfWords::operator>>
std::istream & operator>>(std::istream &in, BoWBlocType &blocType)
Definition
bowDocument.cpp:47
Lima::Common::BagOfWords::operator<<
T & operator<<(T &qd, const BoWType &bt)
Definition
AbstractBoWElement.h:54
Lima
NAUTITIA.
Definition
AmosePluginsManager.h:15
lima_linguisticprocessing
src
linguisticProcessing
common
BagOfWords
bowDocument.h
Generated by
1.9.8