Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(66)

Unified Diff: chrome/tools/convert_dict/dic_reader.cc

Issue 11566003: Bump dictionary versions to 3-0 (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/tools/convert_dict/dic_reader.cc
diff --git a/chrome/tools/convert_dict/dic_reader.cc b/chrome/tools/convert_dict/dic_reader.cc
index 967f07e5d4480e957cbeec10bde3f609b3380d78..bef23823bce534b2c3910eaac81c44b52f4009cb 100644
--- a/chrome/tools/convert_dict/dic_reader.cc
+++ b/chrome/tools/convert_dict/dic_reader.cc
@@ -119,9 +119,13 @@ bool PopulateWordSet(WordSet* word_set, FILE* file, AffReader* aff_reader,
if (found == word_set->end()) {
word_set->insert(std::make_pair(utf8word, affix_vector));
+ } else if (affix_index == 0) {
+ // If we have no affix, add the no-affix case to the affix-vector.
+ found->second.insert(affix_index);
rpetterson 2012/12/15 03:53:47 I'm not sure I see how this fixes the issue where
please use gerrit instead 2012/12/15 04:19:14 This fixes the following case: Word/S
please use gerrit instead 2012/12/15 22:00:19 Rlp: Let me investigate more into how convert_dict
} else {
- // The affixes of the delta file should override those in the
- // dictionary file.
+ // The later added affixes should override the earlier added affixes. This
+ // is useful for overrding the affixes in dic file from dic_delta file,
+ // for example.
found->second.swap(affix_vector);
}
}

Powered by Google App Engine
This is Rietveld 408576698