LIMA
Libre Multilingual Analyzer — C++ API
Loading...
Searching...
No Matches
SimpleDataDico.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
* Copyright (C) 2003 by CEA *
8
* author Olivier MESNARD olivier.mesnard@cea.fr *
9
* *
10
* composed dictionnary *
11
***************************************************************************/
12
#ifndef COMMON_SIMPLEDDICO_SIMPLEDDICO_HPP
13
#define COMMON_SIMPLEDDICO_SIMPLEDDICO_HPP
14
15
16
#include "
common/LimaCommon.h
"
17
18
#include <
common/StringMap/StringMap.h
>
19
20
namespace
Lima
{
21
namespace
Common {
22
namespace
StringMap {
23
24
/*
25
* typename accessMethod: class with following method:
26
* accessMethod(bool keyOrderingIsForward)
27
* int getIndex(const basic_string<Lima::LimaChar>& key) const;
28
* uint64_t getSize() const;
29
* void read(keyFileName);
30
*
31
* typename contentElement: class or predefined type with following features
32
* copy constructor
33
*
34
* typename storedSet: class with following method:
35
* contentElement operator [] (int);
36
*
37
*/
38
39
// Example : frequency dictionary
40
//typedef FsaAccessSpare16 accessMethod;
41
//typedef int contentElement;
42
//typedef std::vector<int> storedSet;
43
44
template
<
typename
accessMethod,
typename
contentElement,
typename
storedSet>
45
class
SimpleDataDico
:
public
StringMap
<accessMethod, contentElement> {
46
public
:
47
SimpleDataDico
(
const
contentElement& defaultValue );
48
void
parseData
(
const
std::string& dataFileName );
49
const
contentElement&
getElement
(
const
Lima::LimaString
& word)
const
;
50
/*
51
std::pair<ComposedDict16_subword_iterator, ComposedDict16_subword_iterator>
52
getSubWordEntries(
53
const Lima::uint64_t offset,
54
const Lima::LimaString& key ) const;
55
*/
56
protected
:
57
// set of data associated to entries
58
storedSet
m_data
;
59
};
60
61
}
// namespace StringMap
62
}
// namespace Commmon
63
}
// namespace Lima
64
65
#include "common/StringMap/SimpleDataDico.tcc"
66
67
#endif
//COMMON_SIMPLEDDICO_SIMPLEDDICO_HPP
LimaCommon.h
StringMap.h
Lima::Common::StringMap::SimpleDataDico
Definition
SimpleDataDico.h:45
Lima::Common::StringMap::SimpleDataDico::parseData
void parseData(const std::string &dataFileName)
Lima::Common::StringMap::SimpleDataDico::m_data
storedSet m_data
Definition
SimpleDataDico.h:58
Lima::Common::StringMap::SimpleDataDico::SimpleDataDico
SimpleDataDico(const contentElement &defaultValue)
Lima::Common::StringMap::SimpleDataDico::getElement
const contentElement & getElement(const Lima::LimaString &word) const
Lima::Common::StringMap::StringMap
Definition
StringMap.h:46
Lima
NAUTITIA.
Definition
AmosePluginsManager.h:15
Lima::LimaString
QString LimaString
Definition
LimaString.h:33
lima_common
src
common
StringMap
SimpleDataDico.h
Generated by
1.9.8