Overview
Comment: | [core][fr] ibdawg: clean words suggestion > replace <eau> and <au> by <o> |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk | fr | core |
Files: | files | file ages | folders |
SHA3-256: |
7d4742b272fb3288c921f63ae9458598 |
User & Date: | olr on 2017-10-25 14:41:53 |
Other Links: | manifest | tags |
Context
2017-10-25
| ||
16:28 | [core] ibdawg: remove secondary suggestion method (pointless) check-in: e9a792a911 user: olr tags: trunk, core | |
14:41 | [core][fr] ibdawg: clean words suggestion > replace <eau> and <au> by <o> check-in: 7d4742b272 user: olr tags: trunk, fr, core | |
14:30 | [core][fr] ibdawg: char_player > phonème o check-in: 0ad1970e9c user: olr tags: trunk, fr, core | |
Changes
Modified gc_core/js/char_player.js from [ffe0247d07] to [fa4a550e43].
︙ | ︙ | |||
19 20 21 22 23 24 25 | cleanWord: function (sWord) { // word simplication before calculating distance between words sWord = sWord.toLowerCase(); let sRes = ""; for (let c of sWord) { sRes += this._dTransChars.gl_get(c, c); } | | | 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | cleanWord: function (sWord) { // word simplication before calculating distance between words sWord = sWord.toLowerCase(); let sRes = ""; for (let c of sWord) { sRes += this._dTransChars.gl_get(c, c); } return sWord.replace("eau", "o").replace("au", "o"); }, distanceDamerauLevenshtein: function (s1, s2) { // distance of Damerau-Levenshtein between <s1> and <s2> // https://fr.wikipedia.org/wiki/Distance_de_Damerau-Levenshtein try { let nLen1 = s1.length; |
︙ | ︙ |
Modified gc_core/py/char_player.py from [207aee9c21] to [3de4d3c435].
︙ | ︙ | |||
12 13 14 15 16 17 18 | 'ā': 'a', 'ē': 'e', 'ī': 'i', 'ō': 'o', 'ū': 'u', 'ȳ': 'y', 'ñ': 'n', 'œ': 'oe', 'æ': 'ae', }) def cleanWord (sWord): "word simplication before calculating distance between words" | | | 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | 'ā': 'a', 'ē': 'e', 'ī': 'i', 'ō': 'o', 'ū': 'u', 'ȳ': 'y', 'ñ': 'n', 'œ': 'oe', 'æ': 'ae', }) def cleanWord (sWord): "word simplication before calculating distance between words" return sWord.lower().translate(_xTransChars).replace("eau", "o").replace("au", "o") def distanceDamerauLevenshtein (s1, s2): "distance of Damerau-Levenshtein between <s1> and <s2>" # https://fr.wikipedia.org/wiki/Distance_de_Damerau-Levenshtein d = {} nLen1 = len(s1) |
︙ | ︙ |