LIMA
Libre Multilingual Analyzer — C++ API
Loading...
Searching...
No Matches
bowTokenPrivate.h
Go to the documentation of this file.
1// Copyright 2002-2020 CEA LIST
2// SPDX-FileCopyrightText: 2022 CEA LIST <gael.de-chalendar@cea.fr>
3//
4// SPDX-License-Identifier: MIT
5
6/************************************************************************
7 * @file BoWToken.cpp
8 * @author Besancon Romaric
9 * @date Tue Oct 7 2003
10 * copyright Copyright (C) 2003 by CEA LIST
11 *
12 ***********************************************************************/
13
14#ifndef BOWTOKENPRIVATE_H
15#define BOWTOKENPRIVATE_H
16
20
21#include <iterator> // for debug output
22#include <algorithm> // function (on refMap)
23#include <string>
24#include <wchar.h>
25
26namespace Lima
27{
28namespace Common
29{
30namespace BagOfWords
31{
32class BoWToken;
33
34
36{
37public:
38 friend class BoWToken;
39 friend std::ostream& operator << (std::ostream&, const BoWToken&);
41 friend std::ostream& operator << (std::ostream& os,
42 const std::map<BoWToken*,uint64_t>& refMap);
43 friend QDebug& operator << (QDebug&, const BoWToken&);
45 friend QDebug& operator << (QDebug& os,
46 const std::map<BoWToken*,uint64_t>& refMap);
47
49 const LinguisticCode category,
50 const uint64_t position,
51 const uint64_t length);
53 const uint64_t position=0,
54 const uint64_t length=0);
55 BoWTokenPrivate(const BoWToken& tok);
57
60 bool operator==(const BoWTokenPrivate& tok);
61
62
63 virtual ~BoWTokenPrivate();
64
68 uint64_t m_position;
69 uint64_t m_length;
70 uint64_t m_vertex;
71
74
75 static bool m_useOnlyLemma;
76
81 void convertSpaces(void);
82
83};
84
85
86} // namespace BagOfWords
87} // namespace Common
88} // namespace Lima
89
90#endif
friend std::ostream & operator<<(std::ostream &, const BoWToken &)
Definition bowToken.cpp:416
BoWTokenPrivate(const Lima::LimaString &lemma, const LinguisticCode category, const uint64_t position, const uint64_t length)
BoWTokenPrivate(const Lima::LimaString &str, const uint64_t position=0, const uint64_t length=0)
BoWTokenPrivate & operator=(const BoWTokenPrivate &tok)
Definition bowToken.cpp:138
bool operator==(const BoWTokenPrivate &tok)
Definition bowToken.cpp:152
void convertSpaces(void)
convert the spaces in the lemma string into a non-space character (defined by the m_compoundSeparator...
Definition bowToken.cpp:366
This class contains the representation of an element of the bag of words.
Definition bowToken.h:46
NAUTITIA.
QChar LimaChar
Definition LimaString.h:30
QString LimaString
Definition LimaString.h:33