LIMA
Libre Multilingual Analyzer — C++ API
Loading...
Searching...
No Matches
ComposedDict16.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 COMPACT_DICT_COMPOSED_DICT16_HPP
13#define COMPACT_DICT_COMPOSED_DICT16_HPP
14
15
16#include "common/LimaCommon.h"
17
19
20namespace Lima {
21namespace Common {
22namespace FsaAccess {
23
24//typedef int contentElement;
25//typedef std::vector<int> contentSet;
26
27template <typename contentElement, typename contentSet>
29public:
30 ComposedDict16(const contentElement& defaultValue );
31 virtual ~ComposedDict16( );
32 void parseKeys( const std::string &keyFileName );
33 uint64_t getSize() const;
34 const contentElement& getDefaultValue() const { return m_emptyElement; }
35 const contentElement& getElement(const Lima::LimaString& word) const;
36/*
37 std::pair<ComposedDict16_subword_iterator, ComposedDict16_subword_iterator>
38 getSubWordEntries(
39 const Lima::uint64_t offset,
40 const Lima::LimaString& key ) const;
41*/
42protected:
43 // automaton
45 // set of data associated to entries
46 contentSet m_datas;
47 // default return value for getElement() when there is no entry in dictionary
48 contentElement m_emptyElement;
49};
50
51} // namespace FsaAccess
52} // namespace Commmon
53} // namespace Lima
54
55#include "common/FsaAccess/ComposedDict16.tcc"
56
57#endif //COMPACT_DICT_COMPOSED_DICT16_HPP
void parseKeys(const std::string &keyFileName)
const contentElement & getDefaultValue() const
ComposedDict16(const contentElement &defaultValue)
const contentElement & getElement(const Lima::LimaString &word) const
NAUTITIA.
QString LimaString
Definition LimaString.h:33