MCPcopy Create free account
hub / github.com/BYVoid/OpenCC / AddDict

Method AddDict

src/PrefixMatch.cpp:160–165  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

158 LeafMatcher() {}
159
160 void AddDict(const DictPtr& dict) {
161 const LexiconPtr lexicon = dict->GetLexicon();
162 for (const std::unique_ptr<DictEntry>& item : *lexicon) {
163 AddEntry(item->Key(), item->GetDefault());
164 }
165 }
166
167 Candidate MatchPrefixCandidate(const char* word, size_t len) const override {
168 const Node* node = &root;

Callers 2

CollectAllLeafDictsFunction · 0.80
BuildMatcherFunction · 0.80

Calls 2

GetLexiconMethod · 0.45
KeyMethod · 0.45

Tested by

no test coverage detected