Overview
Comment: | [graphspell][fr] better suggestion mechanism |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk | fr | graphspell |
Files: | files | file ages | folders |
SHA3-256: |
edcc777d4be1db9a1417b6912047d84e |
User & Date: | olr on 2025-09-14 10:00:59 |
Other Links: | manifest | tags |
Context
2025-09-14
| ||
12:42 | [graphspell] suggestion mechanism update check-in: 6d2e9dc4cb user: olr tags: trunk, graphspell | |
10:00 | [graphspell][fr] better suggestion mechanism check-in: edcc777d4b user: olr tags: trunk, fr, graphspell | |
2025-09-13
| ||
13:25 | [graphspell] ad hoc suggestions with full uppercase words check-in: 7e24b83b14 user: olr tags: trunk, graphspell | |
Changes
Modified gc_lang/fr/modules/tests_modules.py from [20f3337db3] to [10ff0f96cf].
︙ | |||
74 75 76 77 78 79 80 | 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 | - - + + | ("OEIL", "ŒIL"), ("apele", "appel"), ("Co2", "CO₂"), ("emmppâiiiller", "empailler"), ("testt", "test"), ("apelaion", "appellation"), ("exsepttion", "exception"), |
︙ |
Modified gc_lang/fr/rules.grx from [1f6fafb05d] to [57080614e2].
︙ | |||
11808 11809 11810 11811 11812 11813 11814 11815 11816 11817 11818 11819 11820 11821 | 11808 11809 11810 11811 11812 11813 11814 11815 11816 11817 11818 11819 11820 11821 11822 11823 11824 11825 11826 11827 11828 11829 | + + + + + + + + | [a|à] [>bât|ba+s|bat+s] [on|ont|>ton|>thon] [>rond|ron+s] [pu+s|put|pue+s] <<- /loc/ ->> à bâtons rompus && Confusion. Locution « à bâtons rompus ».|https://fr.wiktionary.org/wiki/%C3%A0_b%C3%A2tons_rompus TEST: s’organiser, comme on put, {{à bas thon rond pu}} ->> à bâtons rompus TEST: actions {{à bâton rompu}} ->> à bâtons rompus TEST: discuter à bâtons rompus __conf_à_bon_port__ !! à bon port ¡¡ [à|a] bon [>porc|>pore|>port] <<- /conf/ ->> à bon port && Locution adverbiale “à bon port”.|https://fr.wiktionary.org/wiki/%C3%A0_bon_port TEST: {{a bon porc}} ->> à bon port __conf_à_cor_et_à_cri__ !! à cor et à cri ¡¡ [a|à] [corps|cor+s] [et|est|es|ait|ais|aies|é|è|ei|ai|aient] [à|a] [cri+s|crie+s|crit] <<- /loc/ ->> à cor et à cri && Locution adverbiale invariable. (Le cor est un instrument à vent utilisé pour la chasse.)|https://fr.wiktionary.org/wiki/%C3%A0_cor_et_%C3%A0_cri TEST: Elles hurlèrent {{à corps et à cris}}. ->> à cor et à cri |
︙ | |||
15793 15794 15795 15796 15797 15798 15799 | 15801 15802 15803 15804 15805 15806 15807 15808 15809 15810 15811 15812 15813 15814 15815 15816 15817 15818 15819 15820 15821 15822 15823 15824 15825 15826 15827 15828 15829 15830 15831 15832 15833 15834 15835 15836 15837 15838 15839 15840 15841 15842 15843 15844 15845 15846 15847 | - + - - | [>avaler|>bouffer|>cuire|>élever|>égorger|>frire|>manger|>mâcher|>mastiquer|>rôtir|>tuer] $:D¬:R [>pore|>port] >élevage [de|d’] [>pore|>port] <<- /conf/ --1>> porc|porcs && Confusion. Pour évoquer l’animal, écrivez “porc”.|https://fr.wiktionary.org/wiki/porc >pore [qui|qué] [>pique|>pic] >porc [qui|qué] [>pique|>pic] >port [qui|qué] [>pique|>pic] |
︙ |
Modified graphspell-js/str_transform.js from [3da9c81f36] to [d682ed160b].
︙ | |||
35 36 37 38 39 40 41 | 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 | - - - - - + + + + + | for (let c of sWord) { sNewWord += this._xTransCharsForSpelling.gl_get(c, c); } return sNewWord.normalize("NFC"); }, _xTransCharsForSimplification: new Map([ |
︙ | |||
61 62 63 64 65 66 67 | 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 | - + | let i = 1; for (let c of sWord) { if (c != sWord.slice(i, i+1) || (c == 'e' && sWord.slice(i, i+2) != "ee")) { // exception for <e> to avoid confusion between crée / créai sNewWord += c; } i++; } |
︙ |
Modified graphspell/ibdawg.py from [6f7d77073f] to [58e076d75b].
︙ | |||
46 47 48 49 50 51 52 | 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 | - - - + + - + - + - - + + + | self.sSimplifiedWord = st.simplifyWord(sWord) self.nDistLimit = nDistLimit if nDistLimit >= 0 else (len(sWord) // 3) + 1 # used in suggest() self.nMinDist = 1000 # Temporary sets self.aAllSugg = set() # All suggestions, even the one rejected self.dAccSugg = {} # Accepted suggestions # Parameters |
︙ |
Modified graphspell/str_transform.py from [853d07d14c] to [bbecc59017].
︙ | |||
28 29 30 31 32 33 34 | 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 | - - - - - + + + + + - + | def spellingNormalization (sWord): "nomalization NFC and removing ligatures" return unicodedata.normalize("NFC", sWord.translate(_xTransCharsForSpelling)) _xTransCharsForSimplification = str.maketrans({ |
︙ |