From cd34976a2bfee001c13fd818d2cfe5379e94e256 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Billioud?= Date: Mon, 11 Dec 2023 16:57:33 +0100 Subject: [PATCH 01/44] Create a new version of "CONFUSION_ER_E_PAR" rule in French to prevent false positive --- .../org/languagetool/rules/fr/grammar.xml | 51 +++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/languagetool-language-modules/fr/src/main/resources/org/languagetool/rules/fr/grammar.xml b/languagetool-language-modules/fr/src/main/resources/org/languagetool/rules/fr/grammar.xml index 65512f573f4c4..d3a5b2b4f5230 100644 --- a/languagetool-language-modules/fr/src/main/resources/org/languagetool/rules/fr/grammar.xml +++ b/languagetool-language-modules/fr/src/main/resources/org/languagetool/rules/fr/grammar.xml @@ -54641,6 +54641,57 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA Avant de peindre une vieille armoire commencer par un lessivage. + + + + + + + .*er$ + + par + + Un participe passé semble plus approprié ici. + + Menu afficher par erreur. + + + + + + .*es$ + + + + Un participe passé ou une autre forme verbale pourrait être plus appropriée. + + + Les cours envisages par cet élève ne paraissent pas pertinents. + + + + + + les + + cameras|tractes|magasines|députes|délègues|cosignes|arrives|jures|immigres|troues|lutes + + + Un mot correctement orthographié semble plus approprié. + + + + + + + + + + + + Il fournit les cameras. + + From ec1972205f794c8aa9e0cb610e4a176385f176f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Billioud?= Date: Mon, 11 Dec 2023 18:08:02 +0100 Subject: [PATCH 02/44] Detect all plurals instead of just "les" --- .../src/main/resources/org/languagetool/rules/fr/grammar.xml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/languagetool-language-modules/fr/src/main/resources/org/languagetool/rules/fr/grammar.xml b/languagetool-language-modules/fr/src/main/resources/org/languagetool/rules/fr/grammar.xml index d3a5b2b4f5230..df49f8c04a5db 100644 --- a/languagetool-language-modules/fr/src/main/resources/org/languagetool/rules/fr/grammar.xml +++ b/languagetool-language-modules/fr/src/main/resources/org/languagetool/rules/fr/grammar.xml @@ -54666,12 +54666,13 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA Un participe passé ou une autre forme verbale pourrait être plus appropriée. - Les cours envisages par cet élève ne paraissent pas pertinents. + Les cours envisages par cet élève ne paraissent pas pertinents. - + + les cameras|tractes|magasines|députes|délègues|cosignes|arrives|jures|immigres|troues|lutes From f64bed7f29390ca4cfc339f57b1362ca008db2a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Billioud?= Date: Mon, 11 Dec 2023 18:44:46 +0100 Subject: [PATCH 03/44] Forgotten element in the code --- .../fr/src/main/resources/org/languagetool/rules/fr/grammar.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/languagetool-language-modules/fr/src/main/resources/org/languagetool/rules/fr/grammar.xml b/languagetool-language-modules/fr/src/main/resources/org/languagetool/rules/fr/grammar.xml index df49f8c04a5db..3b87cca1ef6bd 100644 --- a/languagetool-language-modules/fr/src/main/resources/org/languagetool/rules/fr/grammar.xml +++ b/languagetool-language-modules/fr/src/main/resources/org/languagetool/rules/fr/grammar.xml @@ -54673,7 +54673,6 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - les cameras|tractes|magasines|députes|délègues|cosignes|arrives|jures|immigres|troues|lutes From 18815684a9b2ce8b92b84027a3c40bafce543999 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Billioud?= Date: Mon, 11 Dec 2023 19:24:20 +0100 Subject: [PATCH 04/44] Fix the regexp for 3rd rule --- .../resources/org/languagetool/rules/fr/grammar.xml | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/languagetool-language-modules/fr/src/main/resources/org/languagetool/rules/fr/grammar.xml b/languagetool-language-modules/fr/src/main/resources/org/languagetool/rules/fr/grammar.xml index 3b87cca1ef6bd..58bb9b862ea6c 100644 --- a/languagetool-language-modules/fr/src/main/resources/org/languagetool/rules/fr/grammar.xml +++ b/languagetool-language-modules/fr/src/main/resources/org/languagetool/rules/fr/grammar.xml @@ -54665,7 +54665,6 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA Un participe passé ou une autre forme verbale pourrait être plus appropriée. - Les cours envisages par cet élève ne paraissent pas pertinents. @@ -54678,17 +54677,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA Un mot correctement orthographié semble plus approprié. - - - - - - - - - - - + Il fournit les cameras. From 62b52e9a8ef05e00f09aaec58cb33e2b1cc0cb3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Billioud?= Date: Tue, 12 Dec 2023 11:27:11 +0100 Subject: [PATCH 05/44] Create one rule per exception --- .../org/languagetool/rules/fr/grammar.xml | 132 ++++++++++++++++-- 1 file changed, 123 insertions(+), 9 deletions(-) diff --git a/languagetool-language-modules/fr/src/main/resources/org/languagetool/rules/fr/grammar.xml b/languagetool-language-modules/fr/src/main/resources/org/languagetool/rules/fr/grammar.xml index 58bb9b862ea6c..158fca3fea648 100644 --- a/languagetool-language-modules/fr/src/main/resources/org/languagetool/rules/fr/grammar.xml +++ b/languagetool-language-modules/fr/src/main/resources/org/languagetool/rules/fr/grammar.xml @@ -17389,13 +17389,15 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - + + (?-i)[A-Z].* camera camera - se|up|spy + se|up|spy + Vouliez-vous écrire caméra? "Camera" est une forme du verbe "se camer". La camera. @@ -54667,19 +54669,128 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA Les cours envisages par cet élève ne paraissent pas pertinents. - + - cameras|tractes|magasines|députes|délègues|cosignes|arrives|jures|immigres|troues|lutes + cameras - Un mot correctement orthographié semble plus approprié. - + Cameras est l'indicatif de "se camer". Vouliez-vous dire caméras ? Il fournit les cameras. + + + + + + tractes + + + Tractes est l'indicatif de "tracter". Vouliez-vous dire tracts ? + Il distribue les tractes. + + + + + + + magasines + + + Magasines est l'indicatif de "magasiner". Vouliez-vous dire magazines ? + Il distribue les magasines. + + + + + + + députes + + + Députes est l'indicatif de "députer" (envoyer comme député). Vouliez-vous dire députés ? + Il rassemble les députes. + + + + + + + délègues + + + Délègues est l'indicatif de "déléguer". Vouliez-vous dire délégués ? + Il élit les délègues. + + + + + + + cosignes + + + Cosignes est l'indicatif de "cosigner". Vouliez-vous dire consignes ? + Il fournit les cosignes. + + + + + + + arrives + + + Arrives est l'indicatif de "arriver". Vouliez-vous utiliser le nom arrivées ? + Il liste les arrives. + + + + + + + jures + + + Jures est l'indicatif de "jurer". Vouliez-vous dire jurés ? + Il convainc les jures. + + + + + + + immigres + + + Immigres est l'indicatif de "immigrer". Vouliez-vous dire immigrés ? + Il accueille les immigres. + + + + + + + troues + + + Troues est l'indicatif de "trouer". Vouliez-vous dire trous ? + Il rebouche les troues. + + + + + + + lutes + + + Lutes est l'indicatif de "luter" (fermer hermétiquement). Vouliez-vous dire luttes ? + Il concentre les lutes. + @@ -100027,13 +100138,16 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - qui|de|du + qui|de|du + - ne + ne + (?-i)[a-z].*es$ - muches|(?-i)[A-Z].*|sèvres|altères|soires|appareilles|colores|aliènes|uses|publies|commandites|repêches|renaudes|soquettes|ranges|.*-.*|lègues|vaques|importes|emportes|testes|estives|détailles|mixes|manufactures|entres|clipses|repartages?|répètes|gaînes|cites|vampes|hues|conseilles|léchouilles|couvres|ouvres|bouloches|bouboules|bloques|reposes|tractes|troues|oranges|pastelles|palotes|amuses|musiques|patoises|magasines|sources|trévires|patches + muches|(?-i)[A-Z].*|sèvres|altères|soires|appareilles|colores|aliènes|uses|publies|commandites|repêches|renaudes|soquettes|ranges|.*-.*|lègues|vaques|importes|emportes|testes|estives|détailles|mixes|manufactures|entres|clipses|repartages?|répètes|gaînes|cites|vampes|hues|conseilles|léchouilles|couvres|ouvres|bouloches|bouboules|bloques|reposes|tractes|troues|oranges|pastelles|palotes|amuses|musiques|patoises|magasines|sources|trévires|patches + From d03c3062e5042d614588001b484da514e86c772b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Billioud?= Date: Mon, 18 Dec 2023 17:50:52 +0100 Subject: [PATCH 06/44] Revert changes as requested in comments --- .../org/languagetool/rules/fr/grammar.xml | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/languagetool-language-modules/fr/src/main/resources/org/languagetool/rules/fr/grammar.xml b/languagetool-language-modules/fr/src/main/resources/org/languagetool/rules/fr/grammar.xml index 158fca3fea648..1959850d91803 100644 --- a/languagetool-language-modules/fr/src/main/resources/org/languagetool/rules/fr/grammar.xml +++ b/languagetool-language-modules/fr/src/main/resources/org/languagetool/rules/fr/grammar.xml @@ -17389,15 +17389,13 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - - + (?-i)[A-Z].* camera camera - se|up|spy - + se|up|spy Vouliez-vous écrire caméra? "Camera" est une forme du verbe "se camer". La camera. @@ -100138,16 +100136,13 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - qui|de|du - + qui|de|du - ne - + ne (?-i)[a-z].*es$ - muches|(?-i)[A-Z].*|sèvres|altères|soires|appareilles|colores|aliènes|uses|publies|commandites|repêches|renaudes|soquettes|ranges|.*-.*|lègues|vaques|importes|emportes|testes|estives|détailles|mixes|manufactures|entres|clipses|repartages?|répètes|gaînes|cites|vampes|hues|conseilles|léchouilles|couvres|ouvres|bouloches|bouboules|bloques|reposes|tractes|troues|oranges|pastelles|palotes|amuses|musiques|patoises|magasines|sources|trévires|patches - + muches|(?-i)[A-Z].*|sèvres|altères|soires|appareilles|colores|aliènes|uses|publies|commandites|repêches|renaudes|soquettes|ranges|.*-.*|lègues|vaques|importes|emportes|testes|estives|détailles|mixes|manufactures|entres|clipses|repartages?|répètes|gaînes|cites|vampes|hues|conseilles|léchouilles|couvres|ouvres|bouloches|bouboules|bloques|reposes|tractes|troues|oranges|pastelles|palotes|amuses|musiques|patoises|magasines|sources|trévires|patches From 66a666dd8f02062bb2d8f549a82c89f95d8acc79 Mon Sep 17 00:00:00 2001 From: jaumeortola Date: Sun, 7 Jan 2024 10:38:52 +0100 Subject: [PATCH 07/44] [ca] more words --- .../org/languagetool/resource/ca/added.txt | 5 +++++ .../resource/ca/disambiguation.xml | 18 ++++++++++++++++++ .../org/languagetool/resource/ca/spelling.txt | 5 +++++ 3 files changed, 28 insertions(+) diff --git a/languagetool-language-modules/ca/src/main/resources/org/languagetool/resource/ca/added.txt b/languagetool-language-modules/ca/src/main/resources/org/languagetool/resource/ca/added.txt index ab31efe8a4bb8..e5a06a1e31ab2 100644 --- a/languagetool-language-modules/ca/src/main/resources/org/languagetool/resource/ca/added.txt +++ b/languagetool-language-modules/ca/src/main/resources/org/languagetool/resource/ca/added.txt @@ -42,6 +42,7 @@ Rubiales Rubiales NPCNSP0 Ródtxenko Ródtxenko NPCNSP0 Schuschnigg Schuschnigg NPCNSP0 Soljenitsin Soljenitsin NPCNSP0 +Sulzberger Sulzberger NPCNSP0 TS TS NCCN000 Tiristi Tiristi NPMSSP0 Urdangarin Urdangarin NPCNSP0 @@ -84,6 +85,10 @@ necròlisi necròlisi NCFS000 necròlisis necròlisi NCFP000 partner partner NCMS000 partners partner NCMP000 +patuesitzacions patuesització NCFP000 +patuesització patuesització NCFS000 +porugueria porugueria NCFS000 +porugueries porugueria NCFP000 postaleta postaleta NCFS000 postaletes postaleta NCFP000 postgala postgala NCFS000 diff --git a/languagetool-language-modules/ca/src/main/resources/org/languagetool/resource/ca/disambiguation.xml b/languagetool-language-modules/ca/src/main/resources/org/languagetool/resource/ca/disambiguation.xml index 41bb724a077f8..c7e118ae42a92 100644 --- a/languagetool-language-modules/ca/src/main/resources/org/languagetool/resource/ca/disambiguation.xml +++ b/languagetool-language-modules/ca/src/main/resources/org/languagetool/resource/ca/disambiguation.xml @@ -4974,6 +4974,15 @@ Copyright (C) 2012 Jaume Ortolà i Font + + + dimensió|mesura|mida + + micro|macro + + + + compte|llibre|pel·lícula|programa|espectacle|entrevista|notícia|reportatge @@ -5851,6 +5860,15 @@ Copyright (C) 2012 Jaume Ortolà i Font + + + + + CAP + + + + diff --git a/languagetool-language-modules/ca/src/main/resources/org/languagetool/resource/ca/spelling.txt b/languagetool-language-modules/ca/src/main/resources/org/languagetool/resource/ca/spelling.txt index 4de4f1fe2b94b..a0bc751dff48f 100644 --- a/languagetool-language-modules/ca/src/main/resources/org/languagetool/resource/ca/spelling.txt +++ b/languagetool-language-modules/ca/src/main/resources/org/languagetool/resource/ca/spelling.txt @@ -38,6 +38,7 @@ Rubiales Ródtxenko Schuschnigg Soljenitsin +Sulzberger TS Tiristi Urdangarin @@ -80,6 +81,10 @@ necròlisi necròlisis partner partners +patuesitzacions +patuesització +porugueria +porugueries postaleta postaletes postgala From d4855d057e170b4f3aec4b17fb16f235a1ff2a38 Mon Sep 17 00:00:00 2001 From: jaumeortola Date: Sun, 7 Jan 2024 10:39:12 +0100 Subject: [PATCH 08/44] [core] spelling global --- .../org/languagetool/resource/spelling_global.txt | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/languagetool-core/src/main/resources/org/languagetool/resource/spelling_global.txt b/languagetool-core/src/main/resources/org/languagetool/resource/spelling_global.txt index c9c4d3f42c28e..3e0c94795e61c 100644 --- a/languagetool-core/src/main/resources/org/languagetool/resource/spelling_global.txt +++ b/languagetool-core/src/main/resources/org/languagetool/resource/spelling_global.txt @@ -20408,4 +20408,17 @@ Sieg Heil Thomas Szasz Thomas Stephen Szasz John Watson -David Portnoy \ No newline at end of file +David Portnoy +William Buckley +William F. Buckley +Sly Stone +Montreux Jazz Festival +Arthur Ochs Sulzberger +Arthur Gregg Sulzberger +A. G. Sulzberger +Arthur Hays Sulzberger +Adolph Ochs +Orvil Dryfoos +Pat Buchanan +Rip Van Winkle +San Vito lo Capo \ No newline at end of file From bbcdc337c8ecddfadc764a3e20ce6fdc03baee1d Mon Sep 17 00:00:00 2001 From: jaumeortola Date: Sun, 7 Jan 2024 12:33:40 +0100 Subject: [PATCH 09/44] [ca] improve rules --- .../org/languagetool/resource/ca/added.txt | 4 + .../org/languagetool/resource/ca/entities.ent | 2 +- .../org/languagetool/resource/ca/removed.txt | 2 + .../org/languagetool/resource/ca/spelling.txt | 4 + .../org/languagetool/rules/ca/grammar.xml | 100 +++++++++++++++++- .../org/languagetool/rules/ca/replace.txt | 4 +- 6 files changed, 111 insertions(+), 5 deletions(-) diff --git a/languagetool-language-modules/ca/src/main/resources/org/languagetool/resource/ca/added.txt b/languagetool-language-modules/ca/src/main/resources/org/languagetool/resource/ca/added.txt index e5a06a1e31ab2..bfcc80795e078 100644 --- a/languagetool-language-modules/ca/src/main/resources/org/languagetool/resource/ca/added.txt +++ b/languagetool-language-modules/ca/src/main/resources/org/languagetool/resource/ca/added.txt @@ -187,6 +187,8 @@ remilitaritzéssiu remilitaritzar VMSI2P02 remilitaritzí remilitaritzar VMIS1S00 riesling riesling NCMS000 rieslings riesling NCMP000 +taco taco NCMS000 +tacos taco NCMP000 talassonímia talassonímia NCFS000 talassonímies talassonímia NCFP000 talassònim talassònim NCMS000 @@ -194,3 +196,5 @@ talassònims talassònim NCMP000 tecnocapitalista tecnocapitalista AQ0CS0 tecnocapitalistes tecnocapitalista AQ0CP0 transculturalisme transculturalisme NCMS000 +ultranormativitzacions ultranormativització NCFP000 +ultranormativització ultranormativització NCFS000 diff --git a/languagetool-language-modules/ca/src/main/resources/org/languagetool/resource/ca/entities.ent b/languagetool-language-modules/ca/src/main/resources/org/languagetool/resource/ca/entities.ent index 70999adb22264..0a90d53a8bcc7 100644 --- a/languagetool-language-modules/ca/src/main/resources/org/languagetool/resource/ca/entities.ent +++ b/languagetool-language-modules/ca/src/main/resources/org/languagetool/resource/ca/entities.ent @@ -5,7 +5,7 @@ - + diff --git a/languagetool-language-modules/ca/src/main/resources/org/languagetool/resource/ca/removed.txt b/languagetool-language-modules/ca/src/main/resources/org/languagetool/resource/ca/removed.txt index 9211078f157e9..f9cf6e118fad3 100644 --- a/languagetool-language-modules/ca/src/main/resources/org/languagetool/resource/ca/removed.txt +++ b/languagetool-language-modules/ca/src/main/resources/org/languagetool/resource/ca/removed.txt @@ -12,5 +12,7 @@ TS TS NPMSO00 XL XL AO0CN0 ZER ZER NCFP000 ZER ZER NCFS000 +mirant mirant AQ0CS0 +mirants mirant AQ0CP0 patotxada patotxada NCFS000 patotxades patotxada NCFP000 diff --git a/languagetool-language-modules/ca/src/main/resources/org/languagetool/resource/ca/spelling.txt b/languagetool-language-modules/ca/src/main/resources/org/languagetool/resource/ca/spelling.txt index a0bc751dff48f..5dc425857d2bf 100644 --- a/languagetool-language-modules/ca/src/main/resources/org/languagetool/resource/ca/spelling.txt +++ b/languagetool-language-modules/ca/src/main/resources/org/languagetool/resource/ca/spelling.txt @@ -159,6 +159,8 @@ remilitaritzéssiu remilitaritzí riesling rieslings +taco +tacos talassonímia talassonímies talassònim @@ -166,3 +168,5 @@ talassònims tecnocapitalista tecnocapitalistes transculturalisme +ultranormativitzacions +ultranormativització diff --git a/languagetool-language-modules/ca/src/main/resources/org/languagetool/rules/ca/grammar.xml b/languagetool-language-modules/ca/src/main/resources/org/languagetool/rules/ca/grammar.xml index a41a0e938f8da..9be6f0e695eaf 100644 --- a/languagetool-language-modules/ca/src/main/resources/org/languagetool/rules/ca/grammar.xml +++ b/languagetool-language-modules/ca/src/main/resources/org/languagetool/rules/ca/grammar.xml @@ -4547,6 +4547,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA Benvolguts Vicent i Ignasi. Portugesos 11%, altres 7%. Ha dirigit i coordinat grups de recerca. + Anem a dormir a la una mirant clàssics de cine. @@ -63810,7 +63811,93 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - + + + menjar|cuinar|preparar|cuina + tacos|taco + + + tacos|taco + mexicà|Mèxic + + + mexicà|Mèxic + tacos|taco + + + + + fer|armar|muntar + + + + + taco + + + Expressió incorrecta. + embolic + garbuix + Es fa un taco. + Es fan uns tacos. + + + + + fer|armar|muntar + + + taco + + + Expressió incorrecta. + embolic + garbuix + S'ha fet un taco. + S'ha fet uns tacos. + + + + armar|muntar + + + taco + + + Expressió incorrecta. + embolic + garbuix + S'ha armat un taco. + + + + &verbs_dicendi;|deixar|despenjar + + taco + + + Expressió incorrecta. + renec + paraulota + Van dir mots tacos. + Va amollar un taco. + Va deixar anar un taco. + + + + taco + + Aquesta paraula només és acceptable amb el sentit de 'menjar típic mexicà'. + tac + bloc + renec + paraulota + embolic + garbuix + Els tacos. + + + s'|se @@ -63851,7 +63938,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA Has liat una grossa. - + no @@ -97645,6 +97732,15 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + + + més + menor|major + + Expressió redundant. + \2 + La temperatura és més menor. + diff --git a/languagetool-language-modules/ca/src/main/resources/org/languagetool/rules/ca/replace.txt b/languagetool-language-modules/ca/src/main/resources/org/languagetool/rules/ca/replace.txt index 81164595a8026..a1f7a6dedb636 100644 --- a/languagetool-language-modules/ca/src/main/resources/org/languagetool/rules/ca/replace.txt +++ b/languagetool-language-modules/ca/src/main/resources/org/languagetool/rules/ca/replace.txt @@ -2729,8 +2729,8 @@ tablet=tauleta tablets=tauletes tabic=envà|barandat|paret|tempanell|cloenda|paredó tabics=envans|barandats|parets|tempanells|cloendes|paredons -tacos=tacs|blocs|renecs|paraulotes|embolics|garbuixos -taco=tac|bloc|renec|paraulota|embolic|garbuix|tacó +#tacos=tacs|blocs|renecs|paraulotes|embolics|garbuixos +#taco=tac|bloc|renec|paraulota|embolic|garbuix|tacó también|tambié=també taladradora|taladro=perforadora|trepant|màquina de foradar taladradores|taladros=perforadores|trepants|màquines de foradar From 111d28a57fb7ef55882005b8136376fd8f4c3278 Mon Sep 17 00:00:00 2001 From: jaumeortola Date: Sun, 7 Jan 2024 12:33:53 +0100 Subject: [PATCH 10/44] [core] spelling global --- .../org/languagetool/resource/spelling_global.txt | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/languagetool-core/src/main/resources/org/languagetool/resource/spelling_global.txt b/languagetool-core/src/main/resources/org/languagetool/resource/spelling_global.txt index 3e0c94795e61c..dd23cb0f20bbb 100644 --- a/languagetool-core/src/main/resources/org/languagetool/resource/spelling_global.txt +++ b/languagetool-core/src/main/resources/org/languagetool/resource/spelling_global.txt @@ -20421,4 +20421,12 @@ Adolph Ochs Orvil Dryfoos Pat Buchanan Rip Van Winkle -San Vito lo Capo \ No newline at end of file +San Vito lo Capo +Jaime Peñafiel +Roberto Saviano +Giovanni Falcone +Paolo Borsellino +Salvatore Riina +Salvatore Totò Riina +Totò Riina +Nézet-Séguin \ No newline at end of file From 7d61a6f20c178bcc04265c43764a896a1febc8f5 Mon Sep 17 00:00:00 2001 From: jaumeortola Date: Sun, 7 Jan 2024 12:41:58 +0100 Subject: [PATCH 11/44] [ca] fix FP --- .../main/resources/org/languagetool/rules/ca/grammar.xml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/languagetool-language-modules/ca/src/main/resources/org/languagetool/rules/ca/grammar.xml b/languagetool-language-modules/ca/src/main/resources/org/languagetool/rules/ca/grammar.xml index 9be6f0e695eaf..f527036f75a0a 100644 --- a/languagetool-language-modules/ca/src/main/resources/org/languagetool/rules/ca/grammar.xml +++ b/languagetool-language-modules/ca/src/main/resources/org/languagetool/rules/ca/grammar.xml @@ -103719,6 +103719,14 @@ No t'ho explicaré, no cal que em burxis més--> És un preludi del que pot succeir. És un preludi del que s'ha d'esdevenir. + + de + + que + tenir|posseir + \p{P} + (el 75% de la que tenim) + From 043a9cc6c08372e3dcdb8f8cb4155bfdeddd7e94 Mon Sep 17 00:00:00 2001 From: jaumeortola Date: Sun, 7 Jan 2024 15:49:01 +0100 Subject: [PATCH 12/44] [es,ca] more words --- .../main/resources/org/languagetool/resource/ca/added.txt | 6 ++++++ .../resources/org/languagetool/resource/ca/multiwords.txt | 1 + .../resources/org/languagetool/resource/ca/spelling.txt | 6 ++++++ .../main/resources/org/languagetool/rules/ca/grammar.xml | 5 +++-- .../main/resources/org/languagetool/rules/ca/replace.txt | 2 ++ .../main/resources/org/languagetool/resource/es/added.txt | 2 ++ .../org/languagetool/resource/es/hunspell/spelling.txt | 2 ++ 7 files changed, 22 insertions(+), 2 deletions(-) diff --git a/languagetool-language-modules/ca/src/main/resources/org/languagetool/resource/ca/added.txt b/languagetool-language-modules/ca/src/main/resources/org/languagetool/resource/ca/added.txt index bfcc80795e078..4baf1c01549dc 100644 --- a/languagetool-language-modules/ca/src/main/resources/org/languagetool/resource/ca/added.txt +++ b/languagetool-language-modules/ca/src/main/resources/org/languagetool/resource/ca/added.txt @@ -43,6 +43,7 @@ Ródtxenko Ródtxenko NPCNSP0 Schuschnigg Schuschnigg NPCNSP0 Soljenitsin Soljenitsin NPCNSP0 Sulzberger Sulzberger NPCNSP0 +Summerhill Summerhill NPCSO00 TS TS NCCN000 Tiristi Tiristi NPMSSP0 Urdangarin Urdangarin NPCNSP0 @@ -69,6 +70,9 @@ dissintonia dissintonia NCFS000 dissintonies dissintonia NCFP000 equiprobabilitat equiprobabilitat NCFS000 equiprobabilitats equiprobabilitat NCFP000 +esgarramantes esgarramantes AQ0CN0 +exterminacionista exterminacionista AQ0CS0 +exterminacionistes exterminacionista AQ0CP0 indoaràbic indoaràbic AQ0MS0 indoaràbica indoaràbic AQ0FS0 indoaràbics indoaràbic AQ0MP0 @@ -77,6 +81,8 @@ marcianet marcianet NCMS000 marcianets marcianet NCMP000 marshmallow marshmallow NCMS000 marshmallows marshmallow NCMP000 +mentideta mentideta NCFS000 +mentidetes mentideta NCFP000 multiestàtic multiestàtic AQ0MS0 multiestàtica multiestàtic AQ0FS0 multiestàtics multiestàtic AQ0MP0 diff --git a/languagetool-language-modules/ca/src/main/resources/org/languagetool/resource/ca/multiwords.txt b/languagetool-language-modules/ca/src/main/resources/org/languagetool/resource/ca/multiwords.txt index 5a2a10551678d..fd5ff52ba5483 100644 --- a/languagetool-language-modules/ca/src/main/resources/org/languagetool/resource/ca/multiwords.txt +++ b/languagetool-language-modules/ca/src/main/resources/org/languagetool/resource/ca/multiwords.txt @@ -1,5 +1,6 @@ #Catalan multiwords file used for chunking #separatorRegExp=[\t;] +José María Llanos;NPMSSP0 pisco sour;NCMS000 Vicent Garcia;NPMSSP0 Peset i Aleixandre;NPCNSP0 diff --git a/languagetool-language-modules/ca/src/main/resources/org/languagetool/resource/ca/spelling.txt b/languagetool-language-modules/ca/src/main/resources/org/languagetool/resource/ca/spelling.txt index 5dc425857d2bf..51dc12b9593f8 100644 --- a/languagetool-language-modules/ca/src/main/resources/org/languagetool/resource/ca/spelling.txt +++ b/languagetool-language-modules/ca/src/main/resources/org/languagetool/resource/ca/spelling.txt @@ -39,6 +39,7 @@ Ródtxenko Schuschnigg Soljenitsin Sulzberger +Summerhill TS Tiristi Urdangarin @@ -65,6 +66,9 @@ dissintonia dissintonies equiprobabilitat equiprobabilitats +esgarramantes +exterminacionista +exterminacionistes indoaràbic indoaràbica indoaràbics @@ -73,6 +77,8 @@ marcianet marcianets marshmallow marshmallows +mentideta +mentidetes multiestàtic multiestàtica multiestàtics diff --git a/languagetool-language-modules/ca/src/main/resources/org/languagetool/rules/ca/grammar.xml b/languagetool-language-modules/ca/src/main/resources/org/languagetool/rules/ca/grammar.xml index f527036f75a0a..7d23596ae4f86 100644 --- a/languagetool-language-modules/ca/src/main/resources/org/languagetool/rules/ca/grammar.xml +++ b/languagetool-language-modules/ca/src/main/resources/org/languagetool/rules/ca/grammar.xml @@ -80641,7 +80641,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA pal - telègraf|electricitat|llum + telègraf|electricitat|llum|fregar|porteria|porteries|bandera|paller @@ -80688,7 +80688,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - quin + quinde pal @@ -80696,6 +80696,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA quina llauna quin rotllo Quin pal! + No sabem de quin pal va. diff --git a/languagetool-language-modules/ca/src/main/resources/org/languagetool/rules/ca/replace.txt b/languagetool-language-modules/ca/src/main/resources/org/languagetool/rules/ca/replace.txt index a1f7a6dedb636..1c9ca28cffbae 100644 --- a/languagetool-language-modules/ca/src/main/resources/org/languagetool/rules/ca/replace.txt +++ b/languagetool-language-modules/ca/src/main/resources/org/languagetool/rules/ca/replace.txt @@ -1,3 +1,5 @@ +cantinela|cantinel·la=cantarella|cançó +cantineles|cantinel·les=cantarelles|cançons patotxada|patochada=disbarat|bestiesa|desficaci|destarifo patotxades|patochades=disbarats|bestieses|desficacis|destarifos tmb=també|TMB|amb|tomb|tub diff --git a/languagetool-language-modules/es/src/main/resources/org/languagetool/resource/es/added.txt b/languagetool-language-modules/es/src/main/resources/org/languagetool/resource/es/added.txt index 49c055c33ce2b..240d6e1cb71ba 100644 --- a/languagetool-language-modules/es/src/main/resources/org/languagetool/resource/es/added.txt +++ b/languagetool-language-modules/es/src/main/resources/org/languagetool/resource/es/added.txt @@ -1545,6 +1545,8 @@ Stan Stan NPCNSP0 Stoica Stoica NPCNSP0 Subirana Subirana NPCNSP0 Sueiro Sueiro NPCNSP0 +Sulzberger Sulzberger NPCNSP0 +Summerhill Summerhill NPCSO00 Sun Sun NPCNSP0 Sureda Sureda NPCNSP0 Susu Susu NPFSSP0 diff --git a/languagetool-language-modules/es/src/main/resources/org/languagetool/resource/es/hunspell/spelling.txt b/languagetool-language-modules/es/src/main/resources/org/languagetool/resource/es/hunspell/spelling.txt index 95ab7117118b2..e6ac76f285c81 100644 --- a/languagetool-language-modules/es/src/main/resources/org/languagetool/resource/es/hunspell/spelling.txt +++ b/languagetool-language-modules/es/src/main/resources/org/languagetool/resource/es/hunspell/spelling.txt @@ -1505,6 +1505,8 @@ Stan Stoica Subirana Sueiro +Sulzberger +Summerhill Sun Sureda Susu From 0997e4efc1e84047872215cf171c1d771ce38a9d Mon Sep 17 00:00:00 2001 From: Fred Kruse Date: Sun, 7 Jan 2024 16:09:30 +0100 Subject: [PATCH 13/44] [LO extension] solves a problem with cache of analyzed sentences --- .../openoffice/DocumentCache.java | 65 +++++++++++++++++-- .../openoffice/SwJLanguageTool.java | 32 ++++----- 2 files changed, 77 insertions(+), 20 deletions(-) diff --git a/languagetool-office-extension/src/main/java/org/languagetool/openoffice/DocumentCache.java b/languagetool-office-extension/src/main/java/org/languagetool/openoffice/DocumentCache.java index 061be01117ac6..c944e30f74969 100644 --- a/languagetool-office-extension/src/main/java/org/languagetool/openoffice/DocumentCache.java +++ b/languagetool-office-extension/src/main/java/org/languagetool/openoffice/DocumentCache.java @@ -27,6 +27,10 @@ import java.util.concurrent.locks.ReentrantReadWriteLock; import org.languagetool.AnalyzedSentence; +import org.languagetool.AnalyzedToken; +import org.languagetool.AnalyzedTokenReadings; +import org.languagetool.markup.AnnotatedText; +import org.languagetool.markup.AnnotatedTextBuilder; import org.languagetool.openoffice.OfficeTools.DocumentType; import com.sun.star.lang.Locale; @@ -204,9 +208,10 @@ public List createAnalyzedParagraph(int nFPara, SwJLanguageToo return null; } paraText = SingleCheck.removeFootnotes(paraText, - getFlatParagraphFootnotes(nFPara), getFlatParagraphDeletedCharacters(nFPara)) - + OfficeTools.END_OF_PARAGRAPH; - List analyzedParagraph = lt.analyzeText(paraText); + getFlatParagraphFootnotes(nFPara), getFlatParagraphDeletedCharacters(nFPara)); +// + OfficeTools.END_OF_PARAGRAPH; + AnnotatedText text = new AnnotatedTextBuilder().addText(paraText).build(); + List analyzedParagraph = lt.analyzeText(text.getPlainText()); putAnalyzedParagraph(nFPara, analyzedParagraph); return analyzedParagraph; } @@ -235,7 +240,39 @@ public List getAnalyzedParagraphs(TextParagraph from, TextPara if (analyzedParagraph == null) { return null; } - analyzedParagraphs.addAll(analyzedParagraph); + if (analyzedParagraph.size() == 0) { + int last = analyzedParagraphs.size() - 1; + AnalyzedSentence sentence = analyzedParagraphs.get(last); + AnalyzedTokenReadings[] tokens = sentence.getTokens(); + int len = tokens.length; + AnalyzedTokenReadings[] newTokens = new AnalyzedTokenReadings[len + 2]; + for (int k = 0; k < len; k++) { + newTokens[k] = tokens[k]; + } + int startPos = tokens[len - 1].getEndPos(); + newTokens[len] = new AnalyzedTokenReadings(new AnalyzedToken("\n", null, null), startPos); + newTokens[len + 1] = new AnalyzedTokenReadings(new AnalyzedToken("\n", null, null), startPos + 1); + sentence = new AnalyzedSentence(newTokens); + analyzedParagraphs.set(last, sentence); + } else { + for (int j = 0; j < analyzedParagraph.size(); j++) { + AnalyzedSentence sentence = analyzedParagraph.get(j); + if (j == analyzedParagraph.size() - 1 && i < to.number - 1) { + AnalyzedTokenReadings[] tokens = sentence.getTokens(); + int len = tokens.length; + AnalyzedTokenReadings[] newTokens = new AnalyzedTokenReadings[len + 2]; + for (int k = 0; k < len; k++) { + newTokens[k] = tokens[k]; + } + int startPos = tokens[len - 1].getEndPos(); + newTokens[len] = new AnalyzedTokenReadings(new AnalyzedToken("\n", null, null), startPos); + newTokens[len + 1] = new AnalyzedTokenReadings(new AnalyzedToken("\n", null, null), startPos + 1); + sentence = new AnalyzedSentence(newTokens); + } + analyzedParagraphs.add(sentence); + } + } +// analyzedParagraphs.addAll(analyzedParagraph); } return analyzedParagraphs; } @@ -250,6 +287,26 @@ public TextParagraph(int type, int number) { this.number = number; } } + + public static void printTokenizedSentences(List sentences) { + for (AnalyzedSentence sentence : sentences) { + String str = ""; + for (AnalyzedTokenReadings token : sentence.getTokens()) { + str += "'" + token.getToken(); + if (token.isSentenceStart()) { + str += "{sent start}"; + } + if (token.isSentenceEnd()) { + str += "{sent end}"; + } + if (token.isParagraphEnd()) { + str += "{para end}"; + } + str += "' "; + } + MessageHandler.printToLogFile("Sentence: " + str); + } + } public static class ChangedRange { final public int from; diff --git a/languagetool-office-extension/src/main/java/org/languagetool/openoffice/SwJLanguageTool.java b/languagetool-office-extension/src/main/java/org/languagetool/openoffice/SwJLanguageTool.java index 4244c41a18177..b57f20877b153 100644 --- a/languagetool-office-extension/src/main/java/org/languagetool/openoffice/SwJLanguageTool.java +++ b/languagetool-office-extension/src/main/java/org/languagetool/openoffice/SwJLanguageTool.java @@ -401,33 +401,30 @@ public List check(String text, ParagraphHandling paraMode, Mode mode, int nFPara, SingleDocument document, SwJLanguageTool lt) throws IOException { List analyzedSentences = document.getDocumentCache().getOrCreateAnalyzedParagraph(nFPara, lt); - text = document.getDocumentCache().getFlatParagraph(nFPara); +// text = document.getDocumentCache().getFlatParagraph(nFPara) + OfficeTools.END_OF_PARAGRAPH; +// List sentences = sentenceTokenize(text); List sentences = new ArrayList<>(); for (AnalyzedSentence analyzedSentence : analyzedSentences) { sentences.add(analyzedSentence.getText()); } - return checkInternal(new AnnotatedTextBuilder().addText(text + OfficeTools.END_OF_PARAGRAPH).build(), paraMode, null, mode, + return checkInternal(new AnnotatedTextBuilder().addText(text).build(), paraMode, null, mode, Level.PICKY, null, sentences, analyzedSentences).getRuleMatches(); } public List check(String text, ParagraphHandling paraMode, Mode mode, TextParagraph from, TextParagraph to, SingleDocument document, SwJLanguageTool lt) throws IOException { List analyzedSentences = document.getDocumentCache().getAnalyzedParagraphs(from, to, lt); +// text += OfficeTools.END_OF_PARAGRAPH; +// List sentences = sentenceTokenize(text); List sentences = new ArrayList<>(); for (AnalyzedSentence analyzedSentence : analyzedSentences) { sentences.add(analyzedSentence.getText()); } -/* - if ((to - from) > 1) { - String texts = ""; - for (String s : sentences) { - texts += s; - } - MessageHandler.printToLogFile("Text O:" + text); - MessageHandler.printToLogFile("Text S:" + texts); - } -*/ - return checkInternal(new AnnotatedTextBuilder().addText(text + OfficeTools.END_OF_PARAGRAPH).build(), paraMode, null, mode, + MessageHandler.printToLogFile("\nTest cache generated:"); + DocumentCache.printTokenizedSentences(analyzedSentences); + MessageHandler.printToLogFile("\nTest direct generated:"); + DocumentCache.printTokenizedSentences(lt.analyzeText(text)); + return checkInternal(new AnnotatedTextBuilder().addText(text).build(), paraMode, null, mode, Level.PICKY, null, sentences, analyzedSentences).getRuleMatches(); } @@ -443,23 +440,26 @@ public List check(String text, ParagraphHandling paraMode, Mode mode, int nFPara, SingleDocument document, SwJLanguageTool lt) throws IOException { List analyzedSentences = document.getDocumentCache().getOrCreateAnalyzedParagraph(nFPara, lt); - text = document.getDocumentCache().getFlatParagraph(nFPara); +// text = document.getDocumentCache().getFlatParagraph(nFPara) + OfficeTools.END_OF_PARAGRAPH; +// List sentences = sentenceTokenize(text); List sentences = new ArrayList<>(); for (AnalyzedSentence analyzedSentence : analyzedSentences) { sentences.add(analyzedSentence.getText()); } - return checkInternal(new AnnotatedTextBuilder().addText(text + OfficeTools.END_OF_PARAGRAPH).build(), paraMode, null, mode, + return checkInternal(new AnnotatedTextBuilder().addText(text).build(), paraMode, null, mode, Level.PICKY, null, sentences, analyzedSentences).getRuleMatches(); } public List check(String text, ParagraphHandling paraMode, Mode mode, TextParagraph from, TextParagraph to, SingleDocument document, SwJLanguageTool lt) throws IOException { List analyzedSentences = document.getDocumentCache().getAnalyzedParagraphs(from, to, lt); +// text += OfficeTools.END_OF_PARAGRAPH; +// List sentences = sentenceTokenize(text); List sentences = new ArrayList<>(); for (AnalyzedSentence analyzedSentence : analyzedSentences) { sentences.add(analyzedSentence.getText()); } - return checkInternal(new AnnotatedTextBuilder().addText(text + OfficeTools.END_OF_PARAGRAPH).build(), paraMode, null, mode, + return checkInternal(new AnnotatedTextBuilder().addText(text).build(), paraMode, null, mode, Level.PICKY, null, sentences, analyzedSentences).getRuleMatches(); } From f3b32c3968ed8dd3a220d70477361e52eb64c9d5 Mon Sep 17 00:00:00 2001 From: Fred Kruse Date: Sun, 7 Jan 2024 16:16:58 +0100 Subject: [PATCH 14/44] [LO extension] remove unnecessary output to log file --- .../main/java/org/languagetool/openoffice/DocumentCache.java | 4 ++-- .../java/org/languagetool/openoffice/SwJLanguageTool.java | 4 ---- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/languagetool-office-extension/src/main/java/org/languagetool/openoffice/DocumentCache.java b/languagetool-office-extension/src/main/java/org/languagetool/openoffice/DocumentCache.java index c944e30f74969..a4830911a170e 100644 --- a/languagetool-office-extension/src/main/java/org/languagetool/openoffice/DocumentCache.java +++ b/languagetool-office-extension/src/main/java/org/languagetool/openoffice/DocumentCache.java @@ -287,7 +287,7 @@ public TextParagraph(int type, int number) { this.number = number; } } - +/* public static void printTokenizedSentences(List sentences) { for (AnalyzedSentence sentence : sentences) { String str = ""; @@ -307,7 +307,7 @@ public static void printTokenizedSentences(List sentences) { MessageHandler.printToLogFile("Sentence: " + str); } } - +*/ public static class ChangedRange { final public int from; final public int to; diff --git a/languagetool-office-extension/src/main/java/org/languagetool/openoffice/SwJLanguageTool.java b/languagetool-office-extension/src/main/java/org/languagetool/openoffice/SwJLanguageTool.java index b57f20877b153..2815da3da3d92 100644 --- a/languagetool-office-extension/src/main/java/org/languagetool/openoffice/SwJLanguageTool.java +++ b/languagetool-office-extension/src/main/java/org/languagetool/openoffice/SwJLanguageTool.java @@ -420,10 +420,6 @@ public List check(String text, ParagraphHandling paraMode, Mode mode, for (AnalyzedSentence analyzedSentence : analyzedSentences) { sentences.add(analyzedSentence.getText()); } - MessageHandler.printToLogFile("\nTest cache generated:"); - DocumentCache.printTokenizedSentences(analyzedSentences); - MessageHandler.printToLogFile("\nTest direct generated:"); - DocumentCache.printTokenizedSentences(lt.analyzeText(text)); return checkInternal(new AnnotatedTextBuilder().addText(text).build(), paraMode, null, mode, Level.PICKY, null, sentences, analyzedSentences).getRuleMatches(); } From d1ee7f8bb03de2030ffa73d3c32c6431c983fb43 Mon Sep 17 00:00:00 2001 From: Andriy Rysin Date: Tue, 2 Jan 2024 17:34:20 -0500 Subject: [PATCH 15/44] [uk] new rules --- .../rules/uk/grammar-barbarism.xml | 44 ++++++++++++++++--- 1 file changed, 37 insertions(+), 7 deletions(-) diff --git a/languagetool-language-modules/uk/src/main/resources/org/languagetool/rules/uk/grammar-barbarism.xml b/languagetool-language-modules/uk/src/main/resources/org/languagetool/rules/uk/grammar-barbarism.xml index 594d258b3b556..7c9c6ff932d3b 100644 --- a/languagetool-language-modules/uk/src/main/resources/org/languagetool/rules/uk/grammar-barbarism.xml +++ b/languagetool-language-modules/uk/src/main/resources/org/languagetool/rules/uk/grammar-barbarism.xml @@ -3618,15 +3618,14 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA за - + рахунок - Правильно: коштом + Правильно: коштом за свій рахунок за їхній рахунок за її рахунок за власний рахунок - коштом держави @@ -3637,7 +3636,28 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA Краще: коштом, шляхом, користуючись з, ким/чим, внаслідок завдяки за рахунок держави - коштом держави + + + + + за + рахунок + + коштів + + Краще: з \3 \4 + за рахунок коштів + за рахунок бюджетних коштів + + + + + за + рахунок + субвенції|бюджету + + Краще: з коштів \3 + за рахунок субвенції @@ -4677,7 +4697,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - більше + більше? не того @@ -4690,7 +4710,8 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA до того ще й надто Шухевич знав про це, більше того, він допоміг виробити - ене, чесно кажучи, заскочило, більше того - обурило… + мене, чесно кажучи, заскочило, більше того - обурило… + Більш того, він все знав… ...процесу в Україні, і не більше того. щораз більше того самого. не в стані більше того витримувати фізично @@ -4700,7 +4721,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA не - більше + більше? того &punct_std; @@ -7510,6 +7531,15 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA сплячого на океані + + + контролюючий + орган + + Правильно: \2 контролю + контролюючим органом. + + на From ab1f4c55a391a203c7d7226cd53f344942bfe83f Mon Sep 17 00:00:00 2001 From: Andriy Rysin Date: Sun, 7 Jan 2024 12:09:35 -0500 Subject: [PATCH 16/44] [uk] simple replacement improvements --- .../resources/org/languagetool/rules/uk/replace.txt | 10 ++++++++-- .../languagetool/rules/uk/replace_spelling_2019.txt | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/languagetool-language-modules/uk/src/main/resources/org/languagetool/rules/uk/replace.txt b/languagetool-language-modules/uk/src/main/resources/org/languagetool/rules/uk/replace.txt index 50bd70030915a..20125955a6fb0 100644 --- a/languagetool-language-modules/uk/src/main/resources/org/languagetool/rules/uk/replace.txt +++ b/languagetool-language-modules/uk/src/main/resources/org/languagetool/rules/uk/replace.txt @@ -486,6 +486,7 @@ верховнокомандуючий=верховнокомандувач весельчак=веселун|сміхун|жартун вживу=наживо|особисто|безпосередньо|віч-на-віч|наочно|на власні очі +взаємнопроникаючий=взаємопроникний взаємодіючий=що взаємодіє|взаємодійний|скоординований|співзалежний|взаємної дії взаємокоординація=координація взаємообумовлений=взаємозалежний|взаємопов'язаний|зв'язаний|співзалежний @@ -1623,6 +1624,9 @@ закликаючий=що закликає|закликач|закличний|зазивний заклинок=заплішка заключати=ув'язнювати|зачиняти|замикати|закидати|засаджувати|містити|вміщати|мати в собі|виводити|робити висновок|висновувати|кінчати|складати|укладати|підписувати +боязнь=острах +водобоязнь=сказ|скаженівка|скажениця|гідрофобія +світлобоязнь=фотофобія заключатися=полягати|кінчатися|міститися|ув'язнюватися заключення=ув'язнення|зачиняння|замикання|висновок|кінець|закінчення|складання (умови тощо)|підписування заключити=ув'язнити|зачинити|замкнути|закинути|засадити|вмістити|вивести|зробити висновок|виснувати|скінчити|закінчити|скласти|укласти|підписати @@ -4351,7 +4355,7 @@ призупинка=припиняння|припинення|припинка|перепинка|перестанок приїск=копальня|копня приймаючий=що приймає|приймальний|приймач|приймальник -прийом=приймання|прийняття|вітання|зустріч|напад|захід|раз|спосіб|вдача +прийом=приймання|прийняття|спосіб|захід|раз прийомка=приймання прийомний=приймальний|вступний|вітальний|порційний|названий прийомник=приймач|приймальник @@ -4535,11 +4539,13 @@ проминаючий=що минає (проходить, проминає, спливає, збігає)|минущий|проминущий|проминальний|зникомий|прохідний|перехідний|перехожий промовляючий=що промовляє|промовистий промокашка=промокальниця +барабанщик=барабанник +барабанщиця=барабанниця промоушен=реклама|просування|стимулювання|популяризація|підтримка|допомога промоушн=реклама|просування|стимулювання|популяризація|підтримка|допомога пронизуючий=що пронизує|пронизливий|пронизуватий|проникливий|гострий|верескливий|різкий|проразливий|шпуйний проникатися=пройматися|перейматися -проникаючий=що проходить|що промикується|що просмикується|проникливий +проникаючий=що проходить|що промикується|що просмикується|проникний|проникливий проникнутий=пройнятий|перейнятий проникнутися=перейнятися|пройнятися|набратися чого|пройти чим пропадаючий=що пропадає|напівзниклий|зникомий|пропащий diff --git a/languagetool-language-modules/uk/src/main/resources/org/languagetool/rules/uk/replace_spelling_2019.txt b/languagetool-language-modules/uk/src/main/resources/org/languagetool/rules/uk/replace_spelling_2019.txt index 9e58c47f84074..f4c31087dd0be 100644 --- a/languagetool-language-modules/uk/src/main/resources/org/languagetool/rules/uk/replace_spelling_2019.txt +++ b/languagetool-language-modules/uk/src/main/resources/org/languagetool/rules/uk/replace_spelling_2019.txt @@ -84,7 +84,7 @@ бліц-вікторина=бліцвікторина бліц-інтерв'ю=бліцінтерв'ю бліц-криг=бліцкриг -бліц-кріг=бліцкріг +бліц-кріг=бліцкриг бліц-новина=бліцновина бліц-опитування=бліцопитування бліц-спілкування=бліцспілкування From 2ac97bf534e85a8e7ccc02e93b6441d80c5b64d2 Mon Sep 17 00:00:00 2001 From: mark-baas Date: Mon, 8 Jan 2024 14:25:17 +0700 Subject: [PATCH 17/44] [nl] add replaces --- .../languagetool/resource/nl/multipartcompounds.txt | 11 ++++++++++- .../resources/org/languagetool/rules/nl/replace.txt | 12 +++++++++++- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/languagetool-language-modules/nl/src/main/resources/org/languagetool/resource/nl/multipartcompounds.txt b/languagetool-language-modules/nl/src/main/resources/org/languagetool/resource/nl/multipartcompounds.txt index e68af4f717856..26035f7a1ffed 100644 --- a/languagetool-language-modules/nl/src/main/resources/org/languagetool/resource/nl/multipartcompounds.txt +++ b/languagetool-language-modules/nl/src/main/resources/org/languagetool/resource/nl/multipartcompounds.txt @@ -11609,4 +11609,13 @@ infrarood panelen aardrijkskunde examen record orderontvangst documentaire reeks -reality gameshow \ No newline at end of file +reality gameshow +vierkante meter tuin|Een tuin van een vierkante meter is als een begrip een vierkantemetertuin. +housekeeper vacatures +casino spelen +lithium accu's +pastinaaksoep recept +tattoo shop +dubbelstaafmat hekwerk +ontbijt smoothie +ergometer hometrainer \ No newline at end of file diff --git a/languagetool-language-modules/nl/src/main/resources/org/languagetool/rules/nl/replace.txt b/languagetool-language-modules/nl/src/main/resources/org/languagetool/rules/nl/replace.txt index 43ea34107f6a4..cccb2f06823b3 100644 --- a/languagetool-language-modules/nl/src/main/resources/org/languagetool/rules/nl/replace.txt +++ b/languagetool-language-modules/nl/src/main/resources/org/languagetool/rules/nl/replace.txt @@ -66340,4 +66340,14 @@ putberg=Putberg putbos=Putbos putbroek=Putbroek mastercard=Mastercard -krip in=krimp in \ No newline at end of file +krip in=krimp in +~=≈|— Een tilde (~) wordt normaal gesproken alleen op letters gebruikt. Ongeveer is ≈, een gedachtestreep is — +geblurd=vervaagd Er is ook een Nederlandse term voor. +Hang- en sluitwerk=Hang-en-sluitwerk +Jones & Jones outlets=Jones & Jones-outlets +kind (eren)=kind(eren)|kinderen +kluskoning (in)=kluskoning(in) +koning (in)=koning(in) +vriend (in)=vriend(in) +5L=5 l|5 liter +dit houtsoort=deze houtsoort \ No newline at end of file From cefaa27afcf623b532282a64992213b8f828da74 Mon Sep 17 00:00:00 2001 From: Daniel Naber Date: Mon, 8 Jan 2024 08:36:43 +0100 Subject: [PATCH 18/44] [de] adding word --- .../resources/org/languagetool/resource/de/hunspell/spelling.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/languagetool-language-modules/de/src/main/resources/org/languagetool/resource/de/hunspell/spelling.txt b/languagetool-language-modules/de/src/main/resources/org/languagetool/resource/de/hunspell/spelling.txt index cec6e3bf474d6..eb98caa60bbde 100644 --- a/languagetool-language-modules/de/src/main/resources/org/languagetool/resource/de/hunspell/spelling.txt +++ b/languagetool-language-modules/de/src/main/resources/org/languagetool/resource/de/hunspell/spelling.txt @@ -63754,6 +63754,7 @@ einkommensabhängig/A Skye Terrier/SN Biewer Terrier/SN braunfarben/A +Klägeranwaltes Retinaatrophie Trachealkollaps Distichiasis From 019215f14b6f180f513d7ee93e16794d248134f8 Mon Sep 17 00:00:00 2001 From: Daniel Naber Date: Mon, 8 Jan 2024 08:37:15 +0100 Subject: [PATCH 19/44] wti pull --- .../resources/org/languagetool/MessagesBundle_ar.properties | 2 ++ .../org/languagetool/MessagesBundle_ast.properties | 2 ++ .../resources/org/languagetool/MessagesBundle_be.properties | 2 ++ .../resources/org/languagetool/MessagesBundle_br.properties | 2 ++ .../resources/org/languagetool/MessagesBundle_ca.properties | 2 ++ .../resources/org/languagetool/MessagesBundle_da.properties | 2 ++ .../resources/org/languagetool/MessagesBundle_de.properties | 2 ++ .../resources/org/languagetool/MessagesBundle_el.properties | 2 ++ .../resources/org/languagetool/MessagesBundle_eo.properties | 2 ++ .../resources/org/languagetool/MessagesBundle_es.properties | 2 ++ .../resources/org/languagetool/MessagesBundle_fa.properties | 2 ++ .../resources/org/languagetool/MessagesBundle_fr.properties | 6 ++++-- .../resources/org/languagetool/MessagesBundle_gl.properties | 2 ++ .../resources/org/languagetool/MessagesBundle_it.properties | 2 ++ .../resources/org/languagetool/MessagesBundle_ja.properties | 2 ++ .../resources/org/languagetool/MessagesBundle_km.properties | 2 ++ .../resources/org/languagetool/MessagesBundle_lt.properties | 2 ++ .../resources/org/languagetool/MessagesBundle_nl.properties | 2 ++ .../resources/org/languagetool/MessagesBundle_pl.properties | 2 ++ .../org/languagetool/MessagesBundle_pt_BR.properties | 2 ++ .../org/languagetool/MessagesBundle_pt_PT.properties | 2 ++ .../resources/org/languagetool/MessagesBundle_ro.properties | 2 ++ .../resources/org/languagetool/MessagesBundle_ru.properties | 2 ++ .../resources/org/languagetool/MessagesBundle_sk.properties | 2 ++ .../resources/org/languagetool/MessagesBundle_sl.properties | 2 ++ .../resources/org/languagetool/MessagesBundle_sv.properties | 2 ++ .../resources/org/languagetool/MessagesBundle_ta.properties | 2 ++ .../resources/org/languagetool/MessagesBundle_tl.properties | 2 ++ .../resources/org/languagetool/MessagesBundle_uk.properties | 2 ++ .../resources/org/languagetool/MessagesBundle_zh.properties | 2 ++ 30 files changed, 62 insertions(+), 2 deletions(-) diff --git a/languagetool-language-modules/ar/src/main/resources/org/languagetool/MessagesBundle_ar.properties b/languagetool-language-modules/ar/src/main/resources/org/languagetool/MessagesBundle_ar.properties index 9aa03c6dc9b91..23c7e11b512f2 100644 --- a/languagetool-language-modules/ar/src/main/resources/org/languagetool/MessagesBundle_ar.properties +++ b/languagetool-language-modules/ar/src/main/resources/org/languagetool/MessagesBundle_ar.properties @@ -182,6 +182,8 @@ guiTechnicalSettings = \u0627\u0644\u0625\u0639\u062f\u0627\u062f\u0627\u062a \u guiCheckFullTextAtFirst = \u062f\u0642\u0642 \u0627\u0644\u0646\u0635 \u0643\u0644\u0651\u0647 \u0628\u0639\u062f \u062a\u062d\u0645\u064a\u0644 \u0645\u0633\u062a\u0646\u062f guiUseLtDictionary = \u0623\u0636\u0641 \u0642\u0627\u0645\u0648\u0633 \u0623\u062f\u0627\u0629 \u0627\u0644\u0644\u063a\u0629 LanguageTool \u0625\u0644\u0649 \u062a\u062f\u0642\u064a\u0642 \u0625\u0645\u0644\u0627\u0621 \u0644\u064a\u0628\u0631\u0623\u0648\u0641\u064a\u0633 LibreOffice guiNoSynonymsAsSuggestions = \u0644\u0627 \u062a\u0633\u062a\u062e\u062f\u0645 \u0627\u0644\u0645\u062a\u0631\u0627\u062f\u0641\u0627\u062a \u0627\u0642\u062a\u0631\u0627\u062d\u0627\u062a\u064d (\u0623\u0633\u0631\u0639\u060c \u064a\u0623\u062e\u0630 \u0641\u064a \u0627\u0644\u062d\u0633\u0628\u0627\u0646 \u0628\u0636\u0639\u0629 \u0642\u0648\u0627\u0639\u062f \u0641\u062d\u0633\u0628) +guiIncludeTrackedChanges = Include tracked changes +guiActivateTempOffRules = Enable temporarily disabled rules guiSaveCacheToFile = \u0627\u062d\u0641\u0638 \u0627\u0644\u062e\u0628\u064a\u0626\u0629 \u0641\u064a \u0645\u0650\u0644\u0641 guiUseRemoteServer = \u0627\u0633\u062a\u062e\u062f\u0645 \u0627\u0644\u062e\u0627\u062f\u0648\u0645 \u0627\u0644\u0628\u0639\u064a\u062f \u0644\u062a\u062f\u0642\u064a\u0642 \u0627\u0644\u0646\u0635 guiUseServer = \u0627\u0633\u062a\u062e\u062f\u0645 \u0627\u0644\u062e\u0627\u062f\u0648\u0645: diff --git a/languagetool-language-modules/ast/src/main/resources/org/languagetool/MessagesBundle_ast.properties b/languagetool-language-modules/ast/src/main/resources/org/languagetool/MessagesBundle_ast.properties index 9c7991611e54d..abd14250e8750 100644 --- a/languagetool-language-modules/ast/src/main/resources/org/languagetool/MessagesBundle_ast.properties +++ b/languagetool-language-modules/ast/src/main/resources/org/languagetool/MessagesBundle_ast.properties @@ -182,6 +182,8 @@ guiTechnicalSettings = Technical settings: guiCheckFullTextAtFirst = Check full text after a document is loaded guiUseLtDictionary = Add LanguageTool dictionary to LibreOffice spell check guiNoSynonymsAsSuggestions = Do not use synonyms as suggestions (faster, regards only few rules) +guiIncludeTrackedChanges = Include tracked changes +guiActivateTempOffRules = Enable temporarily disabled rules guiSaveCacheToFile = Save cache to file guiUseRemoteServer = Use remote server to check text guiUseServer = Use server: diff --git a/languagetool-language-modules/be/src/main/resources/org/languagetool/MessagesBundle_be.properties b/languagetool-language-modules/be/src/main/resources/org/languagetool/MessagesBundle_be.properties index 39d3d467bfa89..292a59673dd2b 100644 --- a/languagetool-language-modules/be/src/main/resources/org/languagetool/MessagesBundle_be.properties +++ b/languagetool-language-modules/be/src/main/resources/org/languagetool/MessagesBundle_be.properties @@ -182,6 +182,8 @@ guiTechnicalSettings = Technical settings: guiCheckFullTextAtFirst = \u041f\u0440\u0430\u0432\u044f\u0440\u0430\u0446\u044c \u0443\u0432\u0435\u0441\u044c \u0442\u044d\u043a\u0441\u0442 \u043f\u0430\u0441\u043b\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0456 \u0434\u0430\u043a\u0443\u043c\u0435\u043d\u0442\u0430 guiUseLtDictionary = \u0414\u0430\u0434\u0430\u0446\u044c \u0441\u043b\u043e\u045e\u043d\u0456\u043a LanguageTool \u0434\u0430 \u043f\u0440\u0430\u0432\u0430\u043f\u0456\u0441\u0443 LibreOffice guiNoSynonymsAsSuggestions = \u041d\u0435 \u0432\u044b\u043a\u0430\u0440\u044b\u0441\u0442\u043e\u045e\u0432\u0430\u0446\u044c \u0441\u0456\u043d\u043e\u043d\u0456\u043c\u044b \u045e \u044f\u043a\u0430\u0441\u0446\u0456 \u043f\u0440\u0430\u043f\u0430\u043d\u043e\u045e (\u0445\u0443\u0442\u0447\u044d\u0439, \u0434\u0430\u0442\u044b\u0447\u044b\u0446\u0446\u0430 \u0442\u043e\u043b\u044c\u043a\u0456 \u043d\u0435\u043a\u0430\u0442\u043e\u0440\u044b\u0445 \u043f\u0440\u0430\u0432\u0456\u043b\u0430\u045e) +guiIncludeTrackedChanges = Include tracked changes +guiActivateTempOffRules = Enable temporarily disabled rules guiSaveCacheToFile = Save cache to file guiUseRemoteServer = \u0412\u044b\u043a\u0430\u0440\u044b\u0441\u0442\u043e\u045e\u0432\u0430\u0446\u044c \u0430\u0434\u0434\u0430\u043b\u0435\u043d\u044b \u0441\u0435\u0440\u0432\u0435\u0440 \u0434\u043b\u044f \u043f\u0440\u0430\u0432\u0435\u0440\u043a\u0456 \u0442\u044d\u043a\u0441\u0442\u0443 guiUseServer = \u0412\u044b\u043a\u0430\u0440\u044b\u0441\u0442\u043e\u045e\u0432\u0430\u0446\u044c \u0441\u0435\u0440\u0432\u0435\u0440: diff --git a/languagetool-language-modules/br/src/main/resources/org/languagetool/MessagesBundle_br.properties b/languagetool-language-modules/br/src/main/resources/org/languagetool/MessagesBundle_br.properties index e967ec112a8a3..0399d0eeed0ac 100644 --- a/languagetool-language-modules/br/src/main/resources/org/languagetool/MessagesBundle_br.properties +++ b/languagetool-language-modules/br/src/main/resources/org/languagetool/MessagesBundle_br.properties @@ -182,6 +182,8 @@ guiTechnicalSettings = Technical settings: guiCheckFullTextAtFirst = Gwiria\u00f1 an destenn a-bezh ur wech karget un teuliad guiUseLtDictionary = Ouzhpenna\u00f1 geriadur LanguageTool da difazier reizhskrivadurel LibreOffice guiNoSynonymsAsSuggestions = Chom hep implijout ar sinonimo\u00f9 evel kinnigo\u00f9 (primoc'h e-ke\u00f1ver un dornad reolenno\u00f9) +guiIncludeTrackedChanges = Include tracked changes +guiActivateTempOffRules = Enable temporarily disabled rules guiSaveCacheToFile = Save cache to file guiUseRemoteServer = Implijout ar servijer a-bell evit gwiria\u00f1 an destenn guiUseServer = Implijout ar servijer: diff --git a/languagetool-language-modules/ca/src/main/resources/org/languagetool/MessagesBundle_ca.properties b/languagetool-language-modules/ca/src/main/resources/org/languagetool/MessagesBundle_ca.properties index 6cb4ce2a11cb9..aef3e893cde13 100644 --- a/languagetool-language-modules/ca/src/main/resources/org/languagetool/MessagesBundle_ca.properties +++ b/languagetool-language-modules/ca/src/main/resources/org/languagetool/MessagesBundle_ca.properties @@ -182,6 +182,8 @@ guiTechnicalSettings = Par\u00e0metres t\u00e8cnics: guiCheckFullTextAtFirst = Revisa el text complet despr\u00e9s de carregar un document guiUseLtDictionary = Afegeix el diccionari de LanguageTool a la revisi\u00f3 ortogr\u00e0fica de LibreOffice guiNoSynonymsAsSuggestions = No facis servir sin\u00f2nims com a suggeriments (m\u00e9s r\u00e0pid, sols afecta poques regles) +guiIncludeTrackedChanges = Include tracked changes +guiActivateTempOffRules = Enable temporarily disabled rules guiSaveCacheToFile = Desa la mem\u00f2ria cau en fitxer guiUseRemoteServer = Utilitza un servidor remot per a revisar el text guiUseServer = Usa el servidor: diff --git a/languagetool-language-modules/da/src/main/resources/org/languagetool/MessagesBundle_da.properties b/languagetool-language-modules/da/src/main/resources/org/languagetool/MessagesBundle_da.properties index 905b02e0399b2..f083799d025b1 100644 --- a/languagetool-language-modules/da/src/main/resources/org/languagetool/MessagesBundle_da.properties +++ b/languagetool-language-modules/da/src/main/resources/org/languagetool/MessagesBundle_da.properties @@ -182,6 +182,8 @@ guiTechnicalSettings = Technical settings: guiCheckFullTextAtFirst = Check full text after a document is loaded guiUseLtDictionary = Add LanguageTool dictionary to LibreOffice spell check guiNoSynonymsAsSuggestions = Do not use synonyms as suggestions (faster, regards only few rules) +guiIncludeTrackedChanges = Include tracked changes +guiActivateTempOffRules = Enable temporarily disabled rules guiSaveCacheToFile = Save cache to file guiUseRemoteServer = Use remote server to check text guiUseServer = Use server: diff --git a/languagetool-language-modules/de/src/main/resources/org/languagetool/MessagesBundle_de.properties b/languagetool-language-modules/de/src/main/resources/org/languagetool/MessagesBundle_de.properties index 5d1e3e5375a3c..887da1941ecec 100644 --- a/languagetool-language-modules/de/src/main/resources/org/languagetool/MessagesBundle_de.properties +++ b/languagetool-language-modules/de/src/main/resources/org/languagetool/MessagesBundle_de.properties @@ -182,6 +182,8 @@ guiTechnicalSettings = Technische Einstellungen: guiCheckFullTextAtFirst = Ganzen Text pr\u00fcfen, nachdem Dokument geladen wurde guiUseLtDictionary = LanguageTool-W\u00f6rterbuch f\u00fcr LibreOffice-Rechtschreibpr\u00fcfung nutzen guiNoSynonymsAsSuggestions = Synonyme nicht als Vorschl\u00e4ge nutzen (schneller) +guiIncludeTrackedChanges = Verfolgte \u00c4nderungen einschlie\u00dfen +guiActivateTempOffRules = Vor\u00fcbergehend deaktivierte Regeln einschalten guiSaveCacheToFile = In Datei zwischenspeichern guiUseRemoteServer = Externen Server zur Textpr\u00fcfung nutzen guiUseServer = Server nutzen: diff --git a/languagetool-language-modules/el/src/main/resources/org/languagetool/MessagesBundle_el.properties b/languagetool-language-modules/el/src/main/resources/org/languagetool/MessagesBundle_el.properties index 9ffb9b358418b..cba121ac1a604 100644 --- a/languagetool-language-modules/el/src/main/resources/org/languagetool/MessagesBundle_el.properties +++ b/languagetool-language-modules/el/src/main/resources/org/languagetool/MessagesBundle_el.properties @@ -182,6 +182,8 @@ guiTechnicalSettings = Technical settings: guiCheckFullTextAtFirst = Check full text after a document is loaded guiUseLtDictionary = Add LanguageTool dictionary to LibreOffice spell check guiNoSynonymsAsSuggestions = Do not use synonyms as suggestions (faster, regards only few rules) +guiIncludeTrackedChanges = Include tracked changes +guiActivateTempOffRules = Enable temporarily disabled rules guiSaveCacheToFile = Save cache to file guiUseRemoteServer = Use remote server to check text guiUseServer = Use server: diff --git a/languagetool-language-modules/eo/src/main/resources/org/languagetool/MessagesBundle_eo.properties b/languagetool-language-modules/eo/src/main/resources/org/languagetool/MessagesBundle_eo.properties index 3ea09538b0f2a..ce2c0f9f7b9e5 100644 --- a/languagetool-language-modules/eo/src/main/resources/org/languagetool/MessagesBundle_eo.properties +++ b/languagetool-language-modules/eo/src/main/resources/org/languagetool/MessagesBundle_eo.properties @@ -182,6 +182,8 @@ guiTechnicalSettings = Technical settings: guiCheckFullTextAtFirst = Check full text after a document is loaded guiUseLtDictionary = Add LanguageTool dictionary to LibreOffice spell check guiNoSynonymsAsSuggestions = Do not use synonyms as suggestions (faster, regards only few rules) +guiIncludeTrackedChanges = Include tracked changes +guiActivateTempOffRules = Enable temporarily disabled rules guiSaveCacheToFile = Save cache to file guiUseRemoteServer = Use remote server to check text guiUseServer = Use server: diff --git a/languagetool-language-modules/es/src/main/resources/org/languagetool/MessagesBundle_es.properties b/languagetool-language-modules/es/src/main/resources/org/languagetool/MessagesBundle_es.properties index bdeb470c255c5..230ad3019508c 100644 --- a/languagetool-language-modules/es/src/main/resources/org/languagetool/MessagesBundle_es.properties +++ b/languagetool-language-modules/es/src/main/resources/org/languagetool/MessagesBundle_es.properties @@ -182,6 +182,8 @@ guiTechnicalSettings = Ajustes t\u00e9cnicos: guiCheckFullTextAtFirst = Revisar el texto completo despu\u00e9s de cargar un documento guiUseLtDictionary = A\u00f1adir el diccionario de LanguageTool al corrector ortogr\u00e1fico de LibreOffice guiNoSynonymsAsSuggestions = No usar sin\u00f3nimos como sugerencias (m\u00e1s r\u00e1pido, considera solo unas pocas reglas) +guiIncludeTrackedChanges = Include tracked changes +guiActivateTempOffRules = Enable temporarily disabled rules guiSaveCacheToFile = Guardar cach\u00e9 en archivo guiUseRemoteServer = Usar el servidor remoto para revisar el texto guiUseServer = Usar el servidor: diff --git a/languagetool-language-modules/fa/src/main/resources/org/languagetool/MessagesBundle_fa.properties b/languagetool-language-modules/fa/src/main/resources/org/languagetool/MessagesBundle_fa.properties index 4f3cacefde797..103a1d98a78eb 100644 --- a/languagetool-language-modules/fa/src/main/resources/org/languagetool/MessagesBundle_fa.properties +++ b/languagetool-language-modules/fa/src/main/resources/org/languagetool/MessagesBundle_fa.properties @@ -182,6 +182,8 @@ guiTechnicalSettings = Technical settings: guiCheckFullTextAtFirst = Check full text after a document is loaded guiUseLtDictionary = Add LanguageTool dictionary to LibreOffice spell check guiNoSynonymsAsSuggestions = Do not use synonyms as suggestions (faster, regards only few rules) +guiIncludeTrackedChanges = Include tracked changes +guiActivateTempOffRules = Enable temporarily disabled rules guiSaveCacheToFile = Save cache to file guiUseRemoteServer = Use remote server to check text guiUseServer = Use server: diff --git a/languagetool-language-modules/fr/src/main/resources/org/languagetool/MessagesBundle_fr.properties b/languagetool-language-modules/fr/src/main/resources/org/languagetool/MessagesBundle_fr.properties index 61f8705442a8b..03ad68e046941 100644 --- a/languagetool-language-modules/fr/src/main/resources/org/languagetool/MessagesBundle_fr.properties +++ b/languagetool-language-modules/fr/src/main/resources/org/languagetool/MessagesBundle_fr.properties @@ -182,6 +182,8 @@ guiTechnicalSettings = Param\u00e8tres techniques : guiCheckFullTextAtFirst = V\u00e9rification int\u00e9grale du texte apr\u00e8s le t\u00e9l\u00e9chargement d'un document guiUseLtDictionary = Ajouter le dictionnaire de LanguageTool \u00e0 la v\u00e9rification d'orthographe de LibreOffice guiNoSynonymsAsSuggestions = Ne pas utiliser des synonymes dans les suggestions (plus rapide, ne concerne que quelques r\u00e8gles) +guiIncludeTrackedChanges = Include tracked changes +guiActivateTempOffRules = Enable temporarily disabled rules guiSaveCacheToFile = Sauvegarder le cache dans un fichier guiUseRemoteServer = Utiliser le serveur distant pour v\u00e9rifier le texte guiUseServer = Utiliser le serveur : @@ -362,8 +364,8 @@ loMenuRemoteInfo = Indice de v\u00e9rification \u00e0 distance loMenuResetIgnorePermanent = R\u00e9initialisation Ignorer en permanence loMenuEnableBackgroundCheck = Activer la v\u00e9rification en arri\u00e8re-plan loMenuDisableBackgroundCheck = D\u00e9sactiver la v\u00e9rification en arri\u00e8re-plan -loMenuGrammarCheckAgain = Recheck Document -loMenuNextError = Next spelling or grammar mistake +loMenuGrammarCheckAgain = Rev\u00e9rifier le document +loMenuNextError = Faute d\u2019orthographe ou de grammaire suivante loMenuChangeProfiles = Changer le profil en loContextMenuRenewMarkups = Renouveler les marqueurs grammaticaux loContextMenuOptions = Options de LanguageTool diff --git a/languagetool-language-modules/gl/src/main/resources/org/languagetool/MessagesBundle_gl.properties b/languagetool-language-modules/gl/src/main/resources/org/languagetool/MessagesBundle_gl.properties index a11543d70b299..2549d3bad71a8 100644 --- a/languagetool-language-modules/gl/src/main/resources/org/languagetool/MessagesBundle_gl.properties +++ b/languagetool-language-modules/gl/src/main/resources/org/languagetool/MessagesBundle_gl.properties @@ -182,6 +182,8 @@ guiTechnicalSettings = Configuraci\u00f3n t\u00e9cnica: guiCheckFullTextAtFirst = Revisar o texto enteiro logo de cargar un documento guiUseLtDictionary = Engadir o dicionario do LanguageTool \u00e1 correcci\u00f3n ortogr\u00e1fica do LibreOffice guiNoSynonymsAsSuggestions = Non empregar sin\u00f3nimos como suxesti\u00f3ns (m\u00e1is r\u00e1pido, considera s\u00f3 poucas regras) +guiIncludeTrackedChanges = Include tracked changes +guiActivateTempOffRules = Enable temporarily disabled rules guiSaveCacheToFile = Gardar a cach\u00e9 nun ficheiro guiUseRemoteServer = Empregar servidor remoto para revisar texto guiUseServer = Empregar servidor: diff --git a/languagetool-language-modules/it/src/main/resources/org/languagetool/MessagesBundle_it.properties b/languagetool-language-modules/it/src/main/resources/org/languagetool/MessagesBundle_it.properties index f01c3db5aecc1..0447ad44f1b0b 100644 --- a/languagetool-language-modules/it/src/main/resources/org/languagetool/MessagesBundle_it.properties +++ b/languagetool-language-modules/it/src/main/resources/org/languagetool/MessagesBundle_it.properties @@ -182,6 +182,8 @@ guiTechnicalSettings = Technical settings: guiCheckFullTextAtFirst = Check full text after a document is loaded guiUseLtDictionary = Add LanguageTool dictionary to LibreOffice spell check guiNoSynonymsAsSuggestions = Do not use synonyms as suggestions (faster, regards only few rules) +guiIncludeTrackedChanges = Include tracked changes +guiActivateTempOffRules = Enable temporarily disabled rules guiSaveCacheToFile = Save cache to file guiUseRemoteServer = Use remote server to check text guiUseServer = Use server: diff --git a/languagetool-language-modules/ja/src/main/resources/org/languagetool/MessagesBundle_ja.properties b/languagetool-language-modules/ja/src/main/resources/org/languagetool/MessagesBundle_ja.properties index 89d828ffd4c63..e6c709d2c99a0 100644 --- a/languagetool-language-modules/ja/src/main/resources/org/languagetool/MessagesBundle_ja.properties +++ b/languagetool-language-modules/ja/src/main/resources/org/languagetool/MessagesBundle_ja.properties @@ -182,6 +182,8 @@ guiTechnicalSettings = Technical settings: guiCheckFullTextAtFirst = Check full text after a document is loaded guiUseLtDictionary = Add LanguageTool dictionary to LibreOffice spell check guiNoSynonymsAsSuggestions = Do not use synonyms as suggestions (faster, regards only few rules) +guiIncludeTrackedChanges = Include tracked changes +guiActivateTempOffRules = Enable temporarily disabled rules guiSaveCacheToFile = Save cache to file guiUseRemoteServer = Use remote server to check text guiUseServer = Use server: diff --git a/languagetool-language-modules/km/src/main/resources/org/languagetool/MessagesBundle_km.properties b/languagetool-language-modules/km/src/main/resources/org/languagetool/MessagesBundle_km.properties index 26021317ac912..45e99fdccd03d 100644 --- a/languagetool-language-modules/km/src/main/resources/org/languagetool/MessagesBundle_km.properties +++ b/languagetool-language-modules/km/src/main/resources/org/languagetool/MessagesBundle_km.properties @@ -182,6 +182,8 @@ guiTechnicalSettings = Technical settings: guiCheckFullTextAtFirst = Check full text after a document is loaded guiUseLtDictionary = Add LanguageTool dictionary to LibreOffice spell check guiNoSynonymsAsSuggestions = Do not use synonyms as suggestions (faster, regards only few rules) +guiIncludeTrackedChanges = Include tracked changes +guiActivateTempOffRules = Enable temporarily disabled rules guiSaveCacheToFile = Save cache to file guiUseRemoteServer = Use remote server to check text guiUseServer = Use server: diff --git a/languagetool-language-modules/lt/src/main/resources/org/languagetool/MessagesBundle_lt.properties b/languagetool-language-modules/lt/src/main/resources/org/languagetool/MessagesBundle_lt.properties index 15b5da310712d..d6d81ed248d74 100644 --- a/languagetool-language-modules/lt/src/main/resources/org/languagetool/MessagesBundle_lt.properties +++ b/languagetool-language-modules/lt/src/main/resources/org/languagetool/MessagesBundle_lt.properties @@ -182,6 +182,8 @@ guiTechnicalSettings = Technical settings: guiCheckFullTextAtFirst = Check full text after a document is loaded guiUseLtDictionary = Add LanguageTool dictionary to LibreOffice spell check guiNoSynonymsAsSuggestions = Do not use synonyms as suggestions (faster, regards only few rules) +guiIncludeTrackedChanges = Include tracked changes +guiActivateTempOffRules = Enable temporarily disabled rules guiSaveCacheToFile = Save cache to file guiUseRemoteServer = Use remote server to check text guiUseServer = Use server: diff --git a/languagetool-language-modules/nl/src/main/resources/org/languagetool/MessagesBundle_nl.properties b/languagetool-language-modules/nl/src/main/resources/org/languagetool/MessagesBundle_nl.properties index 8e6c85fdaafcf..f54384215fcd9 100644 --- a/languagetool-language-modules/nl/src/main/resources/org/languagetool/MessagesBundle_nl.properties +++ b/languagetool-language-modules/nl/src/main/resources/org/languagetool/MessagesBundle_nl.properties @@ -182,6 +182,8 @@ guiTechnicalSettings = Technical settings: guiCheckFullTextAtFirst = Controleer volledige tekst nadat document is geladen guiUseLtDictionary = Voeg het woordenboek van LanguageTool toe aan LibreOffice guiNoSynonymsAsSuggestions = Gebruik geen synoniemen voor suggesties (sneller, betreft enkele regels) +guiIncludeTrackedChanges = Include tracked changes +guiActivateTempOffRules = Enable temporarily disabled rules guiSaveCacheToFile = Sla cache op als bestand guiUseRemoteServer = Gebruiker remote server om text te controleren guiUseServer = Gebruik server: diff --git a/languagetool-language-modules/pl/src/main/resources/org/languagetool/MessagesBundle_pl.properties b/languagetool-language-modules/pl/src/main/resources/org/languagetool/MessagesBundle_pl.properties index 9851622e3cd4e..b645bcae93d7b 100644 --- a/languagetool-language-modules/pl/src/main/resources/org/languagetool/MessagesBundle_pl.properties +++ b/languagetool-language-modules/pl/src/main/resources/org/languagetool/MessagesBundle_pl.properties @@ -182,6 +182,8 @@ guiTechnicalSettings = Ustawienia techniczne guiCheckFullTextAtFirst = Check full text after a document is loaded guiUseLtDictionary = Add LanguageTool dictionary to LibreOffice spell check guiNoSynonymsAsSuggestions = Do not use synonyms as suggestions (faster, regards only few rules) +guiIncludeTrackedChanges = Include tracked changes +guiActivateTempOffRules = Enable temporarily disabled rules guiSaveCacheToFile = Zapisz pami\u0119\u0107 podr\u0119czn\u0105 do pliku guiUseRemoteServer = Use remote server to check text guiUseServer = Use server: diff --git a/languagetool-language-modules/pt/src/main/resources/org/languagetool/MessagesBundle_pt_BR.properties b/languagetool-language-modules/pt/src/main/resources/org/languagetool/MessagesBundle_pt_BR.properties index 16b3af0532af8..c4063c8259d6c 100644 --- a/languagetool-language-modules/pt/src/main/resources/org/languagetool/MessagesBundle_pt_BR.properties +++ b/languagetool-language-modules/pt/src/main/resources/org/languagetool/MessagesBundle_pt_BR.properties @@ -182,6 +182,8 @@ guiTechnicalSettings = Technical settings: guiCheckFullTextAtFirst = Verificar o texto completo ap\u00f3s carregar um documento guiUseLtDictionary = Adicionar o dicion\u00e1rio do LanguageTool ao verificador ortogr\u00e1fico do LibreOffice guiNoSynonymsAsSuggestions = N\u00e3o sugerir sin\u00f4nimos (mais r\u00e1pido, apenas para poucas regras) +guiIncludeTrackedChanges = Include tracked changes +guiActivateTempOffRules = Enable temporarily disabled rules guiSaveCacheToFile = Save cache to file guiUseRemoteServer = Usar servidor remoto para verificar o texto guiUseServer = Usar servidor: diff --git a/languagetool-language-modules/pt/src/main/resources/org/languagetool/MessagesBundle_pt_PT.properties b/languagetool-language-modules/pt/src/main/resources/org/languagetool/MessagesBundle_pt_PT.properties index 7aa0ec503b775..91da773bf2edd 100644 --- a/languagetool-language-modules/pt/src/main/resources/org/languagetool/MessagesBundle_pt_PT.properties +++ b/languagetool-language-modules/pt/src/main/resources/org/languagetool/MessagesBundle_pt_PT.properties @@ -182,6 +182,8 @@ guiTechnicalSettings = Technical settings: guiCheckFullTextAtFirst = Check full text after a document is loaded guiUseLtDictionary = Add LanguageTool dictionary to LibreOffice spell check guiNoSynonymsAsSuggestions = Do not use synonyms as suggestions (faster, regards only few rules) +guiIncludeTrackedChanges = Include tracked changes +guiActivateTempOffRules = Enable temporarily disabled rules guiSaveCacheToFile = Save cache to file guiUseRemoteServer = Use remote server to check text guiUseServer = Use server: diff --git a/languagetool-language-modules/ro/src/main/resources/org/languagetool/MessagesBundle_ro.properties b/languagetool-language-modules/ro/src/main/resources/org/languagetool/MessagesBundle_ro.properties index df51834d9618e..15f2dee59de0c 100644 --- a/languagetool-language-modules/ro/src/main/resources/org/languagetool/MessagesBundle_ro.properties +++ b/languagetool-language-modules/ro/src/main/resources/org/languagetool/MessagesBundle_ro.properties @@ -182,6 +182,8 @@ guiTechnicalSettings = Technical settings: guiCheckFullTextAtFirst = Check full text after a document is loaded guiUseLtDictionary = Add LanguageTool dictionary to LibreOffice spell check guiNoSynonymsAsSuggestions = Do not use synonyms as suggestions (faster, regards only few rules) +guiIncludeTrackedChanges = Include tracked changes +guiActivateTempOffRules = Enable temporarily disabled rules guiSaveCacheToFile = Save cache to file guiUseRemoteServer = Use remote server to check text guiUseServer = Use server: diff --git a/languagetool-language-modules/ru/src/main/resources/org/languagetool/MessagesBundle_ru.properties b/languagetool-language-modules/ru/src/main/resources/org/languagetool/MessagesBundle_ru.properties index e0d4c398ac686..d2a965d1ea581 100644 --- a/languagetool-language-modules/ru/src/main/resources/org/languagetool/MessagesBundle_ru.properties +++ b/languagetool-language-modules/ru/src/main/resources/org/languagetool/MessagesBundle_ru.properties @@ -182,6 +182,8 @@ guiTechnicalSettings = \u0422\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0 guiCheckFullTextAtFirst = \u041f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0442\u0435\u043a\u0441\u0442 \u043f\u043e\u0441\u043b\u0435 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430 guiUseLtDictionary = \u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0441\u043b\u043e\u0432\u0430\u0440\u044c LanguageTool \u0432 \u0441\u043b\u0443\u0436\u0431\u0443 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043e\u0440\u0444\u043e\u0433\u0440\u0430\u0444\u0438\u0438 LibreOffice guiNoSynonymsAsSuggestions = \u041d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0438\u043d\u043e\u043d\u0438\u043c\u044b \u0434\u043b\u044f \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0439 (\u0431\u044b\u0441\u0442\u0440\u0435\u0435, \u043a\u0430\u0441\u0430\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043f\u0440\u0430\u0432\u0438\u043b) +guiIncludeTrackedChanges = Include tracked changes +guiActivateTempOffRules = Enable temporarily disabled rules guiSaveCacheToFile = \u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043a\u044d\u0448 \u0432 \u0444\u0430\u0439\u043b guiUseRemoteServer = \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u043d\u0435\u0448\u043d\u0438\u0439 \u0441\u0435\u0440\u0432\u0435\u0440 \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0442\u0435\u043a\u0441\u0442\u0430 guiUseServer = \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0435\u0440\u0432\u0435\u0440: diff --git a/languagetool-language-modules/sk/src/main/resources/org/languagetool/MessagesBundle_sk.properties b/languagetool-language-modules/sk/src/main/resources/org/languagetool/MessagesBundle_sk.properties index 2d8ecb45466e2..7203d5fc5d529 100644 --- a/languagetool-language-modules/sk/src/main/resources/org/languagetool/MessagesBundle_sk.properties +++ b/languagetool-language-modules/sk/src/main/resources/org/languagetool/MessagesBundle_sk.properties @@ -182,6 +182,8 @@ guiTechnicalSettings = Technical settings: guiCheckFullTextAtFirst = Check full text after a document is loaded guiUseLtDictionary = Add LanguageTool dictionary to LibreOffice spell check guiNoSynonymsAsSuggestions = Do not use synonyms as suggestions (faster, regards only few rules) +guiIncludeTrackedChanges = Include tracked changes +guiActivateTempOffRules = Enable temporarily disabled rules guiSaveCacheToFile = Save cache to file guiUseRemoteServer = Use remote server to check text guiUseServer = Use server: diff --git a/languagetool-language-modules/sl/src/main/resources/org/languagetool/MessagesBundle_sl.properties b/languagetool-language-modules/sl/src/main/resources/org/languagetool/MessagesBundle_sl.properties index d686f70a45a91..7c3fa0df1ae09 100644 --- a/languagetool-language-modules/sl/src/main/resources/org/languagetool/MessagesBundle_sl.properties +++ b/languagetool-language-modules/sl/src/main/resources/org/languagetool/MessagesBundle_sl.properties @@ -182,6 +182,8 @@ guiTechnicalSettings = Technical settings: guiCheckFullTextAtFirst = Preveri celotno besedilo, ko je dokument nalo\u017een guiUseLtDictionary = Dodaj slovar LanguageTool v preverjanje \u010drkovanja LibreOffice guiNoSynonymsAsSuggestions = Ne uporabljaj sopomenk za predloge (hitrej\u0161e, upo\u0161teva le nekaj pravil) +guiIncludeTrackedChanges = Include tracked changes +guiActivateTempOffRules = Enable temporarily disabled rules guiSaveCacheToFile = Save cache to file guiUseRemoteServer = Za preverjanje besedila uporabi oddaljeni stre\u017enik guiUseServer = Uporabi stre\u017enik: diff --git a/languagetool-language-modules/sv/src/main/resources/org/languagetool/MessagesBundle_sv.properties b/languagetool-language-modules/sv/src/main/resources/org/languagetool/MessagesBundle_sv.properties index 1df269f93be13..a4c5e77d472dd 100644 --- a/languagetool-language-modules/sv/src/main/resources/org/languagetool/MessagesBundle_sv.properties +++ b/languagetool-language-modules/sv/src/main/resources/org/languagetool/MessagesBundle_sv.properties @@ -182,6 +182,8 @@ guiTechnicalSettings = Tekniska inst\u00e4llningar: guiCheckFullTextAtFirst = Granska hela texten n\u00e4r dokumentet laddats in guiUseLtDictionary = L\u00e4gg till LanguageTool-lexikon till LibreOffices stavningskontroll guiNoSynonymsAsSuggestions = Anv\u00e4nd inte synonymer som f\u00f6rslag (snabbare, g\u00e4ller endast n\u00e5gra f\u00e5 regler) +guiIncludeTrackedChanges = Include tracked changes +guiActivateTempOffRules = Enable temporarily disabled rules guiSaveCacheToFile = Spara cachen till fil guiUseRemoteServer = Anv\u00e4nd en fj\u00e4rrserver f\u00f6r spr\u00e5kgranskning guiUseServer = Anv\u00e4nd server: diff --git a/languagetool-language-modules/ta/src/main/resources/org/languagetool/MessagesBundle_ta.properties b/languagetool-language-modules/ta/src/main/resources/org/languagetool/MessagesBundle_ta.properties index 5ca27163ae0ab..8d6b4012b3c25 100644 --- a/languagetool-language-modules/ta/src/main/resources/org/languagetool/MessagesBundle_ta.properties +++ b/languagetool-language-modules/ta/src/main/resources/org/languagetool/MessagesBundle_ta.properties @@ -182,6 +182,8 @@ guiTechnicalSettings = Technical settings: guiCheckFullTextAtFirst = Check full text after a document is loaded guiUseLtDictionary = Add LanguageTool dictionary to LibreOffice spell check guiNoSynonymsAsSuggestions = Do not use synonyms as suggestions (faster, regards only few rules) +guiIncludeTrackedChanges = Include tracked changes +guiActivateTempOffRules = Enable temporarily disabled rules guiSaveCacheToFile = Save cache to file guiUseRemoteServer = Use remote server to check text guiUseServer = Use server: diff --git a/languagetool-language-modules/tl/src/main/resources/org/languagetool/MessagesBundle_tl.properties b/languagetool-language-modules/tl/src/main/resources/org/languagetool/MessagesBundle_tl.properties index 0c498c64dc185..309e9273e843a 100644 --- a/languagetool-language-modules/tl/src/main/resources/org/languagetool/MessagesBundle_tl.properties +++ b/languagetool-language-modules/tl/src/main/resources/org/languagetool/MessagesBundle_tl.properties @@ -182,6 +182,8 @@ guiTechnicalSettings = Technical settings: guiCheckFullTextAtFirst = Check full text after a document is loaded guiUseLtDictionary = Add LanguageTool dictionary to LibreOffice spell check guiNoSynonymsAsSuggestions = Do not use synonyms as suggestions (faster, regards only few rules) +guiIncludeTrackedChanges = Include tracked changes +guiActivateTempOffRules = Enable temporarily disabled rules guiSaveCacheToFile = Save cache to file guiUseRemoteServer = Use remote server to check text guiUseServer = Use server: diff --git a/languagetool-language-modules/uk/src/main/resources/org/languagetool/MessagesBundle_uk.properties b/languagetool-language-modules/uk/src/main/resources/org/languagetool/MessagesBundle_uk.properties index 202bf6632d2b0..18fed44a7c0f6 100644 --- a/languagetool-language-modules/uk/src/main/resources/org/languagetool/MessagesBundle_uk.properties +++ b/languagetool-language-modules/uk/src/main/resources/org/languagetool/MessagesBundle_uk.properties @@ -182,6 +182,8 @@ guiTechnicalSettings = \u0422\u0435\u0445\u043d\u0456\u0447\u043d\u0456 \u043d\u guiCheckFullTextAtFirst = \u041f\u0435\u0440\u0435\u0432\u0456\u0440\u0438\u0442\u0438 \u0432\u0435\u0441\u044c \u0442\u0435\u043a\u0441\u0442 \u043f\u0456\u0441\u043b\u044f \u0437\u0430\u0432\u0430\u043d\u0442\u0430\u0436\u0435\u043d\u043d\u044f \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430 guiUseLtDictionary = \u0414\u043e\u0434\u0430\u0442\u0438 \u0441\u043b\u043e\u0432\u043d\u0438\u043a LanguageTool \u0434\u043e \u043f\u0435\u0440\u0435\u0432\u0456\u0440\u043a\u0438 \u043e\u0440\u0444\u043e\u0433\u0430\u0444\u0456\u0457 LibreOffice guiNoSynonymsAsSuggestions = \u041d\u0435 \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u043e\u0432\u0443\u0432\u0430\u0442\u0438 \u0441\u0438\u043d\u043e\u043d\u0456\u043c\u0438 \u0432 \u043f\u0440\u043e\u043f\u043e\u0437\u0438\u0446\u0456\u044f\u0445 (\u0448\u0432\u0438\u0434\u0448\u0435, \u0441\u0442\u043e\u0441\u0443\u0454\u0442\u044c\u0441\u044f \u043b\u0438\u0448\u0435 \u0434\u0435\u044f\u043a\u0438\u0445 \u043f\u0440\u0430\u0432\u0438\u043b) +guiIncludeTrackedChanges = Include tracked changes +guiActivateTempOffRules = Enable temporarily disabled rules guiSaveCacheToFile = \u0417\u0431\u0435\u0440\u0435\u0433\u0442\u0438 \u043a\u0435\u0448 \u0443 \u0444\u0430\u0439\u043b guiUseRemoteServer = \u041f\u0435\u0440\u0435\u0432\u0456\u0440\u044f\u0442\u0438 \u0442\u0435\u043a\u0441\u0442 \u0447\u0435\u0440\u0435\u0437 \u0432\u0456\u0434\u0434\u0430\u043b\u0435\u043d\u0438\u0439 \u0441\u0435\u0440\u0432\u0435\u0440 guiUseServer = \u0412\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u043e\u0432\u0443\u0432\u0430\u0442\u0438 \u0441\u0435\u0440\u0432\u0435\u0440: diff --git a/languagetool-language-modules/zh/src/main/resources/org/languagetool/MessagesBundle_zh.properties b/languagetool-language-modules/zh/src/main/resources/org/languagetool/MessagesBundle_zh.properties index 2066a953b8306..9df58f1709fe4 100644 --- a/languagetool-language-modules/zh/src/main/resources/org/languagetool/MessagesBundle_zh.properties +++ b/languagetool-language-modules/zh/src/main/resources/org/languagetool/MessagesBundle_zh.properties @@ -182,6 +182,8 @@ guiTechnicalSettings = Technical settings: guiCheckFullTextAtFirst = Check full text after a document is loaded guiUseLtDictionary = Add LanguageTool dictionary to LibreOffice spell check guiNoSynonymsAsSuggestions = Do not use synonyms as suggestions (faster, regards only few rules) +guiIncludeTrackedChanges = Include tracked changes +guiActivateTempOffRules = Enable temporarily disabled rules guiSaveCacheToFile = Save cache to file guiUseRemoteServer = Use remote server to check text guiUseServer = Use server: From f5ec7e6b8190a41ea82846a6410f314c4dda79b3 Mon Sep 17 00:00:00 2001 From: mark-baas Date: Mon, 8 Jan 2024 14:44:27 +0700 Subject: [PATCH 20/44] [nl] add disambiguation rules --- .../resource/nl/disambiguation.xml | 987 ++++++++++++++++++ 1 file changed, 987 insertions(+) diff --git a/languagetool-language-modules/nl/src/main/resources/org/languagetool/resource/nl/disambiguation.xml b/languagetool-language-modules/nl/src/main/resources/org/languagetool/resource/nl/disambiguation.xml index 7c2739b88f348..669f8028254dc 100644 --- a/languagetool-language-modules/nl/src/main/resources/org/languagetool/resource/nl/disambiguation.xml +++ b/languagetool-language-modules/nl/src/main/resources/org/languagetool/resource/nl/disambiguation.xml @@ -3664,4 +3664,991 @@ Copyright (C) 2008-2023 Ruud Baars + + + + + je + + + + + + + + + + + + + + + + + [.!?] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + was + ik|je|jij + + + + + + + + + + + + + + + + dan + + + + + + + + + + + toen + + + + + + + + + + + + maar + + + + + + + + + + + het|dit|dat + + [.!?] + + + + + + + + + + wat + + + + + [.!] + + + + + + + + + + het|dit|dat + + + + [.!] + + + + + + + + + + waar + + + + + [?] + + + + + + + + + + + + + + + + + + + + + + + zo + + + [.!?] + + + + + + + + + + maar + + + + + + + + + + nu + + + + + + + + + + + + toen + + + + + + + + + + + + + + + + + + + + + + + + + met + + + + + + + + + + + + niets + + + + + + + + + + je + bent + + + + + + + + geen + + + + + + + + + + + ? + ' + + vroeg + + + + + + + + + + + ze + was + + + + + + + + + + + het|dit|dat + + + + + [.!] + + + + + + + + + + + + + + + [.!] + + + + + + + + + + + + + + + + + [.!?] + + + + + + + + + + + + + + + + + + + + + + + + na|naar + + + + + + + + + + + + + + + + + + + + + + + + + met + + + + + + + + + + + + + + + + haar|zijn + + + + [.!?] + + + + + + + + + met + + zijn + + + + + + + + + + + + + + + + + + + + + maar + + + + + + + + + + de|het + + mijne|hare|zijne|uwe + + + + + + + + [0-9]+-[0-9]+-(zege|nederlaag|overwinning|eindstand|voorsprong|tussenstand|ruststand|thuiszege|achterstand|stand|afstraffing|thuisnederlaag|winst|uitzege|verliespartij|remise|recordzege|monsterzege|afgang) + + + + + + + + in|te + + + + + + + + + + + + + + zei|zegt + + + + + + + + + + + + + + , + + + + + + + + + + + + + + , + + maar + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + omhet + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + , + + want + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + je + + ? + + + + \ No newline at end of file From f96e0a18023c8e33373ad105cd1a13f1b8f18081 Mon Sep 17 00:00:00 2001 From: jaumeortola Date: Mon, 8 Jan 2024 09:08:35 +0100 Subject: [PATCH 21/44] [core] spelling global --- .../languagetool/resource/spelling_global.txt | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/languagetool-core/src/main/resources/org/languagetool/resource/spelling_global.txt b/languagetool-core/src/main/resources/org/languagetool/resource/spelling_global.txt index dd23cb0f20bbb..38b0de812b443 100644 --- a/languagetool-core/src/main/resources/org/languagetool/resource/spelling_global.txt +++ b/languagetool-core/src/main/resources/org/languagetool/resource/spelling_global.txt @@ -20429,4 +20429,21 @@ Paolo Borsellino Salvatore Riina Salvatore Totò Riina Totò Riina -Nézet-Séguin \ No newline at end of file +Nézet-Séguin +Summerhill +Summerhill School +Trần Anh Hùng +Anh Hung Tran +Benoît Magimel +Isabelle Huppert +David Carson +Robert Michels +Vilfredo Pareto +Francis Ysidro Edgeworth +Maria Edgeworth +William Stanley Jevons +Daily Mail +Harriet Taylor +Yellowstone +Yellowstone National Park +Sky Store \ No newline at end of file From c5b4f74d4d6e434f5e8efedce288fad6ed9c91fc Mon Sep 17 00:00:00 2001 From: jaumeortola Date: Mon, 8 Jan 2024 09:18:56 +0100 Subject: [PATCH 22/44] [es,ca] more words --- .../main/resources/org/languagetool/resource/ca/added.txt | 5 +++++ .../main/resources/org/languagetool/resource/ca/spelling.txt | 4 ++++ .../src/main/resources/org/languagetool/rules/ca/grammar.xml | 5 +++-- .../main/resources/org/languagetool/resource/es/added.txt | 5 +++++ .../org/languagetool/resource/es/hunspell/spelling.txt | 5 +++++ 5 files changed, 22 insertions(+), 2 deletions(-) diff --git a/languagetool-language-modules/ca/src/main/resources/org/languagetool/resource/ca/added.txt b/languagetool-language-modules/ca/src/main/resources/org/languagetool/resource/ca/added.txt index 4baf1c01549dc..7ba4498b69a3d 100644 --- a/languagetool-language-modules/ca/src/main/resources/org/languagetool/resource/ca/added.txt +++ b/languagetool-language-modules/ca/src/main/resources/org/languagetool/resource/ca/added.txt @@ -15,8 +15,10 @@ Berghof Berghof NPMSG00 Burroughs Burroughs NPCNSO0 CFA CFA NCMN000 City City NPMSO00 +Coleridge Coleridge NPCNSP0 Conde-Pumpido Conde-Pumpido NPCNSP0 EOI EOI NCFN000 +Edgeworth Edgeworth NPCNSP0 Emmy Emmy NPMNO00 Emmys Emmy NPMPO00 Estix Estix NPMSG00 @@ -27,6 +29,7 @@ Göring Göring NPCNSP0 HEC HEC NPFSO00 INSS INSS NPMSSP0 Jacqueline Jacqueline NPFSSP0 +Jevons Jevons NPCNSP0 Kapuściński Kapuściński NPCNSP0 Kingsley Kingsley NPCNSP0 Lançalot Lançalot NPMSSP0 @@ -73,6 +76,8 @@ equiprobabilitats equiprobabilitat NCFP000 esgarramantes esgarramantes AQ0CN0 exterminacionista exterminacionista AQ0CS0 exterminacionistes exterminacionista AQ0CP0 +grunge grunge AQ0CN0 +grunge grunge NCMS000 indoaràbic indoaràbic AQ0MS0 indoaràbica indoaràbic AQ0FS0 indoaràbics indoaràbic AQ0MP0 diff --git a/languagetool-language-modules/ca/src/main/resources/org/languagetool/resource/ca/spelling.txt b/languagetool-language-modules/ca/src/main/resources/org/languagetool/resource/ca/spelling.txt index 51dc12b9593f8..e87532de785ac 100644 --- a/languagetool-language-modules/ca/src/main/resources/org/languagetool/resource/ca/spelling.txt +++ b/languagetool-language-modules/ca/src/main/resources/org/languagetool/resource/ca/spelling.txt @@ -11,8 +11,10 @@ Berghof Burroughs CFA City +Coleridge Conde-Pumpido EOI +Edgeworth Emmy Emmys Estix @@ -23,6 +25,7 @@ Göring HEC INSS Jacqueline +Jevons Kapuściński Kingsley Lançalot @@ -69,6 +72,7 @@ equiprobabilitats esgarramantes exterminacionista exterminacionistes +grunge indoaràbic indoaràbica indoaràbics diff --git a/languagetool-language-modules/ca/src/main/resources/org/languagetool/rules/ca/grammar.xml b/languagetool-language-modules/ca/src/main/resources/org/languagetool/rules/ca/grammar.xml index 7d23596ae4f86..c20343c1200eb 100644 --- a/languagetool-language-modules/ca/src/main/resources/org/languagetool/rules/ca/grammar.xml +++ b/languagetool-language-modules/ca/src/main/resources/org/languagetool/rules/ca/grammar.xml @@ -97733,14 +97733,15 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - + més - menor|major + menor Expressió redundant. \2 La temperatura és més menor. + Em sento més major. diff --git a/languagetool-language-modules/es/src/main/resources/org/languagetool/resource/es/added.txt b/languagetool-language-modules/es/src/main/resources/org/languagetool/resource/es/added.txt index 240d6e1cb71ba..99439b66d7688 100644 --- a/languagetool-language-modules/es/src/main/resources/org/languagetool/resource/es/added.txt +++ b/languagetool-language-modules/es/src/main/resources/org/languagetool/resource/es/added.txt @@ -382,6 +382,7 @@ Claver Claver NPCNSP0 Cler Cler NPFSSP0 Climent Climent NPCNSP0 Colacho Colacho NPMSSP0 +Coleridge Coleridge NPCNSP0 Collantes Collantes NPCNSP0 Colom Colom NPCNSP0 Colomer Colomer NPCNSP0 @@ -474,6 +475,7 @@ Dreica Dreica NPFSSP0 Duardo Duardo NPMSSP0 Dálber Dálber NPMSSP0 Echevarría Echevarría NPCNSP0 +Edgeworth Edgeworth NPCNSP0 Edo Edo NPCNSP0 Edu Edu NPMSSP0 Egaña Egaña NPCNSP0 @@ -766,6 +768,7 @@ Jesusbeto Jesusbeto NPMSSP0 Jesusma Jesusma NPMSSP0 Jesusmari Jesusmari NPMSSP0 Jesusra Jesusra NPMSSP0 +Jevons Jevons NPCNSP0 Jiang Jiang NPCNSP0 Jime Jime NPFSSP0 Jin Jin NPCNSP0 @@ -1732,6 +1735,7 @@ Yagüe Yagüe NPCNSP0 Yanes Yanes NPCNSP0 Yayis Yayis NPFSSP0 Yeli Yeli NPFSSP0 +Yellowstone Yellowstone NPCSG00 Yesi Yesi NPFSSP0 Yeyo Yeyo NPMSSP0 Yisus Yisus NPMSSP0 @@ -1806,6 +1810,7 @@ flake flake NCMS000 flakes flake NCMP000 gradativo gradativo AQ0CS0 gradativos gradativo AQ0CP0 +grunge grunge AQ0CN0 info info NCFS000 infos info NCFP000 litonimia litonimia NCFS000 diff --git a/languagetool-language-modules/es/src/main/resources/org/languagetool/resource/es/hunspell/spelling.txt b/languagetool-language-modules/es/src/main/resources/org/languagetool/resource/es/hunspell/spelling.txt index e6ac76f285c81..1b653628c6430 100644 --- a/languagetool-language-modules/es/src/main/resources/org/languagetool/resource/es/hunspell/spelling.txt +++ b/languagetool-language-modules/es/src/main/resources/org/languagetool/resource/es/hunspell/spelling.txt @@ -371,6 +371,7 @@ Claver Cler Climent Colacho +Coleridge Collantes Colom Colomer @@ -461,6 +462,7 @@ Dreica Duardo Dálber Echevarría +Edgeworth Edo Edu Egaña @@ -747,6 +749,7 @@ Jesusbeto Jesusma Jesusmari Jesusra +Jevons Jiang Jime Jin @@ -1687,6 +1690,7 @@ Yagüe Yanes Yayis Yeli +Yellowstone Yesi Yeyo Yisus @@ -1760,6 +1764,7 @@ flake flakes gradativo gradativos +grunge info infos litonimia From 2eee93301b9f3cca7982fe0a2cab2f09226ba82b Mon Sep 17 00:00:00 2001 From: Daniel Naber Date: Mon, 8 Jan 2024 09:59:09 +0100 Subject: [PATCH 23/44] [de] add more quote chars (from https://github.com/languagetool-org/languagetool/pull/9870) --- .../org/languagetool/rules/de/GermanUnpairedBracketsRule.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/languagetool-language-modules/de/src/main/java/org/languagetool/rules/de/GermanUnpairedBracketsRule.java b/languagetool-language-modules/de/src/main/java/org/languagetool/rules/de/GermanUnpairedBracketsRule.java index 4d0c8b416ccd1..9b75b63d05fe2 100644 --- a/languagetool-language-modules/de/src/main/java/org/languagetool/rules/de/GermanUnpairedBracketsRule.java +++ b/languagetool-language-modules/de/src/main/java/org/languagetool/rules/de/GermanUnpairedBracketsRule.java @@ -30,8 +30,8 @@ public class GermanUnpairedBracketsRule extends GenericUnpairedBracketsRule { - private static final List DE_START_SYMBOLS = Arrays.asList("[", "(", "{", "„", "»", "«", "\""); - private static final List DE_END_SYMBOLS = Arrays.asList("]", ")", "}", "“", "«", "»", "\""); + private static final List DE_START_SYMBOLS = Arrays.asList("[", "(", "{", "„", "»", "«", "\"", "›", "‹"); + private static final List DE_END_SYMBOLS = Arrays.asList("]", ")", "}", "“", "«", "»", "\"", "‹", "›"); public GermanUnpairedBracketsRule(ResourceBundle messages, Language language) { super(messages, DE_START_SYMBOLS, DE_END_SYMBOLS); From 6b3684ee98645402035c2b1eed44292c4207b8c6 Mon Sep 17 00:00:00 2001 From: St-ac-y Date: Mon, 8 Jan 2024 10:19:37 +0100 Subject: [PATCH 24/44] [de] adjust ID name --- .../main/resources/org/languagetool/rules/de/grammar.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/languagetool-language-modules/de/src/main/resources/org/languagetool/rules/de/grammar.xml b/languagetool-language-modules/de/src/main/resources/org/languagetool/rules/de/grammar.xml index 9d4bbddd8ad0e..560955d206862 100644 --- a/languagetool-language-modules/de/src/main/resources/org/languagetool/rules/de/grammar.xml +++ b/languagetool-language-modules/de/src/main/resources/org/languagetool/rules/de/grammar.xml @@ -265,7 +265,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - + Freude zu @@ -277,7 +277,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA Ich liebe es, Leuten eine Freude zu berieten. - + (Zoom|You[tT]ube|Instagram|Facebook|TV)-Chanels? @@ -363,7 +363,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - + jetzt @@ -553,7 +553,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA Aber das ist ja nicht er Punkt. - + From a2395b0044dbfdeadf3598a0ac4470028aac989f Mon Sep 17 00:00:00 2001 From: Fred Kruse Date: Mon, 8 Jan 2024 11:33:55 +0100 Subject: [PATCH 25/44] [LO extension] correct handling of new cache version added --- .../java/org/languagetool/openoffice/CacheIO.java | 11 +++++++++-- .../org/languagetool/openoffice/DocumentCache.java | 4 ++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/languagetool-office-extension/src/main/java/org/languagetool/openoffice/CacheIO.java b/languagetool-office-extension/src/main/java/org/languagetool/openoffice/CacheIO.java index ef04291cbe8bb..3a4435b649460 100644 --- a/languagetool-office-extension/src/main/java/org/languagetool/openoffice/CacheIO.java +++ b/languagetool-office-extension/src/main/java/org/languagetool/openoffice/CacheIO.java @@ -22,6 +22,7 @@ import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; +import java.io.InvalidClassException; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import java.io.Serializable; @@ -231,6 +232,9 @@ public boolean readAllCaches(Configuration config, MultiDocumentsHandler mDocHan return false; } } + } catch (InvalidClassException e) { + MessageHandler.printToLogFile("Old cache Version: Cache not read"); + return false; } catch (Throwable t) { MessageHandler.printException(t); // all Exceptions thrown by UnoRuntime.queryInterface are caught } @@ -773,15 +777,18 @@ public boolean read() { boolean out = putAll((SpellCache) in.readObject()); in.close(); fileIn.close(); - MessageHandler.printToLogFile("Caches read from: " + cachePath); + MessageHandler.printToLogFile("Spell Cache read from: " + cachePath); if (out) { return true; } else { - MessageHandler.printToLogFile("Version has changed: Cache rejected (Cache Version: " + MessageHandler.printToLogFile("Version has changed: Spell Cache rejected (Cache Version: " + version + ", actual LT Version: " + JLanguageTool.VERSION + ")"); return false; } } + } catch (InvalidClassException e) { + MessageHandler.printToLogFile("Old cache Version: Spell Cache not read"); + return false; } catch (Throwable t) { MessageHandler.printException(t); // all Exceptions thrown by UnoRuntime.queryInterface are caught } diff --git a/languagetool-office-extension/src/main/java/org/languagetool/openoffice/DocumentCache.java b/languagetool-office-extension/src/main/java/org/languagetool/openoffice/DocumentCache.java index a4830911a170e..d5afcd7af1ecc 100644 --- a/languagetool-office-extension/src/main/java/org/languagetool/openoffice/DocumentCache.java +++ b/languagetool-office-extension/src/main/java/org/languagetool/openoffice/DocumentCache.java @@ -43,7 +43,7 @@ */ public class DocumentCache extends DocumentTextCache{ - private static final long serialVersionUID = 315782693333390101L; + private static final long serialVersionUID = 3L; private final Map> analyzedParagraphs = new HashMap<>(); // stores analyzed paragraphs @@ -240,7 +240,7 @@ public List getAnalyzedParagraphs(TextParagraph from, TextPara if (analyzedParagraph == null) { return null; } - if (analyzedParagraph.size() == 0) { + if (analyzedParagraph.size() == 0 && analyzedParagraphs.size() > 0) { int last = analyzedParagraphs.size() - 1; AnalyzedSentence sentence = analyzedParagraphs.get(last); AnalyzedTokenReadings[] tokens = sentence.getTokens(); From 831c0843ed647bccb9471737c4519726452da319 Mon Sep 17 00:00:00 2001 From: Luisa-LT Date: Mon, 8 Jan 2024 12:25:44 +0100 Subject: [PATCH 26/44] [de] fixed suggestion --- .../org/languagetool/resource/de/hunspell/prohibit.txt | 3 ++- .../src/main/resources/org/languagetool/rules/de/replace.txt | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/languagetool-language-modules/de/src/main/resources/org/languagetool/resource/de/hunspell/prohibit.txt b/languagetool-language-modules/de/src/main/resources/org/languagetool/resource/de/hunspell/prohibit.txt index df917516850e0..1894e81051aa2 100644 --- a/languagetool-language-modules/de/src/main/resources/org/languagetool/resource/de/hunspell/prohibit.txt +++ b/languagetool-language-modules/de/src/main/resources/org/languagetool/resource/de/hunspell/prohibit.txt @@ -8642,4 +8642,5 @@ Leserhose/N Grus sp Apis #APIs golde -schwarz-rot-golde \ No newline at end of file +schwarz-rot-golde +Kosten-Fotzenrechnung \ No newline at end of file diff --git a/languagetool-language-modules/de/src/main/resources/org/languagetool/rules/de/replace.txt b/languagetool-language-modules/de/src/main/resources/org/languagetool/rules/de/replace.txt index fe89fd1787a9a..6ecbe55a9783d 100644 --- a/languagetool-language-modules/de/src/main/resources/org/languagetool/rules/de/replace.txt +++ b/languagetool-language-modules/de/src/main/resources/org/languagetool/rules/de/replace.txt @@ -617,4 +617,6 @@ Michael Jaffe=Michael Jaffé Phillip Morris=Philip Morris Katalin Kariko=Katalin Karikó Francoise Bettencourt=Françoise Bettencourt -Francoise Bettencourt Meyers=Françoise Bettencourt Meyers \ No newline at end of file +Francoise Bettencourt Meyers=Françoise Bettencourt Meyers +Kosten-Nutzenrechnung=Kosten-Nutzen-Rechnung +Kosten-Nutzenrechnungen=Kosten-Nutzen-Rechnungen \ No newline at end of file From 011fa02c189dc4e74535f988a4ffa50c9bca4f43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaume=20Ortol=C3=A0?= Date: Mon, 8 Jan 2024 12:28:09 +0100 Subject: [PATCH 27/44] [core] spelling global --- .../org/languagetool/resource/spelling_global.txt | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/languagetool-core/src/main/resources/org/languagetool/resource/spelling_global.txt b/languagetool-core/src/main/resources/org/languagetool/resource/spelling_global.txt index 38b0de812b443..9e55fda82c67b 100644 --- a/languagetool-core/src/main/resources/org/languagetool/resource/spelling_global.txt +++ b/languagetool-core/src/main/resources/org/languagetool/resource/spelling_global.txt @@ -20424,8 +20424,6 @@ Rip Van Winkle San Vito lo Capo Jaime Peñafiel Roberto Saviano -Giovanni Falcone -Paolo Borsellino Salvatore Riina Salvatore Totò Riina Totò Riina @@ -20440,10 +20438,11 @@ David Carson Robert Michels Vilfredo Pareto Francis Ysidro Edgeworth -Maria Edgeworth William Stanley Jevons Daily Mail Harriet Taylor Yellowstone Yellowstone National Park -Sky Store \ No newline at end of file +Sky Store +Julien Denormandie +Sébastien Lecornu \ No newline at end of file From 4f0b76f162b31b43f1ef495308f6184137a24078 Mon Sep 17 00:00:00 2001 From: Fred Kruse Date: Mon, 8 Jan 2024 13:01:43 +0100 Subject: [PATCH 28/44] [LO extension] solves issue #10059 --- .../languagetool/MessagesBundle.properties | 1 + .../languagetool/MessagesBundle_en.properties | 1 + .../org/languagetool/gui/Configuration.java | 22 +++++++ .../languagetool/gui/ConfigurationDialog.java | 8 +++ .../openoffice/SwJLanguageTool.java | 57 +++++++++++-------- 5 files changed, 64 insertions(+), 25 deletions(-) diff --git a/languagetool-core/src/main/resources/org/languagetool/MessagesBundle.properties b/languagetool-core/src/main/resources/org/languagetool/MessagesBundle.properties index 9a848fc17b1a0..8f9a9cf433926 100644 --- a/languagetool-core/src/main/resources/org/languagetool/MessagesBundle.properties +++ b/languagetool-core/src/main/resources/org/languagetool/MessagesBundle.properties @@ -184,6 +184,7 @@ guiUseLtDictionary = Add LanguageTool dictionary to LibreOffice spell check guiNoSynonymsAsSuggestions = Do not use synonyms as suggestions (faster, regards only few rules) guiIncludeTrackedChanges = Include tracked changes guiActivateTempOffRules = Enable temporarily disabled rules +guiEnableGoalSpecificRules = Enable goal specific rules guiSaveCacheToFile = Save cache to file guiUseRemoteServer = Use remote server to check text guiUseServer = Use server: diff --git a/languagetool-core/src/main/resources/org/languagetool/MessagesBundle_en.properties b/languagetool-core/src/main/resources/org/languagetool/MessagesBundle_en.properties index 2c740406269ef..a62c09ae7d834 100644 --- a/languagetool-core/src/main/resources/org/languagetool/MessagesBundle_en.properties +++ b/languagetool-core/src/main/resources/org/languagetool/MessagesBundle_en.properties @@ -184,6 +184,7 @@ guiUseLtDictionary = Add LanguageTool dictionary to LibreOffice spell check guiNoSynonymsAsSuggestions = Do not use synonyms as suggestions (faster, regards only few rules) guiIncludeTrackedChanges = Include tracked changes guiActivateTempOffRules = Enable temporarily disabled rules +guiEnableGoalSpecificRules = Enable goal specific rules guiSaveCacheToFile = Save cache to file guiUseRemoteServer = Use remote server to check text guiUseServer = Use server: diff --git a/languagetool-gui-commons/src/main/java/org/languagetool/gui/Configuration.java b/languagetool-gui-commons/src/main/java/org/languagetool/gui/Configuration.java index e12e525a40395..dfac040a9d060 100644 --- a/languagetool-gui-commons/src/main/java/org/languagetool/gui/Configuration.java +++ b/languagetool-gui-commons/src/main/java/org/languagetool/gui/Configuration.java @@ -76,6 +76,7 @@ public class Configuration { static final boolean DEFAULT_NO_SYNONYMS_AS_SUGGESTIONS = false; static final boolean DEFAULT_INCLUDE_TRACKED_CHANGES = false; static final boolean DEFAULT_ENABLE_TMP_OFF_RULES = false; + static final boolean DEFAULT_ENABLE_GOAL_SPECIFIC_RULES = false; static final boolean DEFAULT_SAVE_LO_CACHE = true; static final Color STYLE_COLOR = new Color(0, 175, 0); @@ -130,6 +131,7 @@ public class Configuration { private static final String NO_SYNONYMS_AS_SUGGESTIONS_KEY = "noSynonymsAsSuggestions"; private static final String INCLUDE_TRACKED_CHANGES_KEY = "includeTrackedChanges"; private static final String ENABLE_TMP_OFF_RULES_KEY = "enableTmpOffRules"; + private static final String ENABLE_GOAL_SPECIFIC_RULES_KEY = "enableGoalSpecificRules"; private static final String SAVE_LO_CACHE_KEY = "saveLoCache"; private static final String LT_VERSION_KEY = "ltVersion"; @@ -199,6 +201,7 @@ public class Configuration { private boolean noSynonymsAsSuggestions = DEFAULT_NO_SYNONYMS_AS_SUGGESTIONS; private boolean includeTrackedChanges = DEFAULT_INCLUDE_TRACKED_CHANGES; private boolean enableTmpOffRules = DEFAULT_ENABLE_TMP_OFF_RULES; + private boolean enableGoalSpecificRules = DEFAULT_ENABLE_GOAL_SPECIFIC_RULES; private boolean saveLoCache = DEFAULT_SAVE_LO_CACHE; private String externalRuleDirectory; private String lookAndFeelName; @@ -291,6 +294,7 @@ public void initOptions() { noSynonymsAsSuggestions = DEFAULT_NO_SYNONYMS_AS_SUGGESTIONS; includeTrackedChanges = DEFAULT_INCLUDE_TRACKED_CHANGES; enableTmpOffRules = DEFAULT_ENABLE_TMP_OFF_RULES; + enableGoalSpecificRules = DEFAULT_ENABLE_GOAL_SPECIFIC_RULES; saveLoCache = DEFAULT_SAVE_LO_CACHE; externalRuleDirectory = null; lookAndFeelName = null; @@ -349,6 +353,7 @@ void restoreState(Configuration configuration) { this.noSynonymsAsSuggestions = configuration.noSynonymsAsSuggestions; this.includeTrackedChanges = configuration.includeTrackedChanges; this.enableTmpOffRules = configuration.enableTmpOffRules; + this.enableGoalSpecificRules = configuration.enableGoalSpecificRules; this.saveLoCache = configuration.saveLoCache; this.otherServerUrl = configuration.otherServerUrl; this.remoteUsername = configuration.remoteUsername; @@ -606,6 +611,14 @@ public boolean enableTmpOffRules() { return enableTmpOffRules; } + public void setEnableGoalSpecificRules(boolean enableGoalSpecificRules) { + this.enableGoalSpecificRules = enableGoalSpecificRules; + } + + public boolean enableGoalSpecificRules() { + return enableGoalSpecificRules; + } + public void setSaveLoCache(boolean saveLoCache) { this.saveLoCache = saveLoCache; } @@ -1375,6 +1388,11 @@ private void loadCurrentProfile(Properties props, String prefix, String qualifie enableTmpOffRules = Boolean.parseBoolean(enableTmpOffRulesString); } + String enableGoalSpecificRulesString = (String) props.get(prefix + ENABLE_GOAL_SPECIFIC_RULES_KEY); + if (enableGoalSpecificRulesString != null) { + enableGoalSpecificRules = Boolean.parseBoolean(enableGoalSpecificRulesString); + } + String saveLoCacheString = (String) props.get(prefix + SAVE_LO_CACHE_KEY); if (saveLoCacheString != null) { saveLoCache = Boolean.parseBoolean(saveLoCacheString); @@ -1606,6 +1624,7 @@ private void setAllProfileKeys() { allProfileKeys.add(NO_SYNONYMS_AS_SUGGESTIONS_KEY); allProfileKeys.add(INCLUDE_TRACKED_CHANGES_KEY); allProfileKeys.add(ENABLE_TMP_OFF_RULES_KEY); + allProfileKeys.add(ENABLE_GOAL_SPECIFIC_RULES_KEY); allProfileKeys.add(SAVE_LO_CACHE_KEY); allProfileLangKeys.add(DISABLED_RULES_KEY); @@ -1717,6 +1736,9 @@ private void saveConfigForCurrentProfile(Properties props, String prefix, String if (enableTmpOffRules != DEFAULT_ENABLE_TMP_OFF_RULES) { props.setProperty(prefix + ENABLE_TMP_OFF_RULES_KEY, Boolean.toString(enableTmpOffRules)); } + if (enableGoalSpecificRules != DEFAULT_ENABLE_GOAL_SPECIFIC_RULES) { + props.setProperty(prefix + ENABLE_GOAL_SPECIFIC_RULES_KEY, Boolean.toString(enableGoalSpecificRules)); + } if (saveLoCache != DEFAULT_SAVE_LO_CACHE) { props.setProperty(prefix + SAVE_LO_CACHE_KEY, Boolean.toString(saveLoCache)); } diff --git a/languagetool-gui-commons/src/main/java/org/languagetool/gui/ConfigurationDialog.java b/languagetool-gui-commons/src/main/java/org/languagetool/gui/ConfigurationDialog.java index 49e6f03b20f35..ae1a4b112c899 100644 --- a/languagetool-gui-commons/src/main/java/org/languagetool/gui/ConfigurationDialog.java +++ b/languagetool-gui-commons/src/main/java/org/languagetool/gui/ConfigurationDialog.java @@ -1046,6 +1046,14 @@ private void createOfficeElements(GridBagConstraints cons, JPanel portPanel) { cons.gridy++; portPanel.add(enableTmpOffRulesBox, cons); + JCheckBox enableGoalSpecificRulesBox = new JCheckBox(Tools.getLabel(messages.getString("guiEnableGoalSpecificRules"))); + enableGoalSpecificRulesBox.setSelected(config.enableGoalSpecificRules()); + enableGoalSpecificRulesBox.addItemListener(e -> { + config.setEnableGoalSpecificRules(enableGoalSpecificRulesBox.isSelected()); + }); + cons.gridy++; + portPanel.add(enableGoalSpecificRulesBox, cons); + JCheckBox noBackgroundCheckBox = new JCheckBox(Tools.getLabel(messages.getString("guiNoBackgroundCheck"))); noBackgroundCheckBox.setSelected(config.noBackgroundCheck()); noBackgroundCheckBox.addItemListener(e -> config.setNoBackgroundCheck(noBackgroundCheckBox.isSelected())); diff --git a/languagetool-office-extension/src/main/java/org/languagetool/openoffice/SwJLanguageTool.java b/languagetool-office-extension/src/main/java/org/languagetool/openoffice/SwJLanguageTool.java index 2815da3da3d92..9af6a6cac7f2c 100644 --- a/languagetool-office-extension/src/main/java/org/languagetool/openoffice/SwJLanguageTool.java +++ b/languagetool-office-extension/src/main/java/org/languagetool/openoffice/SwJLanguageTool.java @@ -22,10 +22,12 @@ import java.io.IOException; import java.net.MalformedURLException; import java.util.ArrayList; +import java.util.Collections; import java.util.List; import java.util.ResourceBundle; import java.util.Set; +import org.jetbrains.annotations.NotNull; import org.languagetool.AnalyzedSentence; import org.languagetool.AnalyzedToken; import org.languagetool.AnalyzedTokenReadings; @@ -33,6 +35,7 @@ import org.languagetool.Language; import org.languagetool.MultiThreadedJLanguageTool; import org.languagetool.ResultCache; +import org.languagetool.ToneTag; import org.languagetool.UserConfig; import org.languagetool.JLanguageTool.Level; import org.languagetool.JLanguageTool.Mode; @@ -61,9 +64,11 @@ public class SwJLanguageTool { private boolean isMultiThread; private boolean isRemote; private boolean doReset; + private Configuration config; public SwJLanguageTool(Language language, Language motherTongue, UserConfig userConfig, Configuration config, List extraRemoteRules, boolean testMode) throws MalformedURLException { + this.config = config; isMultiThread = config.isMultiThread(); isRemote = config.doRemoteCheck() && !testMode; doReset = false; @@ -228,12 +233,13 @@ public List check(String text, ParagraphHandling paraMode, } else { mode = Mode.ALL; } + Set toneTags = config.enableGoalSpecificRules() ? Collections.singleton(ToneTag.ALL_TONE_RULES) : Collections.emptySet(); if (isMultiThread) { synchronized(mlt) { - return mlt.check(text, paraMode, mode, from, to, document, this); + return mlt.check(text, paraMode, mode, from, to, document, this, toneTags); } } else { - return lt.check(text, paraMode, mode, from, to, document, this); + return lt.check(text, paraMode, mode, from, to, document, this, toneTags); } } } @@ -261,22 +267,13 @@ public List check(String text, ParagraphHandling paraMode, } else { mode = Mode.ALL; } + Set toneTags = config.enableGoalSpecificRules() ? Collections.singleton(ToneTag.ALL_TONE_RULES) : Collections.emptySet(); if (isMultiThread) { - if (nFPara < 0) { - synchronized(mlt) { - return mlt.check(new AnnotatedTextBuilder().addText(text).build(), true, paraMode, null, mode, Level.PICKY); - } - } else { - synchronized(mlt) { - return mlt.check(text, paraMode, mode, nFPara, document, this); - } + synchronized(mlt) { + return mlt.check(text, paraMode, mode, nFPara, document, this, toneTags); } } else { - if (nFPara < 0) { - return lt.check(new AnnotatedTextBuilder().addText(text).build(), true, paraMode, null, mode, Level.PICKY); - } else { - return lt.check(text, paraMode, mode, nFPara, document, this); - } + return lt.check(text, paraMode, mode, nFPara, document, this, toneTags); } } } @@ -398,9 +395,14 @@ public JLanguageToolLo(Language language, Language motherTongue, ResultCache cac } public List check(String text, ParagraphHandling paraMode, Mode mode, - int nFPara, SingleDocument document, SwJLanguageTool lt) throws IOException { + int nFPara, SingleDocument document, SwJLanguageTool lt, @NotNull Set toneTags) throws IOException { - List analyzedSentences = document.getDocumentCache().getOrCreateAnalyzedParagraph(nFPara, lt); + List analyzedSentences; + if (nFPara < 0) { + analyzedSentences = this.analyzeText(text); + } else { + analyzedSentences = document.getDocumentCache().getOrCreateAnalyzedParagraph(nFPara, lt); + } // text = document.getDocumentCache().getFlatParagraph(nFPara) + OfficeTools.END_OF_PARAGRAPH; // List sentences = sentenceTokenize(text); List sentences = new ArrayList<>(); @@ -408,11 +410,11 @@ public List check(String text, ParagraphHandling paraMode, Mode mode, sentences.add(analyzedSentence.getText()); } return checkInternal(new AnnotatedTextBuilder().addText(text).build(), paraMode, null, mode, - Level.PICKY, null, sentences, analyzedSentences).getRuleMatches(); + Level.PICKY, toneTags, null, sentences, analyzedSentences).getRuleMatches(); } public List check(String text, ParagraphHandling paraMode, Mode mode, - TextParagraph from, TextParagraph to, SingleDocument document, SwJLanguageTool lt) throws IOException { + TextParagraph from, TextParagraph to, SingleDocument document, SwJLanguageTool lt, @NotNull Set toneTags) throws IOException { List analyzedSentences = document.getDocumentCache().getAnalyzedParagraphs(from, to, lt); // text += OfficeTools.END_OF_PARAGRAPH; // List sentences = sentenceTokenize(text); @@ -421,7 +423,7 @@ public List check(String text, ParagraphHandling paraMode, Mode mode, sentences.add(analyzedSentence.getText()); } return checkInternal(new AnnotatedTextBuilder().addText(text).build(), paraMode, null, mode, - Level.PICKY, null, sentences, analyzedSentences).getRuleMatches(); + Level.PICKY, toneTags, null, sentences, analyzedSentences).getRuleMatches(); } } @@ -433,9 +435,14 @@ public MultiThreadedJLanguageToolLo(Language language, Language motherTongue, Us } public List check(String text, ParagraphHandling paraMode, Mode mode, - int nFPara, SingleDocument document, SwJLanguageTool lt) throws IOException { + int nFPara, SingleDocument document, SwJLanguageTool lt, @NotNull Set toneTags) throws IOException { - List analyzedSentences = document.getDocumentCache().getOrCreateAnalyzedParagraph(nFPara, lt); + List analyzedSentences; + if (nFPara < 0) { + analyzedSentences = this.analyzeText(text); + } else { + analyzedSentences = document.getDocumentCache().getOrCreateAnalyzedParagraph(nFPara, lt); + } // text = document.getDocumentCache().getFlatParagraph(nFPara) + OfficeTools.END_OF_PARAGRAPH; // List sentences = sentenceTokenize(text); List sentences = new ArrayList<>(); @@ -443,11 +450,11 @@ public List check(String text, ParagraphHandling paraMode, Mode mode, sentences.add(analyzedSentence.getText()); } return checkInternal(new AnnotatedTextBuilder().addText(text).build(), paraMode, null, mode, - Level.PICKY, null, sentences, analyzedSentences).getRuleMatches(); + Level.PICKY, toneTags, null, sentences, analyzedSentences).getRuleMatches(); } public List check(String text, ParagraphHandling paraMode, Mode mode, - TextParagraph from, TextParagraph to, SingleDocument document, SwJLanguageTool lt) throws IOException { + TextParagraph from, TextParagraph to, SingleDocument document, SwJLanguageTool lt, @NotNull Set toneTags) throws IOException { List analyzedSentences = document.getDocumentCache().getAnalyzedParagraphs(from, to, lt); // text += OfficeTools.END_OF_PARAGRAPH; // List sentences = sentenceTokenize(text); @@ -456,7 +463,7 @@ public List check(String text, ParagraphHandling paraMode, Mode mode, sentences.add(analyzedSentence.getText()); } return checkInternal(new AnnotatedTextBuilder().addText(text).build(), paraMode, null, mode, - Level.PICKY, null, sentences, analyzedSentences).getRuleMatches(); + Level.PICKY, toneTags, null, sentences, analyzedSentences).getRuleMatches(); } } From 0da1ca49d3081ce469b3e63666c66df07bc452a2 Mon Sep 17 00:00:00 2001 From: Stefan Viol Date: Mon, 8 Jan 2024 13:06:41 +0100 Subject: [PATCH 29/44] refactor buildInfo (#10049) --- .../java/org/languagetool/JLanguageTool.java | 70 +++++------------- .../java/org/languagetool/LtBuildInfo.java | 74 +++++++++++++++++++ .../main/java/org/languagetool/Premium.java | 49 ++++++------ 3 files changed, 116 insertions(+), 77 deletions(-) create mode 100644 languagetool-core/src/main/java/org/languagetool/LtBuildInfo.java diff --git a/languagetool-core/src/main/java/org/languagetool/JLanguageTool.java b/languagetool-core/src/main/java/org/languagetool/JLanguageTool.java index 8d58f78301e78..e1d8227d2e005 100644 --- a/languagetool-core/src/main/java/org/languagetool/JLanguageTool.java +++ b/languagetool-core/src/main/java/org/languagetool/JLanguageTool.java @@ -46,12 +46,9 @@ import java.io.IOException; import java.io.InputStream; import java.io.PrintStream; -import java.net.JarURLConnection; -import java.net.URL; import java.util.*; import java.util.concurrent.*; import java.util.function.Function; -import java.util.jar.Manifest; import java.util.regex.Matcher; import java.util.regex.Pattern; import java.util.stream.Collectors; @@ -78,17 +75,30 @@ public class JLanguageTool { private static final Logger logger = LoggerFactory.getLogger(JLanguageTool.class); private static final Pattern ZERO_WIDTH_NBSP = Pattern.compile("(?<=\uFEFF)|(?=\uFEFF)"); - /** LanguageTool version as a string like {@code 2.3} or {@code 2.4-SNAPSHOT}. */ - public static final String VERSION = "6.4-SNAPSHOT"; - /** LanguageTool build date and time like {@code 2013-10-17 16:10} or {@code null} if not run from JAR. */ - @Nullable public static final String BUILD_DATE = getBuildDate(); + /** + * LanguageTool version as a string like {@code 2.3} or {@code 2.4-SNAPSHOT}. + * @deprecated Please use LtBuildInfo.OS.getVersion() instead. + */ + @Nullable + @Deprecated + public static final String VERSION = LtBuildInfo.OS.getVersion(); + + /** + * LanguageTool build date and time like {@code 2013-10-17 16:10} or {@code null} if not run from JAR. + * @deprecated Please use LtBuildInfo.OS.getBuildDate() instead. + */ + @Nullable + @Deprecated + public static final String BUILD_DATE = LtBuildInfo.OS.getBuildDate(); + /** * Abbreviated git id or {@code null} if not available. - * * @since 4.5 + * @deprecated Please use LtBuildInfo.OS.getShortGitId() instead. */ @Nullable - public static final String GIT_SHORT_ID = getShortGitId(); + @Deprecated + public static final String GIT_SHORT_ID = LtBuildInfo.OS.getShortGitId(); /** * The name of the file with error patterns. @@ -134,48 +144,6 @@ public class JLanguageTool { private float maxErrorsPerWordRate; - /** - * Returns the build date or {@code null} if not run from JAR. - */ - @Nullable - private static String getBuildDate() { - try { - URL res = getDataBroker().getAsURL("/" + JLanguageTool.class.getName().replace('.', '/') + ".class"); - if (res == null) { - // this will happen on Android, see http://stackoverflow.com/questions/15371274/ - return null; - } - Object connObj = res.openConnection(); - if (connObj instanceof JarURLConnection) { - Manifest manifest = ((JarURLConnection) connObj).getManifest(); - if (manifest != null) { - return manifest.getMainAttributes().getValue("Implementation-Date"); - } - } - return null; - } catch (IOException e) { - throw new RuntimeException("Could not get build date from JAR", e); - } - } - - /** - * Returns the abbreviated git id or {@code null}. - */ - @Nullable - private static String getShortGitId() { - try { - InputStream in = getDataBroker().getAsStream("/git.properties"); - if (in != null) { - Properties props = new Properties(); - props.load(in); - return props.getProperty("git.commit.id.abbrev"); - } - return null; - } catch (IOException e) { - throw new RuntimeException("Could not get git id from 'git.properties'", e); - } - } - private static ResourceDataBroker dataBroker = new DefaultResourceDataBroker(); private static ClassBroker classBroker = new DefaultClassBroker(); diff --git a/languagetool-core/src/main/java/org/languagetool/LtBuildInfo.java b/languagetool-core/src/main/java/org/languagetool/LtBuildInfo.java new file mode 100644 index 0000000000000..d6b0b1d7161c8 --- /dev/null +++ b/languagetool-core/src/main/java/org/languagetool/LtBuildInfo.java @@ -0,0 +1,74 @@ +/* + * LanguageTool, a natural language style checker + * Copyright (c) 2024. Stefan Viol (https://stevio.de) + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + */ + +package org.languagetool; + +import lombok.Getter; +import org.jetbrains.annotations.Nullable; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.io.IOException; +import java.io.InputStream; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import java.util.Properties; + +public enum LtBuildInfo { + + OS("/git.properties"), + PREMIUM("/git-premium.properties"); + + private final Logger logger = LoggerFactory.getLogger(LtBuildInfo.class); + + @Getter + @Nullable + private final String buildDate; + @Getter + @Nullable + private final String shortGitId; + @Getter + @Nullable + private final String version; + + LtBuildInfo(String gitPropertiesFilePath) { + InputStream in = JLanguageTool.getDataBroker().getAsStream(gitPropertiesFilePath); + Properties gitProperties = null; + if (in != null) { + gitProperties = new Properties(); + try { + gitProperties.load(in); + } catch (IOException e) { + logger.warn("Failed to read {}", gitPropertiesFilePath, e); + } + } + + if (gitProperties != null) { + OffsetDateTime offsetDateTime = OffsetDateTime.parse(gitProperties.getProperty("git.build.time"), DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ssXX")); + this.buildDate = offsetDateTime.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss Z")); + this.shortGitId = gitProperties.getProperty("git.commit.id.abbrev"); + this.version = gitProperties.getProperty("git.build.version"); + } else { + this.buildDate = null; + this.shortGitId = null; + this.version = null; + } + } +} diff --git a/languagetool-core/src/main/java/org/languagetool/Premium.java b/languagetool-core/src/main/java/org/languagetool/Premium.java index 39fefcf2ee718..78b6a5cb0b07b 100644 --- a/languagetool-core/src/main/java/org/languagetool/Premium.java +++ b/languagetool-core/src/main/java/org/languagetool/Premium.java @@ -22,33 +22,15 @@ import org.languagetool.markup.AnnotatedText; import org.languagetool.rules.Rule; -import java.io.IOException; -import java.io.InputStream; import java.lang.reflect.Constructor; -import java.util.*; +import java.util.Arrays; +import java.util.List; @Slf4j /** * Information about premium-only rules. */ public abstract class Premium { - - private Optional gitPremiumProps; - - public Premium() { - try { - InputStream in = JLanguageTool.getDataBroker().getAsStream("/git-premium.properties"); - if (in != null) { - Properties props = new Properties(); - props.load(in); - gitPremiumProps = Optional.of(props); - } else { - gitPremiumProps = Optional.empty(); - } - } catch (IOException e) { - log.warn("Failed to read git-premium.properties file.", e); - } - } private static final List tempNotPremiumRules = Arrays.asList(); @@ -92,17 +74,32 @@ public static boolean isPremiumVersion() { } public abstract boolean isPremiumRule(Rule rule); - + + /** + * @deprecated Please use LtBuildInfo.PREMIUM.getBuildDate() instead. + * @return premium build date + */ + @Deprecated public String getBuildDate() { - return gitPremiumProps.map(properties -> properties.getProperty("git.build.time")).orElse(null); + return LtBuildInfo.PREMIUM.getBuildDate(); } - + + /** + * @deprecated Please use LtBuildInfo.PREMIUM.getShortGitId() instead. + * @return short git ID + */ + @Deprecated public String getShortGitId() { - return gitPremiumProps.map(properties -> properties.getProperty("git.commit.id.abbrev")).orElse(null); + return LtBuildInfo.PREMIUM.getShortGitId(); } - + + /** + * @deprecated Please use LtBuildInfo.PREMIUM.getVersion() instead. + * @return premium version + */ + @Deprecated public String getVersion() { - return gitPremiumProps.map(properties -> properties.getProperty("git.build.version")).orElse(null); + return LtBuildInfo.PREMIUM.getVersion(); } } From 8bff032892fa9f6dd57cdee4afbb2d766b3bd379 Mon Sep 17 00:00:00 2001 From: Daniel Naber Date: Fri, 5 Jan 2024 11:19:45 +0100 Subject: [PATCH 30/44] allow loading confidence values from external file --- .../tools/RuleMatchesAsJsonSerializer.java | 9 +++++ .../languagetool/server/HTTPServerConfig.java | 17 ++++++++- .../languagetool/server/V2TextChecker.java | 38 +++++++++++++++++++ 3 files changed, 63 insertions(+), 1 deletion(-) diff --git a/languagetool-core/src/main/java/org/languagetool/tools/RuleMatchesAsJsonSerializer.java b/languagetool-core/src/main/java/org/languagetool/tools/RuleMatchesAsJsonSerializer.java index edc43fa8ac4e0..161379e0dbb72 100644 --- a/languagetool-core/src/main/java/org/languagetool/tools/RuleMatchesAsJsonSerializer.java +++ b/languagetool-core/src/main/java/org/languagetool/tools/RuleMatchesAsJsonSerializer.java @@ -51,6 +51,7 @@ public class RuleMatchesAsJsonSerializer { private final int compactMode; private final Language lang; + private Map ruleIdToConfidence; public RuleMatchesAsJsonSerializer() { this(0, null); @@ -296,6 +297,11 @@ private void writeReplacements(JsonGenerator g, RuleMatch match) throws IOExcept } if (replacement.getConfidence() != null) { g.writeNumberField("confidence", replacement.getConfidence()); + } else if (ruleIdToConfidence != null) { + Float confidence = ruleIdToConfidence.get(match.getRule().getId()); + if (confidence != null) { + g.writeNumberField("confidence", confidence); + } } g.writeEndObject(); } @@ -366,4 +372,7 @@ private void writeCategory(JsonGenerator g, Category category) throws IOExceptio g.writeEndObject(); } + public void setRuleIdToConfidenceMap(Map ruleIdToConfidence) { + this.ruleIdToConfidence = ruleIdToConfidence; + } } diff --git a/languagetool-server/src/main/java/org/languagetool/server/HTTPServerConfig.java b/languagetool-server/src/main/java/org/languagetool/server/HTTPServerConfig.java index be0637aaa4ec3..2a0c2aaf4d894 100644 --- a/languagetool-server/src/main/java/org/languagetool/server/HTTPServerConfig.java +++ b/languagetool-server/src/main/java/org/languagetool/server/HTTPServerConfig.java @@ -73,6 +73,7 @@ enum Mode { LanguageTool } protected int textCheckerQueueSize = 8; protected Mode mode; protected File languageModelDir = null; + protected File ruleIdToConfidenceFile = null; protected boolean pipelineCaching = false; protected boolean pipelinePrewarming = false; @@ -205,7 +206,8 @@ public void setRestrictManagedAccounts(boolean restrictManagedAccounts) { "redisUseSentinel", "sentinelHost", "sentinelPort", "sentinelPassword", "sentinelMasterId", "dbLogging", "premiumOnly", "nerUrl", "minPort", "maxPort", "localApiMode", "motherTongue", "preferredLanguages", "dictLimitUser", "dictLimitTeam", "styleGuideLimitUser", "styleGuideLimitTeam", - "passwortLoginAccessListPath", "redisDictTTLSeconds", "requestLimitAccessToken"); + "passwortLoginAccessListPath", "redisDictTTLSeconds", "requestLimitAccessToken", + "ruleIdToConfidenceFile"); /** * Create a server configuration for the default port ({@link #DEFAULT_PORT}). @@ -338,6 +340,13 @@ private void parseConfigFile(File file, boolean loadLangModel) { maxPort = Integer.parseInt(getOptionalProperty(props, "maxPort", "0")); String url = getOptionalProperty(props, "serverURL", null); setServerURL(url); + String ruleIdToConfidence = getOptionalProperty(props, "ruleIdToConfidenceFile", null); + if (ruleIdToConfidence != null) { + ruleIdToConfidenceFile = new File(ruleIdToConfidence); + if (!ruleIdToConfidenceFile.exists() || !ruleIdToConfidenceFile.isFile()) { + throw new RuntimeException("ruleIdToConfidenceFile cannot be found: " + ruleIdToConfidenceFile); + } + } String langModel = getOptionalProperty(props, "languageModel", null); if (langModel != null && loadLangModel) { setLanguageModelDirectory(langModel); @@ -1503,4 +1512,10 @@ public void setDbMaxConnections(int dbMaxConnections) { this.dbMaxConnections = dbMaxConnections; } + /** + * @since 6.4 + */ + public File getRuleIdToConfidenceFile() { + return ruleIdToConfidenceFile; + } } diff --git a/languagetool-server/src/main/java/org/languagetool/server/V2TextChecker.java b/languagetool-server/src/main/java/org/languagetool/server/V2TextChecker.java index c5838e2d65298..314b07ee92830 100644 --- a/languagetool-server/src/main/java/org/languagetool/server/V2TextChecker.java +++ b/languagetool-server/src/main/java/org/languagetool/server/V2TextChecker.java @@ -25,10 +25,16 @@ import org.languagetool.rules.RuleMatch; import org.languagetool.tools.StringTools; import org.languagetool.tools.RuleMatchesAsJsonSerializer; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import java.io.IOException; +import java.nio.file.Files; +import java.nio.file.Paths; import java.util.*; import java.util.regex.Pattern; +import static java.nio.charset.StandardCharsets.UTF_8; import static org.languagetool.server.ServerTools.setCommonHeaders; /** @@ -39,9 +45,40 @@ class V2TextChecker extends TextChecker { private static final String JSON_CONTENT_TYPE = "application/json"; private static final Pattern COMMA_WHITESPACE_PATTERN = Pattern.compile(",\\s*"); + private static final Logger logger = LoggerFactory.getLogger(V2TextChecker.class); + + private static final Map ruleIdToConfidence = new HashMap<>(); V2TextChecker(HTTPServerConfig config, boolean internalServer, Queue workQueue, RequestCounter reqCounter) { super(config, internalServer, workQueue, reqCounter); + try { + loadConfidenceMap(); + } catch (IOException e) { + throw new RuntimeException(e); + } + } + + private void loadConfidenceMap() throws IOException { + if (config.getRuleIdToConfidenceFile() != null) { + logger.info("Loading confidence map for rules from " + ruleIdToConfidence); + List lines = Files.readAllLines(Paths.get(config.getRuleIdToConfidenceFile().getAbsolutePath()), UTF_8); + for (String line : lines) { + if (line.startsWith("#")) { + continue; + } + String[] parts = line.split(";"); + if (parts.length == 2) { + try { + float confidence = Float.parseFloat(parts[1]); + ruleIdToConfidence.put(parts[0], confidence); + } catch (NumberFormatException e) { + throw new RuntimeException("Invalid confidence float value in " + config.getRuleIdToConfidenceFile() + ", expected 'RULE_ID;float_value': " + line); + } + } else { + throw new RuntimeException("Invalid line in " + config.getRuleIdToConfidenceFile() + ", expected 'RULE_ID;float_value': " + line); + } + } + } } @Override @@ -53,6 +90,7 @@ protected void setHeaders(HttpExchange httpExchange) { protected String getResponse(AnnotatedText text, Language usedLang, DetectedLanguage lang, Language motherTongue, List matches, List hiddenMatches, String incompleteResultsReason, int compactMode, boolean showPremiumHint, JLanguageTool.Mode mode) { RuleMatchesAsJsonSerializer serializer = new RuleMatchesAsJsonSerializer(compactMode, usedLang); + serializer.setRuleIdToConfidenceMap(ruleIdToConfidence); return serializer.ruleMatchesToJson2(matches, hiddenMatches, text, CONTEXT_SIZE, lang, incompleteResultsReason, showPremiumHint, mode); } From 6feea8bb15c7f2ea7ca986ddfe2ad9555802ce9a Mon Sep 17 00:00:00 2001 From: Daniel Naber Date: Fri, 5 Jan 2024 15:53:53 +0100 Subject: [PATCH 31/44] adapt to extended format --- .../main/java/org/languagetool/server/V2TextChecker.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/languagetool-server/src/main/java/org/languagetool/server/V2TextChecker.java b/languagetool-server/src/main/java/org/languagetool/server/V2TextChecker.java index 314b07ee92830..849a7bfd4d6e5 100644 --- a/languagetool-server/src/main/java/org/languagetool/server/V2TextChecker.java +++ b/languagetool-server/src/main/java/org/languagetool/server/V2TextChecker.java @@ -66,16 +66,16 @@ private void loadConfidenceMap() throws IOException { if (line.startsWith("#")) { continue; } - String[] parts = line.split(";"); - if (parts.length == 2) { + String[] parts = line.split(","); + if (parts.length >= 2) { try { float confidence = Float.parseFloat(parts[1]); ruleIdToConfidence.put(parts[0], confidence); } catch (NumberFormatException e) { - throw new RuntimeException("Invalid confidence float value in " + config.getRuleIdToConfidenceFile() + ", expected 'RULE_ID;float_value': " + line); + throw new RuntimeException("Invalid confidence float value in " + config.getRuleIdToConfidenceFile() + ", expected 'RULE_ID,float_value[,...]': " + line); } } else { - throw new RuntimeException("Invalid line in " + config.getRuleIdToConfidenceFile() + ", expected 'RULE_ID;float_value': " + line); + throw new RuntimeException("Invalid line in " + config.getRuleIdToConfidenceFile() + ", expected 'RULE_ID,float_value[,...]': " + line); } } } From 3d26ec967a6d744a8a5a9d8f98bf048df12cfb8b Mon Sep 17 00:00:00 2001 From: Daniel Naber Date: Fri, 5 Jan 2024 17:16:31 +0100 Subject: [PATCH 32/44] move confidence below rule to avoid duplication --- .../tools/RuleMatchesAsJsonSerializer.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/languagetool-core/src/main/java/org/languagetool/tools/RuleMatchesAsJsonSerializer.java b/languagetool-core/src/main/java/org/languagetool/tools/RuleMatchesAsJsonSerializer.java index 161379e0dbb72..3bd5e64018f19 100644 --- a/languagetool-core/src/main/java/org/languagetool/tools/RuleMatchesAsJsonSerializer.java +++ b/languagetool-core/src/main/java/org/languagetool/tools/RuleMatchesAsJsonSerializer.java @@ -297,11 +297,6 @@ private void writeReplacements(JsonGenerator g, RuleMatch match) throws IOExcept } if (replacement.getConfidence() != null) { g.writeNumberField("confidence", replacement.getConfidence()); - } else if (ruleIdToConfidence != null) { - Float confidence = ruleIdToConfidence.get(match.getRule().getId()); - if (confidence != null) { - g.writeNumberField("confidence", confidence); - } } g.writeEndObject(); } @@ -361,6 +356,12 @@ private void writeRule(JsonGenerator g, RuleMatch match) throws IOException { } g.writeEndArray(); } + if (ruleIdToConfidence != null) { + Float confidence = ruleIdToConfidence.get(rule.getId()); + if (confidence != null) { + g.writeNumberField("confidence", confidence); + } + } g.writeEndObject(); } From 4dbc869b95d064ea083f86eea44f75ab7de51ff0 Mon Sep 17 00:00:00 2001 From: Daniel Naber Date: Mon, 8 Jan 2024 12:28:20 +0100 Subject: [PATCH 33/44] add comment about file format --- .../src/main/java/org/languagetool/server/V2TextChecker.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/languagetool-server/src/main/java/org/languagetool/server/V2TextChecker.java b/languagetool-server/src/main/java/org/languagetool/server/V2TextChecker.java index 849a7bfd4d6e5..549b9df9468d2 100644 --- a/languagetool-server/src/main/java/org/languagetool/server/V2TextChecker.java +++ b/languagetool-server/src/main/java/org/languagetool/server/V2TextChecker.java @@ -67,7 +67,7 @@ private void loadConfidenceMap() throws IOException { continue; } String[] parts = line.split(","); - if (parts.length >= 2) { + if (parts.length >= 2) { // there might be more columns for better debugging, but we don't use them here try { float confidence = Float.parseFloat(parts[1]); ruleIdToConfidence.put(parts[0], confidence); From a5be79f58b13e215727e95e4ec7af5b491c80fcc Mon Sep 17 00:00:00 2001 From: Daniel Naber Date: Mon, 8 Jan 2024 12:29:24 +0100 Subject: [PATCH 34/44] add @Nullable --- .../src/main/java/org/languagetool/server/HTTPServerConfig.java | 1 + 1 file changed, 1 insertion(+) diff --git a/languagetool-server/src/main/java/org/languagetool/server/HTTPServerConfig.java b/languagetool-server/src/main/java/org/languagetool/server/HTTPServerConfig.java index 2a0c2aaf4d894..e4d7e64a51201 100644 --- a/languagetool-server/src/main/java/org/languagetool/server/HTTPServerConfig.java +++ b/languagetool-server/src/main/java/org/languagetool/server/HTTPServerConfig.java @@ -1515,6 +1515,7 @@ public void setDbMaxConnections(int dbMaxConnections) { /** * @since 6.4 */ + @Nullable public File getRuleIdToConfidenceFile() { return ruleIdToConfidenceFile; } From ef04254658fa1ed05174af5ec81fd4f0fdc9a373 Mon Sep 17 00:00:00 2001 From: Daniel Naber Date: Mon, 8 Jan 2024 10:33:00 +0100 Subject: [PATCH 35/44] [de] accept more compounds --- .../org/languagetool/resource/de/hunspell/spelling.txt | 7 ------- .../org/languagetool/resource/de/words_no_infix_s.txt | 3 +++ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/languagetool-language-modules/de/src/main/resources/org/languagetool/resource/de/hunspell/spelling.txt b/languagetool-language-modules/de/src/main/resources/org/languagetool/resource/de/hunspell/spelling.txt index eb98caa60bbde..58221a38cd5a3 100644 --- a/languagetool-language-modules/de/src/main/resources/org/languagetool/resource/de/hunspell/spelling.txt +++ b/languagetool-language-modules/de/src/main/resources/org/languagetool/resource/de/hunspell/spelling.txt @@ -63678,12 +63678,8 @@ Betriebsrentenstärkungsgesetzes versicherungsvertraglich/A versicherungsförmig/A Günstigerstellung -Zwitterposition -Zwitterpositionen Doppelverbeitragung Doppelverbeitragungen -Sockelfreibetrag/S -Sockelfreibeträge/N pauschalbesteuert/A riestergefördert/A gezillmert/A @@ -63723,8 +63719,6 @@ Ardeatinischen Höhlen Ardeatinische Höhlen Ardeatinischen Höhle Ardeatinische Höhle -Dorschbestand/S -Dorschbestände/N Merowe-Stausee/S Merowe-Staudamm/S rürupgefördert/A @@ -63754,7 +63748,6 @@ einkommensabhängig/A Skye Terrier/SN Biewer Terrier/SN braunfarben/A -Klägeranwaltes Retinaatrophie Trachealkollaps Distichiasis diff --git a/languagetool-language-modules/de/src/main/resources/org/languagetool/resource/de/words_no_infix_s.txt b/languagetool-language-modules/de/src/main/resources/org/languagetool/resource/de/words_no_infix_s.txt index f5602015e54b6..a489c72ebeab7 100644 --- a/languagetool-language-modules/de/src/main/resources/org/languagetool/resource/de/words_no_infix_s.txt +++ b/languagetool-language-modules/de/src/main/resources/org/languagetool/resource/de/words_no_infix_s.txt @@ -1783,6 +1783,9 @@ Sex Dattel Gutverdiener Malaria +Kläger +Dorsch +Zwitter Gezeiten Zusage Absage From 09abc2c94bb41fb58152a661aeae45fbfa580aa9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaume=20Ortol=C3=A0?= Date: Mon, 8 Jan 2024 14:11:03 +0100 Subject: [PATCH 36/44] [ca] fix FP --- .../resources/org/languagetool/resource/ca/disambiguation.xml | 2 +- .../ca/src/main/resources/org/languagetool/rules/ca/grammar.xml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/languagetool-language-modules/ca/src/main/resources/org/languagetool/resource/ca/disambiguation.xml b/languagetool-language-modules/ca/src/main/resources/org/languagetool/resource/ca/disambiguation.xml index c7e118ae42a92..0ed7a49bfdb23 100644 --- a/languagetool-language-modules/ca/src/main/resources/org/languagetool/resource/ca/disambiguation.xml +++ b/languagetool-language-modules/ca/src/main/resources/org/languagetool/resource/ca/disambiguation.xml @@ -11832,7 +11832,7 @@ Copyright (C) 2012 Jaume Ortolà i Font - com + com|segons nous?|reis|deu|temes\p{Lu}.* diff --git a/languagetool-language-modules/ca/src/main/resources/org/languagetool/rules/ca/grammar.xml b/languagetool-language-modules/ca/src/main/resources/org/languagetool/rules/ca/grammar.xml index c20343c1200eb..e59e2fca00840 100644 --- a/languagetool-language-modules/ca/src/main/resources/org/languagetool/rules/ca/grammar.xml +++ b/languagetool-language-modules/ca/src/main/resources/org/languagetool/rules/ca/grammar.xml @@ -2954,6 +2954,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA Una a dalt i una a baix. Això condemna una part rellevant de la població a dificultats extremes. Sovint s'usa per a transcriure a text entrevistes o converses. + S'ha d'avisar si portes convidats.