mirror of
git://git.savannah.nongnu.org/eliot.git
synced 2024-12-25 21:59:30 +01:00
Force the case of dictionary words, to avoid weird sorting issues
This commit is contained in:
parent
8d66d234ea
commit
1d25b3e406
1 changed files with 6 additions and 2 deletions
|
@ -1,6 +1,6 @@
|
|||
/*****************************************************************************
|
||||
* Eliot
|
||||
* Copyright (C) 1999-2012 Antoine Fraboulet & Olivier Teulière
|
||||
* Copyright (C) 1999-2013 Antoine Fraboulet & Olivier Teulière
|
||||
* Authors: Antoine Fraboulet <antoine.fraboulet @@ free.fr>
|
||||
* Olivier Teulière <ipkiss @@ gmail.com>
|
||||
*
|
||||
|
@ -170,7 +170,11 @@ void CompDic::loadWordList(const string &iFileName, vector<wstring> &oWordList)
|
|||
// Ignore empty lines
|
||||
if (line == "")
|
||||
continue;
|
||||
oWordList.push_back(readFromUTF8(line, "loadWordList"));
|
||||
// Ensure the word is in upper case
|
||||
wstring wstr = readFromUTF8(line, "loadWordList");
|
||||
std::transform(wstr.begin(), wstr.end(), wstr.begin(), towupper);
|
||||
|
||||
oWordList.push_back(wstr);
|
||||
}
|
||||
|
||||
// Sort the word list, to perform a better compression
|
||||
|
|
Loading…
Reference in a new issue