Chromium Code Reviews| 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); |
| } |
| } |