Comment: | merge trunk |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | tbnext |
Files: | files | file ages | folders |
SHA3-256: |
7ab24796b6c817ec9bf0566609dfa369 |
User & Date: | olr on 2018-05-09 16:01:18 |
Other Links: | branch diff | manifest | tags |
2018-05-09
| ||
16:06 | [fr][tb] update install version number check-in: b2b8872097 user: olr tags: fr, tb, tbnext | |
16:01 | merge trunk check-in: 7ab24796b6 user: olr tags: tbnext | |
15:58 | [build] useless import check-in: 4bbd67edd8 user: olr tags: trunk, build | |
2018-04-26
| ||
17:14 | [tb] remove Hunspell dictionaries selection (obsolete with TB 60+) check-in: fa07dc2d0e user: olr tags: tb, tbnext | |
Modified compile_rules.py from [b3cfeb04f1] to [b4b673c194].
1 2 | 1 2 3 4 5 6 7 8 9 10 11 | - - | import re |
︙ |
Modified compile_rules_js_convert.py from [da0ad4e711] to [5ad87f3f46].
︙ | |||
30 31 32 33 34 35 36 37 38 39 40 41 42 43 | 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | + | sCode = sCode.replace(".startswith", ".startsWith") sCode = sCode.replace(".lower", ".toLowerCase") sCode = sCode.replace(".upper", ".toUpperCase") sCode = sCode.replace(".isdigit", ".gl_isDigit") sCode = sCode.replace(".isupper", ".gl_isUpperCase") sCode = sCode.replace(".islower", ".gl_isLowerCase") sCode = sCode.replace(".istitle", ".gl_isTitle") sCode = sCode.replace(".isalpha", ".gl_isAlpha") sCode = sCode.replace(".capitalize", ".gl_toCapitalize") sCode = sCode.replace(".strip", ".gl_trim") sCode = sCode.replace(".lstrip", ".gl_trimLeft") sCode = sCode.replace(".rstrip", ".gl_trimRight") sCode = sCode.replace('.replace("."', r".replace(/\./g") sCode = sCode.replace('.replace("..."', r".replace(/\.\.\./g") sCode = re.sub(r'.replace\("([^"]+)" ?,', ".replace(/\\1/g,", sCode) |
︙ |
Modified gc_core/py/oxt/OptionsDialog.xcs from [6ddcee836f] to [7f3cb8622b].
︙ | |||
22 23 24 25 26 27 28 29 30 31 32 33 34 35 | 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | + | <desc>The data for one leaf.</desc> </info> <prop oor:name="use_graphspell" oor:type="xs:int"><value>1</value></prop> <prop oor:name="use_graphspell_sugg" oor:type="xs:int"><value>1</value></prop> <prop oor:name="use_extended_dic" oor:type="xs:int"><value>0</value></prop> <prop oor:name="use_community_dic" oor:type="xs:int"><value>0</value></prop> <prop oor:name="use_personal_dic" oor:type="xs:int"><value>1</value></prop> <prop oor:name="main_dic_name" oor:type="xs:string"><value>classic</value></prop> <prop oor:name="extended_dic" oor:type="xs:string"><value></value></prop> <prop oor:name="community_dic" oor:type="xs:string"><value></value></prop> <prop oor:name="personal_dic" oor:type="xs:string"><value></value></prop> </group> </templates> <component> |
︙ |
Modified gc_lang/fr/build_data.py from [1f69de4a2f] to [8989f0e8f3].
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | + | #!python3 # FRENCH DATA BUILDER # # by Olivier R. # License: MPL 2 import json import os import itertools import traceback import graphspell.ibdawg as ibdawg from graphspell.echo import echo from graphspell.str_transform import defineSuffixCode import graphspell.tokenizer as tkz |
︙ | |||
267 268 269 270 271 272 273 | 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 | - + | def makePhonetTable (sp, bJS=False): print("> Correspondances phonétiques ", end="") print("(Python et JavaScript)" if bJS else "(Python seulement)") import gc_lang.fr.modules.conj as conj try: |
︙ |
Modified gc_lang/fr/config.ini from [6a9a7ae65b] to [fbfd84b975].
1 2 3 4 5 6 7 8 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | - + - - + + + + + | [args] lang = fr lang_name = French locales = fr_FR fr_BE fr_CA fr_CH fr_LU fr_BF fr_BJ fr_CD fr_CI fr_CM fr_MA fr_ML fr_MU fr_NE fr_RE fr_SN fr_TG country_default = FR name = Grammalecte implname = grammalecte # always use 3 numbers for version: x.y.z |
︙ |
Modified gc_lang/fr/dictionnaire/genfrdic.py from [5f240a0703] to [21ee33ebdc].
︙ | |||
59 60 61 62 63 64 65 | 59 60 61 62 63 64 65 66 67 68 69 70 71 72 | - - - - - - - - | 'shortname': '“Classique”', 'asciiName': 'fr-classique', 'mozAsciiName': 'fr-FR-classic', 'subDicts': '*MCX', 'mozId': 'fr-dicollecte-classique', 'description': "Dictionnaire français “Classique”" } |
︙ | |||
1252 1253 1254 1255 1256 1257 1258 | 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 | + - + + + | # SEM #s += "~" + self.oEntry.se if self.oEntry.se and self.oEntry.se != "@" else "" # ETY #s += "<" + self.oEntry.et if self.oEntry.et and self.oEntry.et != "@" else "" # IFQ #s += "=" + self.cFq # DIC if self.oEntry.di == "*" and self.cDic != "*": |
︙ |
Modified gc_lang/fr/modules-js/phonet_data.json from [1e891509d7] to [a832b53c50].
cannot compute difference between binary files
Modified gc_lang/fr/modules-js/textformatter.js from [287866f4c9] to [a9dd9e148e].
︙ | |||
53 54 55 56 57 58 59 60 61 62 63 64 65 66 | 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 | + + + + | [/[ ]+:/g, " :"] ], "nnbsp_within_quotation_marks":[[/«([a-zA-Zà-ö0-9À-Öø-ÿØ-ßĀ-ʯ])/g, "« $1"], [/«[ ]+/g, "« "], [/([a-zA-Zà-ö0-9À-Öø-ÿØ-ßĀ-ʯ.!?])»/g, "$1 »"], [/[ ]+»/g, " »"] ], "nnbsp_within_numbers": [ [/(\d)[ ](\d)/g, "$1 $2"] ], // common "nbsp_titles": [ [/\bM(mes?|ᵐᵉˢ?|grs?|ᵍʳˢ?|lles?|ˡˡᵉˢ?|rs?|ʳˢ?|M[.]) /g, "M$1 "], [/\bP(re?s?|ʳᵉ?ˢ?) /g, "P$1 "], [/\bD(re?s?|ʳᵉ?ˢ?) /g, "D$1 "], [/\bV(ves?|ᵛᵉˢ?) /g, "V$1 "] ], "nbsp_before_symbol": [ [/(\d) ?([%‰€$£¥˚Ω℃])/g, "$1 $2"] ], "nbsp_before_units": [ [/([0-9⁰¹²³⁴⁵⁶⁷⁸⁹]) ?([kcmµn]?(?:[slgJKΩ]|m[²³]?|Wh?|Hz|dB)|[%‰]|°C)\b/g, "$1 $2"] ], "nbsp_repair": [ [/([\[(])[ ]([!?:;])/g, "$1$2"], [/(https?|ftp)[ ]:\/\//g, "$1://"], [/&([a-z]+)[ ];/g, "&$1;"], [/&#([0-9]+|x[0-9a-fA-F]+)[ ];/g, "&#$1;"] ], //// missing spaces |
︙ | |||
211 212 213 214 215 216 217 218 219 220 221 222 223 224 | 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 | + | ["within_quotation_marks", true], ["nbsp_before_punctuation", true], ["nbsp_within_quotation_marks", true], ["nbsp_within_numbers", true], ["nnbsp_before_punctuation", false], ["nnbsp_within_quotation_marks", false], ["nnbsp_within_numbers", false], ["nbsp_titles", false], ["nbsp_before_symbol", true], ["nbsp_before_units", true], ["nbsp_repair", true], ["add_space_after_punctuation", true], ["add_space_around_hyphens", true], ["add_space_repair", true], ["erase_non_breaking_hyphens", false], |
︙ |
Modified gc_lang/fr/modules/phonet_data.py from [e1577c5f69] to [9980015f68].
cannot compute difference between binary files
Modified gc_lang/fr/modules/tests.py from [43d45242b9] to [2e6f413e05].
︙ | |||
20 21 22 23 24 25 26 | 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | - + | return s.replace("\u2019", "'").replace("\u2013", "–").replace("\u2014", "—") class TestDictionary (unittest.TestCase): @classmethod def setUpClass (cls): |
︙ |
Modified gc_lang/fr/modules/textformatter.py from [f190943db7] to [8fb9ec33bf].
︙ | |||
35 36 37 38 39 40 41 42 43 44 45 46 47 48 | 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 | + + + + | ("[ ]+:", " :")], "nnbsp_within_quotation_marks":[("«(?=\\w)", "« "), ("«[ ]+", "« "), ("(?<=[\\w.!?])»", " »"), ("[ ]+»", " »")], "nnbsp_within_numbers": [("(\\d)[ ](\\d)", "\\1 \\2")], # common "nbsp_titles": [("\\bM(mes?|ᵐᵉˢ?|grs?|ᵍʳˢ?|lles?|ˡˡᵉˢ?|rs?|ʳˢ?|M\\.) ", "M\\1 "), ("\\bP(re?s?|ʳᵉ?ˢ?) ", "P\\1 "), ("\\bD(re?s?|ʳᵉ?ˢ?) ", "D\\1 "), ("\\bV(ves?|ᵛᵉˢ?) ", "V\\1 ")], "nbsp_before_symbol": [("(\\d) ?([%‰€$£¥˚Ω℃])", "\\1 \\2")], "nbsp_before_units": [("(?<=[0-9⁰¹²³⁴⁵⁶⁷⁸⁹]) ?([kcmµn]?(?:[slgJKΩ]|m[²³]?|Wh?|Hz|dB)|[%‰]|°C)\\b", " \\1")], "nbsp_repair": [("(?<=[[(])[ ]([!?:;])", "\\1"), ("(https?|ftp)[ ]:(?=//)", "\\1:"), ("&([a-z]+)[ ];", "&\\1;"), ("&#([0-9]+|x[0-9a-fA-F]+)[ ];", "&#\\1;")], ## missing spaces |
︙ | |||
192 193 194 195 196 197 198 199 200 201 202 203 204 205 | 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 | + | ("within_quotation_marks", True), ("nbsp_before_punctuation", True), ("nbsp_within_quotation_marks", True), ("nbsp_within_numbers", True), ("nnbsp_before_punctuation", False), ("nnbsp_within_quotation_marks", False), ("nnbsp_within_numbers", False), ("nbsp_titles", False), ("nbsp_before_symbol", True), ("nbsp_before_units", True), ("nbsp_repair", True), ("add_space_after_punctuation", True), ("add_space_around_hyphens", True), ("add_space_repair", True), ("erase_non_breaking_hyphens", False), |
︙ |
Modified gc_lang/fr/oxt/ContextMenu/ContextMenu.py from [512c45de75] to [03a78a32c7].
︙ | |||
127 128 129 130 131 132 133 | 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 | - + | if not oSpellChecker: xCurCtx = uno.getComponentContext() oGC = self.ctx.ServiceManager.createInstanceWithContext("org.openoffice.comp.pyuno.Lightproof.grammalecte", self.ctx) if hasattr(oGC, "getSpellChecker"): # https://bugs.documentfoundation.org/show_bug.cgi?id=97790 oSpellChecker = oGC.getSpellChecker() else: |
︙ |
Modified gc_lang/fr/oxt/DictOptions/DictOptions.py from [3eb1b2d60d] to [f2057c6bbe].
︙ | |||
10 11 12 13 14 15 16 17 18 19 20 21 22 23 | 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | + + + + + + + + + + + + | import helpers import do_strings from com.sun.star.task import XJobExecutor from com.sun.star.awt import XActionListener from com.sun.star.beans import PropertyValue from com.sun.star.awt.MessageBoxButtons import BUTTONS_OK # BUTTONS_OK, BUTTONS_OK_CANCEL, BUTTONS_YES_NO, BUTTONS_YES_NO_CANCEL, BUTTONS_RETRY_CANCEL, BUTTONS_ABORT_IGNORE_RETRY # DEFAULT_BUTTON_OK, DEFAULT_BUTTON_CANCEL, DEFAULT_BUTTON_RETRY, DEFAULT_BUTTON_YES, DEFAULT_BUTTON_NO, DEFAULT_BUTTON_IGNORE from com.sun.star.awt.MessageBoxType import INFOBOX, ERRORBOX # MESSAGEBOX, INFOBOX, WARNINGBOX, ERRORBOX, QUERYBOX def MessageBox (xDocument, sMsg, sTitle, nBoxType=INFOBOX, nBoxButtons=BUTTONS_OK): xParentWin = xDocument.CurrentController.Frame.ContainerWindow ctx = uno.getComponentContext() xToolkit = ctx.ServiceManager.createInstanceWithContext("com.sun.star.awt.Toolkit", ctx) xMsgBox = xToolkit.createMessageBox(xParentWin, nBoxType, nBoxButtons, sTitle, sMsg) return xMsgBox.execute() class DictOptions (unohelper.Base, XActionListener, XJobExecutor): def __init__ (self, ctx): self.ctx = ctx self.xSvMgr = self.ctx.ServiceManager self.xContainer = None |
︙ | |||
32 33 34 35 36 37 38 | 44 45 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 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 | - + + + - + - - + + - - - + + + - + - - - - - - - - - - - - - - + + + + + + + + + + + + + + - - - + + + - + - - + + + + - + - - + + + + + + + + + - + + + + - - + - + + + + + + + + + + | xWidget.Height = h for k, w in kwargs.items(): setattr(xWidget, k, w) self.xDialog.insertByName(name, xWidget) return xWidget def run (self, sLang): |
Modified gc_lang/fr/oxt/DictOptions/SearchWords.py from [2ba69c4e6b] to [75f9b461cf].
︙ | |||
182 183 184 185 186 187 188 | 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 | - + | elif xActionEvent.ActionCommand == "Close": self.xContainer.endExecute() except: traceback.print_exc() def initSpellChecker (self): if not self.oSpellChecker: |
︙ |
Modified gc_lang/fr/oxt/DictOptions/do_strings.py from [2814e1e1ce] to [9a9f6574c0].
︙ | |||
9 10 11 12 13 14 15 | 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 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 64 65 66 67 68 69 | - + - + + + + + + - + - + - + + + + + + - + | "spelling_section": "Correcteur orthographique", "activate_main": "Activer le correcteur orthographique de Grammalecte", "activate_main_descr": "Supplante le correcteur orthographique inclus dans LibreOffice (Hunspell).", "suggestion_section": "Moteur de suggestion orthographique", "activate_spell_sugg": "Moteur de suggestion de Grammalecte", |
Modified gc_lang/fr/oxt/Dictionnaires/dictionaries/fr-classique.aff from [34001eab6b] to [7aba573e1d].
1 2 3 4 5 6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | - + | # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. # AFFIXES DU DICTIONNAIRE ORTHOGRAPHIQUE FRANÇAIS “CLASSIQUE” v6.3 # par Olivier R. -- licence MPL 2.0 |
︙ |
Modified gc_lang/fr/oxt/Dictionnaires/dictionaries/fr-moderne.aff from [e720fb281a] to [bc39751b7a].
1 2 3 4 5 6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | - + | # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. # AFFIXES DU DICTIONNAIRE ORTHOGRAPHIQUE FRANÇAIS “MODERNE” v6.3 # par Olivier R. -- licence MPL 2.0 |
︙ |
Modified gc_lang/fr/oxt/Dictionnaires/dictionaries/fr-reforme1990.aff from [e353a9ecb8] to [5fff0168b9].
1 2 3 4 5 6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | - + | # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. # AFFIXES DU DICTIONNAIRE ORTHOGRAPHIQUE FRANÇAIS “RÉFORME 1990” v6.3 # par Olivier R. -- licence MPL 2.0 |
︙ |
Modified gc_lang/fr/oxt/Dictionnaires/dictionaries/fr-toutesvariantes.aff from [a14cde38dd] to [4245d700cf].
1 2 3 4 5 6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | - + | # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. # AFFIXES DU DICTIONNAIRE ORTHOGRAPHIQUE FRANÇAIS “TOUTES VARIANTES” v6.3 # par Olivier R. -- licence MPL 2.0 |
︙ |
Modified gc_lang/fr/oxt/Graphspell.py from [46a0993dea] to [d8a06b777e].
︙ | |||
52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 | 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 | + - + | self.sServiceName = "com.sun.star.linguistic2.SpellChecker" self.sImplementationName = "net.grammalecte.graphspell" self.tSupportedServiceNames = (self.sServiceName, ) self.xSvMgr = ctx.ServiceManager self.locales = tuple([ Locale(t[0], t[1], t[2]) for t in lLocale ]) self.xSettingNode = helpers.getConfigSetting("/org.openoffice.Lightproof_grammalecte/Other/", False) self.xOptionNode = self.xSettingNode.getByName("o_fr") sMainDicName = self.xOptionNode.getPropertyValue("main_dic_name") personal_dic = "" if (self.xOptionNode.getPropertyValue("use_personal_dic")): sPersonalDicJSON = self.xOptionNode.getPropertyValue("personal_dic") if sPersonalDicJSON: try: personal_dic = json.loads(sPersonalDicJSON) except: print("Graphspell: wrong personal_dic") traceback.print_exc() |
︙ |
Modified gc_lang/fr/oxt/TextFormatter/TextFormatter.py from [31cae4e817] to [dd252c8003].
︙ | |||
122 123 124 125 126 127 128 | 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 | - + + + - + | self.space1 = self._addWidget('space1', 'CheckBox', x, y+15, nWidth, nHeight, Label = self.dUI.get('space1', "#err"), State = True) self.space2 = self._addWidget('space2', 'CheckBox', x, y+25, nWidth, nHeight, Label = self.dUI.get('space2', "#err"), State = True) self.space1_res = self._addWidget('space1_res', 'FixedText', nPosRes, y+15, 20, nHeight, Label = "", Align = 2) self.space2_res = self._addWidget('space2_res', 'FixedText', nPosRes, y+25, 20, nHeight, Label = "", Align = 2) # group box // non-breaking spaces x = 10; y = 145 |
︙ | |||
223 224 225 226 227 228 229 | 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 | - + - + - + | self.struct3 = self._addWidget('struct3', 'CheckBox', x, y+35, nWidth, nHeight, Label = self.dUI.get('struct3', "#err"), \ HelpText = self.dUI.get('struct3_help', "#err"), State = False, Enabled = False) self.struct1_res = self._addWidget('struct1_res', 'FixedText', nPosRes, y+15, 20, nHeight, Label = "", Align = 2) self.struct2_res = self._addWidget('struct2_res', 'FixedText', nPosRes, y+25, 20, nHeight, Label = "", Align = 2) self.struct3_res = self._addWidget('struct3_res', 'FixedText', nPosRes, y+35, 20, nHeight, Label = "", Align = 2) # dialog height |
︙ | |||
512 513 514 515 516 517 518 | 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 | - + - + - + - + - + | n = self._replaceList(xElem, "nbsp4") self.nbsp4_res.Label = str(n) self.pbar.ProgressValue += 1 if self.nbsp5.State: n = self._replaceList(xElem, "nbsp5") self.nbsp5_res.Label = str(n) self.pbar.ProgressValue += 1 |
︙ | |||
626 627 628 629 630 631 632 | 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 | - + | n += self._replaceText(xElem, "ſt", "ft", False, True) if self.typo_st.State: n += self._replaceText(xElem, "st", "st", False, True) self.typo8_res.Label = str(n) self.pbar.ProgressValue += 1 self.typo.State = False self._switchCheckBox(self.typo) |
︙ |
Modified gc_lang/fr/oxt/TextFormatter/tf_options.py from [2ffb289615] to [9f2476057b].
1 2 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | - + - + | dDefaultOpt = { 'ssp': 1, 'ssp1': 1, 'ssp2': 1, 'ssp3': 1, 'ssp4': 1, 'ssp5': 1, 'ssp6': 1, 'ssp7': 1, |
Modified gc_lang/fr/oxt/TextFormatter/tf_strings.py from [a143dd1d82] to [f6eccd2b02].
︙ | |||
24 25 26 27 28 29 30 31 32 33 34 35 36 37 | 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | + | "nbsp": "Espaces ~insécables", "nbsp1": "Avant : ; ? et !", "nbsp2": "Avec les guillemets « et »", "nbsp3": "Avant % ‰ € $ £ ¥ ˚C", "nbsp4": "À l’intérieur des nombres", "nbsp5": "Avant les unités de mesure", "nbsp6": "Après les titres de civilité", "nnbsp": "fins", "nnbsp_help": "sauf avec “:”", "delete": "Su~ppressions", "delete1": "Tirets conditionnels", "delete2": "Puces → tirets cadratins + style :", "delete2a": "Standard", |
︙ | |||
106 107 108 109 110 111 112 113 114 115 116 117 118 119 | 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 | + | "nbsp": "~Non-breaking spaces ", "nbsp1": "Before : ; ? and !", "nbsp2": "With quoting marks « and »", "nbsp3": "Before % ‰ € $ £ ¥ ˚C", "nbsp4": "Within numbers", "nbsp5": "Before units of measurement", "nbsp6": "After titles", "nnbsp": "narrow", "nnbsp_help": "except with “:”", "delete": "~Deletions", "delete1": "Soft hyphens", "delete2": "Bullets → em-dash + style:", "delete2a": "Standard", |
︙ |
Modified gc_lang/fr/oxt/TextFormatter/tf_tabrep.py from [c833d6dc1f] to [aadf88372a].
︙ | |||
117 118 119 120 121 122 123 | 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 | + - + + + | "nnbsp4": [ ("([:digit:])[ ]([:digit:])", "$1 $2", True, True) ], "nbsp5": [ ("(?<=[0-9⁰¹²³⁴⁵⁶⁷⁸⁹]) ?([kcmµnd]?(?:[slgJKΩΩℓ]|m[²³]?|Wh?|Hz|dB)|[%‰]|°C)\\b", " $1", True, True) ], "nbsp6": [ ("\\bM(mes?|ᵐᵉˢ?|grs?|ᵍʳˢ?|lles?|ˡˡᵉˢ?|rs?|ʳˢ?|M\\.) ", "M$1 ", True, True), |
︙ |
Modified gc_lang/fr/rules.grx from [baa55e6e2a] to [58d908ee5a].
︙ | |||
474 475 476 477 478 479 480 | 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 | - + | # crochets __[s](p_points_suspension_entre_crochets)__ \[…\] <<- ~>> * __[s](p_mot_entre_crochets)__ \[({w_1})\] @@1 <<- \1.isdigit() ~>> * <<- __else__ and morph(\1, ":G", False) ~>> =" " + \1 + " " |
︙ | |||
510 511 512 513 514 515 516 517 518 519 520 521 522 523 | 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 | + | TEST: Si l’on peut comprendre que Mme S. ait voulu être prise au sérieux TEST: C’est le b.a.-ba du métier. TEST: qui a été le plus honnête [Rires] TEST: Marion Maréchal-Le Pen. Afin que Maréchal ne soit pas analysé comme un impératif, “Le Pen” devient “Le_Pen”. TEST: Car [je] deviendrai plus insaisissable que jamais. TEST: C’est dans le dossier D:\Data TEST: Dossier C:\Program Files (x86)\LibreOffice TEST: [1] Dossier à revoir. !!! !!! !!! Processeur: balises HTML et LaTeX !!! |
︙ | |||
1651 1652 1653 1654 1655 1656 1657 | 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 | - + + + + | __[i]/tu(tu_arc_en_ciel)__ arcs? en ciel <<- ->> =\0.replace(" ", "-") # Il manque les traits d’union. __[i]/tu(tu_après_demain)__ après demain <<- ->> après-demain # Il manque un trait d’union. __[i]/tu(tu_au_préposition)__ au (delà|dehors|desso?us|devant) @@$ <<- ->> au-\1 # Il manque un trait d’union. __[i]/tu(tu_avant_hier)__ avant hier <<- ->> avant-hier # Il manque un trait d’union. __[i]/tu(tu_bouche_à_oreille_bouche)__ bouche à (?:bouche|oreilles?) <<- morph(word(-1), ":D", False) ->> =\0.replace(" ", "-") # Il manque les traits d’union. __[i]/tu(tu_c_est_à_dire)__ c’est [àa] dire <<- ->> c’est-à-dire # Il manque les traits d’union. __[i]/tu(tu_chef_d_œuvre_lieu)__ chef (lieu|d’œuvre) @@$ <<- ->> chef-\1 # Il manque un trait d’union. |
︙ | |||
1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 | 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 | + | TEST: Il a été nommé {{vice président}} TEST: Que vas-tu faire {{vis à vis}} d’eux ->> vis-à-vis TEST: un super {{week end}} ->> week-end TEST: ils sont partis {{outre mer}} TEST: elles sont allées au {{sud ouest}} TEST: {{nord est}} TEST: des {{stock options}} TEST: Un autre chantier important, celui si sensible de la préservation des données personnelles des élèves # est-ce … ? __[i]/tu(tu_est_ce)__ (?<![cCdDlL][’'])(est ce) ({w_2}) @@0,$ <<- morphex(\2, ":", ":N.*:[me]:[si]|>qui ") and morph(word(-1), ":Cs", False, True) -1>> est-ce # S’il s’agit d’une interrogation, il manque un trait d’union. |
︙ | |||
1967 1968 1969 1970 1971 1972 1973 | 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 | - - - - + + + + | TEST: A bientôt fini son devoir. TEST: A priori, nul ne peut y parvenir sans une aide extérieure. TEST: A devient notre meilleure chance d’y parvenir. !!!! Accentuation des majuscules |
︙ | |||
2470 2471 2472 2473 2474 2475 2476 | 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 | - + - + | __[i]/ocr(ocr_même3)__ mémos? <<- ->> =\0.replace("é", "ê").replace("É", "Ê") # Erreur de numérisation ? TEST: __ocr__ J’en ai assez {{môme}} si ça ne se voit pas. TEST: __ocr__ Ces {{mèmes}} hommes qui nous ont lâchés au pire moment TEST: __ocr__ C’est l’incessant retour du {{mémo}}. |
︙ | |||
4273 4274 4275 4276 4277 4278 4279 | 4278 4279 4280 4281 4282 4283 4284 4285 4286 4287 4288 4289 4290 4291 4292 | - + | TEST: {{qu’elle}} emmerdeuse. __[i]/conf(conf_qu_elle_verbe)__ (quelles?) +({w_1}) @@0,$ <<- \2.islower() and (morphex(\2, ":V|>(?:ne?|me?|te?|se?|[nv]ous|l(?:e|a|es|ui|leur|)|en|y) ", ":[NA].*:[fe]|>(?:plus|moins)") or \2 == "t" or \2 == "s") |
︙ | |||
4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 | 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 | + + | TEST: {{Quelles}} m’engueulent encore une seule fois et elles vont le regretter. TEST: Je crois {{quelle}} est partie. TEST: il pense {{quelles}} sont devenues dangereuses. TEST: Quelle est sa passion ? TEST: Quelles sont leurs principales études ? TEST: Quelles en sont les conséquences ? TEST: Quelle plus belle complicité que… TEST: Quelle peut être la date de clôture d’un exercice ? TEST: Quelle doit être la date du mariage ? # savoir / ignorer __[i]/conf(être_pas_sans_savoir)__ ({etre}) pas sans (ignor(?:e[rz]|ée?s?|ai[st])) @@0,$ <<- morph(\1, ":V0e", False) -2>> savoir # Confusion : vous écrivez l’inverse de ce que vous voulez dire.|http://fr.wiktionary.org/wiki/vous_n%E2%80%99%C3%AAtes_pas_sans_savoir |
︙ | |||
5064 5065 5066 5067 5068 5069 5070 | 5071 5072 5073 5074 5075 5076 5077 5078 5079 5080 5081 5082 5083 5084 5085 | - + | __[i](p_quelle_qu_en_soit_la_qqch)__ quelle qu en soit la (?:cause|raison) <<- ~>> * __[i](p_quelque_qqch)__ quelque(?: (?:part|temps)|s fois) <<- ~>> * __[i](p_quelques_tps_adv)__ quelques (?:instants|secondes|minutes|heures|jours|semaines|mois|années|décennies|siècles|millénaires|trimestres|semestres) (?:auparavant|plus (?:tard|tôt)) <<- ~>> * __[i](p_qui_plus_est)__ qui plus est <<- ~>> * __[i](p_qui_loc_tps)__ qui (ce (?:jour|matin|après-midi|soir)-là|cette (?:nuit|matinée|soirée)-là) @@4 <<- ~1>> * __[i](p_quoi_qu_il_qqch)__ quoi qu il (?:(?:arriv|en co[ûu]t)(?:e|ât)|adv(?:ienne|înt)) <<- ~>> * __[i](p_sans_difficulté)__ sans (?:grande|grosse) difficulté(?: apparente| aucune| financière| majeure| particulière|) <<- ~>> * |
︙ | |||
6884 6885 6886 6887 6888 6889 6890 | 6891 6892 6893 6894 6895 6896 6897 6898 6899 6900 6901 6902 6903 6904 6905 6906 6907 6908 6909 6910 6911 6912 6913 6914 6915 6916 6917 6918 6919 | - + - + | __[i]/gn(gn_2m_les)__ (?<!et |ou )(les) +({w_2}) +({w_2}) @@0,w,$ <<- morph(\1, ":D", False) >>> <<- \2 != "fois" and not \3.startswith("seul") and ((morphex(\2, ":[NAQ].*:m", ":(?:B|e|G|V0|f)") and morph(\3, ":[NAQ].*:f")) or (morphex(\2, ":[NAQ].*:f", ":(?:B|e|G|V0|m)") and morph(\3, ":[NAQ].*:m"))) and not apposition(\2, \3) and not before(r"\b(?:et|ou|de) +$") -3>> =switchGender(@, True) # Accord de genre erroné entre « \2 » et « \3 ». |
︙ | |||
9886 9887 9888 9889 9890 9891 9892 | 9893 9894 9895 9896 9897 9898 9899 9900 9901 9902 9903 9904 9905 9906 9907 9908 9909 9910 9911 9912 9913 9914 | - + + | TEST: Ç’avait été {{horribles}} __[i]/ppas(ppas_ça_verbe)__ (ça|ce(?:la|ci)|celui-(?:ci|là)) +(?:ne +|n’|)((?:es|étai|f[uû]|se[mr]|soi|par|dev|re(?:dev|st))\w+|a(?:it|vait|ura(?:it|)|) +été|e[uû]t +été) +({w_2}) @@0,w,$ <<- (morph(\2, ">(?:être|sembler|devenir|re(?:ster|devenir)|para[îi]tre) ", False) or \2.endswith(" été")) and ( morphex(\3, ":[NAQ].*:p", ":[GWYsi]") or ( morphex(\3, ":[AQ].*:f", ":[GWYme]") and not morph(word(1), ":N.*:f", False, False) ) ) |
︙ | |||
11279 11280 11281 11282 11283 11284 11285 | 11287 11288 11289 11290 11291 11292 11293 11294 11295 11296 11297 11298 11299 11300 11301 11302 11303 11304 11305 11306 11307 11308 11309 11310 11311 | - + + + | TEST: j’ai peur qu’il ne leur {{face}} quelque chose de mal #### CONFUSION ÊTRE / AVOIR __[i]/conf(conf_ait_confiance_été_faim_tort)__ |
︙ | |||
11484 11485 11486 11487 11488 11489 11490 | 11494 11495 11496 11497 11498 11499 11500 11501 11502 11503 11504 11505 11506 11507 11508 | - + | <<- morphex(\2, ":V", ":(?:G|2p|3p!|[ISK].*:2s)") -2>> =suggVerb(@, ":2s") # Conjugaison erronée. Accord avec « \1 ». Le verbe devrait être à la 2ᵉ personne du singulier. TEST: Tu ne {{ment}} jamais. TEST: Tu {{a}} mal ? TEST: Tu ne le lui {{prend}} pas. TEST: Tu ne m’{{attendra}} pas. |
︙ | |||
12024 12025 12026 12027 12028 12029 12030 | 12034 12035 12036 12037 12038 12039 12040 12041 12042 12043 12044 12045 12046 12047 12048 12049 12050 12051 12052 12053 12054 12055 12056 12057 12058 12059 12060 12061 | - + + | #### NOMS PROPRES # 3sg __[s]/conj(conj_nom_propre)__ ([A-ZÉÈ][\w-]+) +({w_1}) @@0,$ |
︙ | |||
12059 12060 12061 12062 12063 12064 12065 | 12070 12071 12072 12073 12074 12075 12076 12077 12078 12079 12080 12081 12082 12083 12084 12085 12086 12087 12088 12089 12090 12091 12092 12093 12094 12095 12096 12097 12098 12099 12100 12101 12102 12103 12104 12105 12106 12107 12108 12109 12110 12111 12112 12113 12114 12115 12116 12117 12118 12119 12120 12121 12122 12123 12124 12125 12126 12127 12128 12129 12130 12131 12132 12133 12134 | - + + + + + + + + + - + + + + + + + + + + - + + | !! !! !!!! Inversion verbe sujet !! !! __[i]/conj(conj_que_où_comment_verbe_sujet_sing)__ |
︙ |
Modified gc_lang/fr/setup.py from [e665601366] to [7f38b8e2c3].
︙ | |||
88 89 90 91 92 93 94 | 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 | - + | # 'test': ['coverage'], # }, # If there are data files included in your packages that need to be # installed, specify them here. If using Python 2.6 or less, then these # have to be included in MANIFEST.in as well. package_data={ |
︙ |
Modified gc_lang/fr/tb/content/overlay.js from [fefd8da4f7] to [99ae888938].
︙ | |||
692 693 694 695 696 697 698 | 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 | - + | document.getElementById('res_o_within_quotation_marks').textContent = n1; } document.getElementById("o_group_ssp").checked = false; this.switchGroup("o_group_ssp"); } document.getElementById('progressbar').value = 1; |
︙ | |||
715 716 717 718 719 720 721 722 723 724 725 726 727 728 | 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 | + + + + | [sText, n1] = this.formatText(sText, "nbsp_within_numbers"); document.getElementById('res_o_nbsp_within_numbers').textContent = n1; } if (document.getElementById("o_nbsp_before_units").checked) { [sText, n1] = this.formatText(sText, "nbsp_before_units"); document.getElementById('res_o_nbsp_before_units').textContent = n1; } if (document.getElementById("o_nbsp_titles").checked) { [sText, n1] = this.formatText(sText, "nbsp_titles"); document.getElementById('res_o_nbsp_titles').textContent = n1; } document.getElementById("o_group_nbsp").checked = false; this.switchGroup("o_group_nbsp"); } document.getElementById('progressbar').value = 2; // espaces manquants if (document.getElementById("o_group_typo").checked) { |
︙ |
Modified gc_lang/fr/tb/content/overlay.xul from [4bf693a054] to [0101f0b174].
︙ | |||
170 171 172 173 174 175 176 177 178 179 180 181 182 183 | 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 | + + + + + | <label id="res_o_nbsp_within_numbers" class="result" /> </hbox> <hbox class="blockopt underline"> <checkbox id="o_nbsp_before_units" class="option" data-default="true" label="&tf_nbsp_before_units;" /> <spacer flex="1" /> <label id="res_o_nbsp_before_units" class="result" /> </hbox> <hbox class="blockopt underline"> <checkbox id="o_nbsp_titles" class="option" data-default="true" label="&tf_nbsp_titles;" /> <spacer flex="1" /> <label id="res_o_nbsp_titles" class="result" /> </hbox> </vbox> </groupbox> <!-- Deletions --> <groupbox> <caption><checkbox id="o_group_delete" class="option optiongroup" data-default="true" label="&tf_delete;" /></caption> <vbox id="group_delete" class="groupblock"> |
︙ |
Modified gc_lang/fr/tb/locale/en/overlay.dtd from [c3723dc977] to [1e54ceb89b].
︙ | |||
33 34 35 36 37 38 39 40 41 42 43 44 45 46 | 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | + | <!ENTITY tf_add_space_around_hyphens "Surrounding dashes"> <!ENTITY tf_nbsp "Non breaking spaces"> <!ENTITY tf_nbsp_before_punctuation "Before : ; ? and !"> <!ENTITY tf_nbsp_within_quotation_marks "With quoting marks « and »"> <!ENTITY tf_nbsp_before_symbol "Before % ‰ € $ £ ¥ ˚C"> <!ENTITY tf_nbsp_within_numbers "Within numbers"> <!ENTITY tf_nbsp_before_units "Before units of measurement"> <!ENTITY tf_nbsp_titles "After titles"> <!ENTITY tf_delete "Deletions"> <!ENTITY tf_erase_non_breaking_hyphens "Soft hyphens"> <!ENTITY tf_typo "Typographical signs"> <!ENTITY tf_ts_apostrophe "Apostrophe (’)"> <!ENTITY tf_ts_ellipsis "Ellipsis (…)"> <!ENTITY tf_ts_dash_middle "Dashes:"> <!ENTITY tf_ts_dash_start "Dashes at beginning of paragraph:"> |
︙ |
Modified gc_lang/fr/tb/locale/fr/overlay.dtd from [816cf299c9] to [93a8ef80c4].
︙ | |||
33 34 35 36 37 38 39 40 41 42 43 44 45 46 | 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | + | <!ENTITY tf_add_space_around_hyphens "Autour des tirets d’incise"> <!ENTITY tf_nbsp "Espaces insécables"> <!ENTITY tf_nbsp_before_punctuation "Avant : ; ? et !"> <!ENTITY tf_nbsp_within_quotation_marks "Avec les guillemets « et »"> <!ENTITY tf_nbsp_before_symbol "Avant % ‰ € $ £ ¥ ˚C"> <!ENTITY tf_nbsp_within_numbers "À l’intérieur des nombres"> <!ENTITY tf_nbsp_before_units "Avant les unités de mesure"> <!ENTITY tf_nbsp_titles "Après les titres de civilité"> <!ENTITY tf_delete "Suppressions"> <!ENTITY tf_erase_non_breaking_hyphens "Tirets conditionnels"> <!ENTITY tf_typo "Signes typographiques"> <!ENTITY tf_ts_apostrophe "Apostrophe (’)"> <!ENTITY tf_ts_ellipsis "Points de suspension (…)"> <!ENTITY tf_ts_dash_middle "Tirets d’incise :"> <!ENTITY tf_ts_dash_start "Tirets en début de paragraphe :"> |
︙ |
Modified gc_lang/fr/webext/content_scripts/menu.css from [8c6775f5ab] to [ccd6be088e].
︙ | |||
10 11 12 13 14 15 16 | 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | - - - - + + + + - + - + | all: initial; position: absolute; box-sizing: border-box; display: none; margin: -8px 0 0 -8px; width: 16px; height: 16px; |
︙ |
Modified gc_lang/fr/webext/content_scripts/panel.css from [2b6e1d1881] to [b1d4b36570].
1 2 3 4 5 6 7 8 9 10 11 12 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | - + - + - + - - + + | /* CSS Content panels for Grammalecte */ div.grammalecte_panel { all: initial; padding: 0; margin: 0; position: fixed; box-sizing: content-box; z-index: 2147483641; /* maximum is 2147483647: https://stackoverflow.com/questions/491052/minimum-and-maximum-value-of-z-index */ |
︙ | |||
64 65 66 67 68 69 70 | 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 | - + - + - + | font-size: 22px; font-weight: bold; color: hsl(150, 0%, 100%); text-align: center; cursor: pointer; } div.grammalecte_copy_button:hover { |
︙ |
Modified gc_lang/fr/webext/content_scripts/panel_gc.css from [eee69d8f3d] to [397d8a48b5].
︙ | |||
46 47 48 49 50 51 52 53 54 55 56 57 58 59 | 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 | + | } div.grammalecte_paragraph_button:hover { background-color: hsl(0, 0%, 40%); color: hsl(0, 0%, 100%); } div.grammalecte_paragraph_actions .grammalecte_green { width: 80px; background-color: hsl(120, 30%, 50%); color: hsl(0, 0%, 96%); } div.grammalecte_paragraph_actions .grammalecte_green:hover { background-color: hsl(120, 50%, 40%); color: hsl(0, 0%, 100%); } |
︙ |
Modified gc_lang/fr/webext/content_scripts/panel_gc.js from [6bf4fd5886] to [499bdc1ad7].
︙ | |||
55 56 57 58 59 60 61 | 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 | - - + - - - + + | this.oNodeControl = new GrammalecteNodeControl(); } start (xNode=null) { this.oTooltip.hide(); this.clear(); if (xNode) { |
︙ | |||
193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 | 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 | + + + + | xNodeErr.className = (this.aIgnoredErrors.has(xNodeErr.dataset.ignored_key)) ? "grammalecte_error_ignored" : "grammalecte_error grammalecte_error_" + oErr['sType']; return xNodeErr; } blockParagraph (xParagraph) { xParagraph.contentEditable = "false"; document.getElementById("grammalecte_check"+xParagraph.dataset.para_num).textContent = "Analyse…"; document.getElementById("grammalecte_check"+xParagraph.dataset.para_num).style.backgroundColor = "hsl(0, 50%, 50%)"; document.getElementById("grammalecte_check"+xParagraph.dataset.para_num).style.boxShadow = "0 0 0 3px hsla(0, 100%, 50%, .2)"; } freeParagraph (xParagraph) { xParagraph.contentEditable = "true"; document.getElementById("grammalecte_check"+xParagraph.dataset.para_num).textContent = "Réanalyser"; document.getElementById("grammalecte_check"+xParagraph.dataset.para_num).style.backgroundColor = "hsl(120, 30%, 50%)"; document.getElementById("grammalecte_check"+xParagraph.dataset.para_num).style.boxShadow = "none"; } applySuggestion (sNodeSuggId) { // sugg try { let sErrorId = document.getElementById(sNodeSuggId).dataset.error_id; //let sParaNum = sErrorId.slice(0, sErrorId.indexOf("-")); let xNodeErr = document.getElementById("grammalecte_err" + sErrorId); |
︙ | |||
430 431 432 433 434 435 436 | 432 433 434 435 436 437 438 439 440 441 442 443 444 445 | - | class GrammalecteNodeControl { constructor () { this.xNode = null; this.dParagraph = new Map(); this.bTextArea = null; |
︙ | |||
470 471 472 473 474 475 476 477 478 | 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 | + + + + + + - + + - - - + + + - - - + + + + + + + + + + - + + | this.dParagraph.set(i, sText.slice(iStart, iEnd)); i++; iStart = iEnd+1; } this.dParagraph.set(i, sText.slice(iStart)); //console.log("Paragraphs number: " + (i+1)); } eraseContent () { while (this.xNode.firstChild) { this.xNode.removeChild(this.xNode.firstChild); } } write () { |
Modified gc_lang/fr/webext/content_scripts/panel_tf.js from [7070609846] to [d7b30c236e].
︙ | |||
32 33 34 35 36 37 38 39 40 41 42 43 44 45 | 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | + | xSpace.appendChild(this._createBlockOption("o_add_space_around_hyphens", true, "Autour des tirets d’incise")); let xNBSP = this._createFieldset("group_nbsp", true, "Espaces insécables"); xNBSP.appendChild(this._createBlockOption("o_nbsp_before_punctuation", true, "Avant : ; ? et !")); xNBSP.appendChild(this._createBlockOption("o_nbsp_within_quotation_marks", true, "Avec les guillemets « et »")); xNBSP.appendChild(this._createBlockOption("o_nbsp_before_symbol", true, "Avant % ‰ € $ £ ¥ ˚C")); xNBSP.appendChild(this._createBlockOption("o_nbsp_within_numbers", true, "À l’intérieur des nombres")); xNBSP.appendChild(this._createBlockOption("o_nbsp_before_units", true, "Avant les unités de mesure")); xNBSP.appendChild(this._createBlockOption("o_nbsp_titles", true, "Après les titres de civilité")); let xDelete = this._createFieldset("group_delete", true, "Suppressions"); xDelete.appendChild(this._createBlockOption("o_erase_non_breaking_hyphens", true, "Tirets conditionnels")); let xColumn2 = oGrammalecte.createNode("div", {className: "grammalecte_tf_column"}); let xTypo = this._createFieldset("group_typo", true, "Signes typographiques"); xTypo.appendChild(this._createBlockOption("o_ts_apostrophe", true, "Apostrophe (’)")); xTypo.appendChild(this._createBlockOption("o_ts_ellipsis", true, "Points de suspension (…)")); xTypo.appendChild(this._createBlockOption("o_ts_dash_middle", true, "Tirets d’incise :")); |
︙ | |||
306 307 308 309 310 311 312 | 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 | - + | document.getElementById('res_o_within_quotation_marks').textContent = n1; } this.setOption("o_group_ssp", false); this.switchGroup("o_group_ssp"); } document.getElementById('grammalecte_tf_progressbar').value = 2; |
︙ | |||
329 330 331 332 333 334 335 336 337 338 339 340 341 342 | 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 | + + + + | [sText, n1] = this.formatText(sText, "nbsp_within_numbers"); document.getElementById('res_o_nbsp_within_numbers').textContent = n1; } if (this.isSelected("o_nbsp_before_units")) { [sText, n1] = this.formatText(sText, "nbsp_before_units"); document.getElementById('res_o_nbsp_before_units').textContent = n1; } if (this.isSelected("o_nbsp_titles")) { [sText, n1] = this.formatText(sText, "nbsp_titles"); document.getElementById('res_o_nbsp_titles').textContent = n1; } this.setOption("o_group_nbsp", false); this.switchGroup("o_group_nbsp"); } document.getElementById('grammalecte_tf_progressbar').value = 3; // espaces manquants if (this.isSelected("o_group_typo")) { |
︙ |
Modified gc_lang/fr/webext/manifest.json from [779b2988db] to [57d55716f4].
1 2 3 4 | 1 2 3 4 5 6 7 8 9 10 11 12 | - + | { "manifest_version": 2, "name": "Grammalecte [fr]", "short_name": "Grammalecte [fr]", |
︙ |
Modified gc_lang/fr/webext/panel/lex_editor.js from [6d5b05bd83] to [afffd7df96].
︙ | |||
605 606 607 608 609 610 611 | 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 | - + | const oSearch = { oSpellChecker: null, load: function () { |
︙ |
Modified gc_lang/fr/xpi/data/dictionaries/fr-FR-classic-reform/fr-FR-classic-reform.aff from [a14cde38dd] to [4245d700cf].
1 2 3 4 5 6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | - + | # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. # AFFIXES DU DICTIONNAIRE ORTHOGRAPHIQUE FRANÇAIS “TOUTES VARIANTES” v6.3 # par Olivier R. -- licence MPL 2.0 |
︙ |
Modified gc_lang/fr/xpi/data/dictionaries/fr-FR-classic/fr-FR-classic.aff from [34001eab6b] to [7aba573e1d].
1 2 3 4 5 6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | - + | # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. # AFFIXES DU DICTIONNAIRE ORTHOGRAPHIQUE FRANÇAIS “CLASSIQUE” v6.3 # par Olivier R. -- licence MPL 2.0 |
︙ |
Modified gc_lang/fr/xpi/data/dictionaries/fr-FR-modern/fr-FR-modern.aff from [e720fb281a] to [bc39751b7a].
1 2 3 4 5 6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | - + | # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. # AFFIXES DU DICTIONNAIRE ORTHOGRAPHIQUE FRANÇAIS “MODERNE” v6.3 # par Olivier R. -- licence MPL 2.0 |
︙ |
Modified gc_lang/fr/xpi/data/dictionaries/fr-FR-reform/fr-FR-reform.aff from [e353a9ecb8] to [5fff0168b9].
1 2 3 4 5 6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | - + | # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. # AFFIXES DU DICTIONNAIRE ORTHOGRAPHIQUE FRANÇAIS “RÉFORME 1990” v6.3 # par Olivier R. -- licence MPL 2.0 |
︙ |
Modified graphspell-js/char_player.js from [0baf69300e] to [c2f75d3e03].
︙ | |||
20 21 22 23 24 25 26 | 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | - + | _xTransCharsForSimplification: new Map([ ['à', 'a'], ['é', 'e'], ['î', 'i'], ['ô', 'o'], ['û', 'u'], ['ÿ', 'i'], ['y', 'i'], ['â', 'a'], ['è', 'e'], ['ï', 'i'], ['ö', 'o'], ['ù', 'u'], ['ŷ', 'i'], ['ä', 'a'], ['ê', 'e'], ['í', 'i'], ['ó', 'o'], ['ü', 'u'], ['ý', 'i'], ['á', 'a'], ['ë', 'e'], ['ì', 'i'], ['ò', 'o'], ['ú', 'u'], ['ỳ', 'i'], ['ā', 'a'], ['ē', 'e'], ['ī', 'i'], ['ō', 'o'], ['ū', 'u'], ['ȳ', 'i'], |
︙ | |||
60 61 62 63 64 65 66 | 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 | - - - - - - - - - - + + + + + + + + + + - - + + + + - - - - + + + + + + + - - - - - - - - - - + + + + + + + + + + + + + + - - + + + + - - - - - - - - - - + + + + + + + + + + + - - + + - - + + + + + + + + - - + + - - - - - - - - - - + + + + + + + + + + - - + + + + + - - + + + + + - - - - - - + + + + + + + + + - - - - - - - - - - + + + + + + + + + + - - + + - - + + - - + + - - - - - - - - - - + + + + + + + + + + - - + + | ["5", "sgSG"], ["6", "bdgBDG"], ["7", "ltLT"], ["8", "bB"], ["9", "gbdGBD"], ["0", "oôOÔ"], |
︙ | |||
332 333 334 335 336 337 338 | 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 | + + + + + + + - + - + + - + | aPfx2: new Set([ "belgo", "franco", "génito", "gynéco", "médico", "russo" ]), cut: function (sWord) { // returns an arry of strings (prefix, trimed_word, suffix) let sPrefix = ""; let sSuffix = ""; let m = /^([ldmtsnjcç]|lorsqu|presqu|jusqu|puisqu|quoiqu|quelqu|qu)[’'‘`]([a-zA-Zà-öÀ-Ö0-9_ø-ÿØ-ßĀ-ʯfi-st-]+)/i.exec(sWord); if (m) { sPrefix = m[1] + "’"; sWord = m[2]; } |
︙ |
Modified graphspell-js/ibdawg.js from [d566558346] to [241ce099fe].
︙ | |||
59 60 61 62 63 64 65 | 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 | - - + + + + + - - + + - - + + | if (this.dSugg.get(0).length) { // we sort the better results with the original word let dDistTemp = new Map(); lRes.forEach((sSugg) => { dDistTemp.set(sSugg, str_transform.distanceDamerauLevenshtein(this.sWord, sSugg)); }); lRes = lRes.sort((sA, sB) => { return dDistTemp.get(sA) - dDistTemp.get(sB); }); dDistTemp.clear(); } |
︙ | |||
170 171 172 173 174 175 176 | 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 | - - + + | this._getArcs = this._getArcs3; this._writeNodes = this._writeNodes3; break; default: throw ValueError("# Error: unknown code: " + this.nCompressionMethod); } //console.log(this.getInfo()); |
︙ | |||
221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 | 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 | + + + - - - - + + + + | } if (sToken.includes("-")) { if (sToken.gl_count("-") > 4) { return true; } return sToken.split("-").every(sWord => this.isValid(sWord)); } if (sToken.includes(".") || sToken.includes("·")) { return true; } return false; } isValid (sWord) { // checks if sWord is valid (different casing tested if the first letter is a capital) if (!sWord) { return null; } if (sWord.includes("’")) { // ugly hack sWord = sWord.replace("’", "'"); } if (this.lookup(sWord)) { return true; } |
︙ | |||
305 306 307 308 309 310 311 312 | 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 | + - + - - - - - - - + + + + - + - - + + + + + + + - + - + - + - + - + - + - + - + | sWord = char_player.spellingNormalization(sWord) let sPfx = ""; let sSfx = ""; [sPfx, sWord, sSfx] = char_player.cut(sWord); let nMaxSwitch = Math.max(Math.floor(sWord.length / 3), 1); let nMaxDel = Math.floor(sWord.length / 5); let nMaxHardRepl = Math.max(Math.floor((sWord.length - 5) / 4), 1); let nMaxJump = Math.max(Math.floor(sWord.length / 4), 1); let oSuggResult = new SuggResult(sWord); |
︙ |
Modified graphspell-js/spellchecker.js from [327e00c673] to [3df103d578].
︙ | |||
18 19 20 21 22 23 24 | 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | - + | } ${map} const dDefaultDictionaries = new Map([ |
︙ |
Modified graphspell/char_player.py from [130907f556] to [73eee3ee03].
︙ | |||
15 16 17 18 19 20 21 | 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | - + | _xTransCharsForSimplification = str.maketrans({ 'à': 'a', 'é': 'e', 'î': 'i', 'ô': 'o', 'û': 'u', 'ÿ': 'i', "y": "i", 'â': 'a', 'è': 'e', 'ï': 'i', 'ö': 'o', 'ù': 'u', 'ŷ': 'i', 'ä': 'a', 'ê': 'e', 'í': 'i', 'ó': 'o', 'ü': 'u', 'ý': 'i', 'á': 'a', 'ë': 'e', 'ì': 'i', 'ò': 'o', 'ú': 'u', 'ỳ': 'i', 'ā': 'a', 'ē': 'e', 'ī': 'i', 'ō': 'o', 'ū': 'u', 'ȳ': 'i', |
︙ | |||
49 50 51 52 53 54 55 | 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 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 | - - - - - - - - - - + + + + + + + + + + - - + + + + - - - - + + + + + + + - - - - - - - - - + + + + + + + + + + - + + + + - - + + - - - - - - - - - - + + + + + + + + + + + + + - - + + - - + + + + + + + + - - + + - - - - - - - - - - + + + + + + + + + + - - + + + + + - - + + + + + - - - - - - + + + + + + - + - - - - - - - - - + + + + + + + + + + + + - - + + - - + + - - + + - - - - - - - - - - + + + + + + + + + + - - + + | "5": "sgSG", "6": "bdgBDG", "7": "ltLT", "8": "bB", "9": "gbdGBD", "0": "oôOÔ", |
︙ | |||
321 322 323 324 325 326 327 | 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 | + - + + + - + + + + + - - + + + | "pseudo", "pré", "re", "ré", "sans", "sous", "supra", "sur", "ultra" ]) aPfx2 = frozenset([ "belgo", "franco", "génito", "gynéco", "médico", "russo" ]) _zWordPrefixes = re.compile("(?i)^([ldmtsnjcç]|lorsqu|presqu|jusqu|puisqu|quoiqu|quelqu|qu)[’'‘`]([\\w-]+)") |
Modified graphspell/dawg.py from [63684196d2] to [eb988983d4].
︙ | |||
10 11 12 13 14 15 16 17 18 19 20 21 22 23 | 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | + + | import sys import os import collections import json import time import re import traceback from . import str_transform as st from .progressbar import ProgressBar def readFile (spf): |
︙ | |||
37 38 39 40 41 42 43 | 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 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 | - + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + | """DIRECT ACYCLIC WORD GRAPH""" # This code is inspired from Steve Hanov’s DAWG, 2011. (http://stevehanov.ca/blog/index.php?id=115) # We store suffix/affix codes and tags within the graph after the “real” word. # A word is a list of numbers [ c1, c2, c3 . . . cN, iAffix, iTags] # Each arc is an index in self.lArcVal, where are stored characters, suffix/affix codes for stemming and tags. # Important: As usual, the last node (after ‘iTags’) is tagged final, AND the node after ‘cN’ is ALSO tagged final. |
︙ |
Modified graphspell/ibdawg.py from [e811d4895f] to [a255097656].
︙ | |||
56 57 58 59 60 61 62 | 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 | - + - - - - + + + + + - - - - + + + + | self.aSugg.add(sSugg) if nDist < self.nMinDist: self.nMinDist = nDist self.nDistLimit = min(self.nDistLimit, self.nMinDist+2) def getSuggestions (self, nSuggLimit=10, nDistLimit=-1): "return a list of suggestions" |
︙ | |||
131 132 133 134 135 136 137 | 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 | - - + + | self.stem = self._stem3 self._lookupArcNode = self._lookupArcNode3 self._getArcs = self._getArcs3 self._writeNodes = self._writeNodes3 else: raise ValueError(" # Error: unknown code: {}".format(self.nCompressionMethod)) |
︙ | |||
228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 | 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 | + + - - - + + + | sToken = cp.spellingNormalization(sToken) if self.isValid(sToken): return True if "-" in sToken: if sToken.count("-") > 4: return True return all(self.isValid(sWord) for sWord in sToken.split("-")) if "." in sToken or "·" in sToken: return True return False def isValid (self, sWord): "checks if <sWord> is valid (different casing tested if the first letter is a capital)" if not sWord: return None if "’" in sWord: # ugly hack sWord = sWord.replace("’", "'") if self.lookup(sWord): return True |
︙ | |||
277 278 279 280 281 282 283 284 285 286 287 288 289 | 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 | + + - + - - - - - + + + - - - + + + + + + - + - + - + - + - + - + - + - + | if sWord.isupper() and len(sWord) > 1: l.extend(self.morph(sWord.capitalize())) return l #@timethis def suggest (self, sWord, nSuggLimit=10): "returns a set of suggestions for <sWord>" sWord = sWord.rstrip(".") # useful for LibreOffice sWord = cp.spellingNormalization(sWord) sPfx, sWord, sSfx = cp.cut(sWord) nMaxSwitch = max(len(sWord) // 3, 1) nMaxDel = len(sWord) // 5 nMaxHardRepl = max((len(sWord) - 5) // 4, 1) nMaxJump = max(len(sWord) // 4, 1) oSuggResult = SuggResult(sWord) |
︙ |
Modified graphspell/spellchecker.py from [696f7480ec] to [cbd22d2c4d].
︙ | |||
12 13 14 15 16 17 18 | 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | - + | import traceback from . import ibdawg from . import tokenizer dDefaultDictionaries = { |
︙ |
Modified js_extension/string.js from [34840fe9fe] to [aea1fc20a2].
︙ | |||
16 17 18 19 20 21 22 23 24 25 26 27 28 29 | 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | + + + | iPos += nStep; } return nOccur; }; String.prototype.gl_isDigit = function () { return (this.search(/^[0-9⁰¹²³⁴⁵⁶⁷⁸⁹]+$/) !== -1); }; String.prototype.gl_isAlpha = function () { return (this.search(/^[a-zA-Zà-öÀ-Öø-ÿØ-ßĀ-ʯ]+$/) !== -1); }; String.prototype.gl_isLowerCase = function () { return (this.search(/^[a-zà-öø-ÿ0-9-]+$/) !== -1); }; String.prototype.gl_isUpperCase = function () { return (this.search(/^[A-ZÀ-ÖØ-ߌ0-9-]+$/) !== -1); }; String.prototype.gl_isTitle = function () { |
︙ |
Modified lex_build.py from [2d1c4b9aa4] to [346704203c].
1 2 3 4 5 6 7 8 9 10 11 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | - + - + | #!python3 # Lexicon builder import argparse from distutils import dir_util import graphspell.dawg as fsa from graphspell.ibdawg import IBDAWG |
︙ |
Modified lexicons/French.lex from [305d84974d] to [168faf793a].
more than 10,000 changes
Modified make.py from [cd8c44402d] to [834b678ac5].
︙ | |||
312 313 314 315 316 317 318 | 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 | - + + + + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + | dVars["dic_main_filename_js"] = "" dVars["dic_extended_filename_py"] = "" dVars["dic_extended_filename_js"] = "" dVars["dic_community_filename_py"] = "" dVars["dic_community_filename_js"] = "" dVars["dic_personal_filename_py"] = "" dVars["dic_personal_filename_js"] = "" |
︙ |