From 0331f13f717d3d5e7380328539b871d201a26c8c Mon Sep 17 00:00:00 2001 From: Ian Wagner Date: Wed, 18 Jun 2025 13:20:25 +0900 Subject: [PATCH] Add Estonian street abbreviations --- synonyms/linter.js | 2 +- synonyms/streets/et.txt | 3 +++ test/fixtures/expected-icu-tokenizer.json | 3 +++ test/fixtures/expected.json | 5 ++++- test/settings.js | 2 +- 5 files changed, 12 insertions(+), 3 deletions(-) create mode 100644 synonyms/streets/et.txt diff --git a/synonyms/linter.js b/synonyms/linter.js index f7ab2a89..a2ab89e4 100644 --- a/synonyms/linter.js +++ b/synonyms/linter.js @@ -12,7 +12,7 @@ const REPLACEMENT_REGEX = /=>/ * common mistakes with synonyms. * * Warnings: - * - Puntuation: Synonyms should not contain characters in the punctuation blacklist + * - Punctuation: Synonyms should not contain characters in the punctuation blacklist * - Letter Casing: Synonyms should be lowercase * - Sanity Checks: At least one synonym should exist, duplicates should be removed * - Multi Word: Multi-word synonyms can generate unexpected token positions diff --git a/synonyms/streets/et.txt b/synonyms/streets/et.txt new file mode 100644 index 00000000..aed55d2c --- /dev/null +++ b/synonyms/streets/et.txt @@ -0,0 +1,3 @@ +tänav, tanav, tän, tn +maantee, mnt +puiestee, pst diff --git a/test/fixtures/expected-icu-tokenizer.json b/test/fixtures/expected-icu-tokenizer.json index 25f52fd2..a4369c25 100644 --- a/test/fixtures/expected-icu-tokenizer.json +++ b/test/fixtures/expected-icu-tokenizer.json @@ -1951,6 +1951,9 @@ "vereda,vreda,ver", "viaducto,vcto,vd", "vista,vst,vsta,vist", + "tänav,tanav,tän,tn", + "maantee,mnt", + "puiestee,pst", "allée,allee,all", "allées,alls,allees", "arcade,arc", diff --git a/test/fixtures/expected.json b/test/fixtures/expected.json index bb9acffe..c8a6815d 100644 --- a/test/fixtures/expected.json +++ b/test/fixtures/expected.json @@ -1933,6 +1933,9 @@ "vereda,vreda,ver", "viaducto,vcto,vd", "vista,vst,vsta,vist", + "tänav,tanav,tän,tn", + "maantee,mnt", + "puiestee,pst", "allée,allee,all", "allées,alls,allees", "arcade,arc", @@ -3025,4 +3028,4 @@ }, "dynamic": "strict" } -} \ No newline at end of file +} diff --git a/test/settings.js b/test/settings.js index 37789dfd..f212dc25 100644 --- a/test/settings.js +++ b/test/settings.js @@ -522,7 +522,7 @@ module.exports.tests.streetSynonymFilter = function(test, common) { var filter = s.analysis.filter['synonyms/streets']; t.equal(filter.type, 'synonym'); t.true(Array.isArray(filter.synonyms)); - t.equal(filter.synonyms.length, 809); + t.equal(filter.synonyms.length, 812); t.end(); }); };