Index: gc_lang/fr/modules/tests_modules.py ================================================================== --- gc_lang/fr/modules/tests_modules.py +++ gc_lang/fr/modules/tests_modules.py @@ -69,10 +69,11 @@ ("coeur", "cœur"), ("trèèèèèèèèès", "très"), ("vraaaaiiiimeeeeennnt", "vraiment"), ("oeil", "œil"), ("Oeil", "Œil"), + ("OEIL", "ŒIL"), ("apele", "appel"), ("Co2", "CO₂"), ("emmppâiiiller", "empailler"), ("testt", "test"), ("apelaion", "appellation"), Index: graphspell-js/spellchecker.js ================================================================== --- graphspell-js/spellchecker.js +++ graphspell-js/spellchecker.js @@ -331,10 +331,13 @@ if (this.lexicographer.dSugg.has(sWord)) { yield this.lexicographer.dSugg.get(sWord).split("|"); } else if (sWord.gl_isTitle() && this.lexicographer.dSugg.has(sWord.toLowerCase())) { let lSuggs = this.lexicographer.dSugg.get(sWord.toLowerCase()).split("|"); yield lSuggs.map((sSugg) => { return sSugg.slice(0,1).toUpperCase() + sSugg.slice(1); }); + } else if (sWord.gl_isUpperCase() && this.lexicographer.dSugg.has(sWord.toLowerCase())) { + let lSuggs = this.lexicographer.dSugg.get(sWord.toLowerCase()).split("|"); + yield lSuggs.map((sSugg) => { return sSugg.toUpperCase(); }); } else { let lSuggs = this.oMainDic.suggest(sWord, nSuggLimit, true); lSuggs = lSuggs.filter((sSugg) => this.lexicographer.isValidSugg(sSugg, this)); yield lSuggs; } Index: graphspell/spellchecker.py ================================================================== --- graphspell/spellchecker.py +++ graphspell/spellchecker.py @@ -289,10 +289,13 @@ if sWord in self.lexicographer.dSugg: yield self.lexicographer.dSugg[sWord].split("|") elif sWord.istitle() and sWord.lower() in self.lexicographer.dSugg: lSuggs = self.lexicographer.dSugg[sWord.lower()].split("|") yield list(map(lambda sSugg: sSugg[0:1].upper()+sSugg[1:], lSuggs)) + elif sWord.isupper() and sWord.lower() in self.lexicographer.dSugg: + lSuggs = self.lexicographer.dSugg[sWord.lower()].split("|") + yield list(map(lambda sSugg: sSugg.upper(), lSuggs)) else: lSuggs = self.oMainDic.suggest(sWord, nSuggLimit, True) lSuggs = [ sSugg for sSugg in lSuggs if self.lexicographer.isValidSugg(sSugg, self) ] yield lSuggs else: