8#ifndef RIME_REVERSE_LOOKUP_DICTIONARY_H_
9#define RIME_REVERSE_LOOKUP_DICTIONARY_H_
45 bool Lookup(
const string& text,
string* result);
64 :
public Class<ReverseLookupDictionary, const Ticket&> {
69 bool LookupStems(
const string& text,
string* result);
79 :
public ReverseLookupDictionary::Component,
80 protected DbPool<ReverseDb> {
std::shared_ptr< T > an
Definition common.h:60
set< string > Syllabary
Definition vocabulary.h:17
std::unique_ptr< T > the
Definition common.h:58
hash_map< string, set< string > > ReverseLookupTable
Definition vocabulary.h:107
Definition reverse_lookup_dictionary.h:21
Definition component.h:21
DbPool(the< ResourceResolver > resource_resolver)
Definition db_pool_impl.h:10
Definition dict_settings.h:16
Definition mapped_file.h:22
Definition mapped_file.h:53
Definition mapped_file.h:71
const path & file_path() const
Definition mapped_file.h:121
MappedFile(const path &file_path)
Definition mapped_file.cc:46
Definition reverse_lookup_dictionary.h:23
static const int kFormatMaxLength
Definition reverse_lookup_dictionary.h:24
OffsetPtr< char > key_trie
Definition reverse_lookup_dictionary.h:29
String dict_settings
Definition reverse_lookup_dictionary.h:27
uint32_t value_trie_size
Definition reverse_lookup_dictionary.h:32
uint32_t key_trie_size
Definition reverse_lookup_dictionary.h:30
OffsetPtr< char > value_trie
Definition reverse_lookup_dictionary.h:31
char format[kFormatMaxLength]
Definition reverse_lookup_dictionary.h:25
uint32_t dict_file_checksum
Definition reverse_lookup_dictionary.h:26
List< StringId > index
Definition reverse_lookup_dictionary.h:28
bool Load()
Definition reverse_lookup_dictionary.cc:32
reverse::Metadata * metadata() const
Definition reverse_lookup_dictionary.h:55
bool Lookup(const string &text, string *result)
Definition reverse_lookup_dictionary.cc:71
uint32_t dict_file_checksum() const
Definition reverse_lookup_dictionary.cc:201
ReverseDb(const path &file_path)
Definition reverse_lookup_dictionary.cc:30
bool Save()
Definition reverse_lookup_dictionary.cc:196
bool Build(DictSettings *settings, const Syllabary &syllabary, const Vocabulary &vocabulary, const ReverseLookupTable &stems, uint32_t dict_file_checksum)
Definition reverse_lookup_dictionary.cc:84
Definition reverse_lookup_dictionary.h:64
bool ReverseLookup(const string &text, string *result)
Definition reverse_lookup_dictionary.cc:211
ReverseLookupDictionary(an< ReverseDb > db)
Definition reverse_lookup_dictionary.cc:205
an< ReverseDb > db_
Definition reverse_lookup_dictionary.h:73
bool LookupStems(const string &text, string *result)
Definition reverse_lookup_dictionary.cc:216
bool Load()
Definition reverse_lookup_dictionary.cc:207
an< DictSettings > GetDictSettings()
Definition reverse_lookup_dictionary.cc:220
ReverseLookupDictionaryComponent()
Definition reverse_lookup_dictionary.cc:237
ReverseLookupDictionary * Create(const Ticket &ticket)
Definition reverse_lookup_dictionary.cc:248
Definition vocabulary.h:100