From c07aea8de9d8306941ad0fd47a9d1e0184904f4a Mon Sep 17 00:00:00 2001 From: Jason Dent Date: Thu, 20 Jun 2024 14:47:05 +0200 Subject: [PATCH 1/2] fix: Remove lower case `colum` from English dictionaries. --- dictionaries/en-common-misspellings/dict-en.yaml | 1 + dictionaries/en_AU/cspell-tools.config.yaml | 2 ++ dictionaries/en_CA/cspell-tools.config.yaml | 2 ++ dictionaries/en_GB-MIT/cspell-tools.config.yaml | 2 ++ dictionaries/en_GB/cspell-tools.config.yaml | 2 ++ dictionaries/{en_US => en_GB}/src/exclude-words.txt | 2 ++ dictionaries/en_US/cspell-tools.config.yaml | 2 +- dictionaries/en_US/src/en_US.txt | 2 +- dictionaries/en_shared/cspell-tools.config.yaml | 6 ++++-- dictionaries/en_shared/src/exclude-words.txt | 4 ++++ package.json | 1 + pnpm-lock.yaml | 13 +++++++++++++ 12 files changed, 35 insertions(+), 4 deletions(-) rename dictionaries/{en_US => en_GB}/src/exclude-words.txt (55%) create mode 100644 dictionaries/en_shared/src/exclude-words.txt diff --git a/dictionaries/en-common-misspellings/dict-en.yaml b/dictionaries/en-common-misspellings/dict-en.yaml index fa011d5be82..421fd81425e 100644 --- a/dictionaries/en-common-misspellings/dict-en.yaml +++ b/dictionaries/en-common-misspellings/dict-en.yaml @@ -837,6 +837,7 @@ dictionaryDefinitions: - collony->colony - collosal->colossal - colonizators->colonizers + - colum->column - comander->commander, commandeer - comando->commando - comandos->commandos diff --git a/dictionaries/en_AU/cspell-tools.config.yaml b/dictionaries/en_AU/cspell-tools.config.yaml index 80d6f7b8a75..6fd0ac1ddfe 100644 --- a/dictionaries/en_AU/cspell-tools.config.yaml +++ b/dictionaries/en_AU/cspell-tools.config.yaml @@ -10,4 +10,6 @@ targets: format: trie3 targetDirectory: '.' generateNonStrict: true + excludeWordsFrom: + - node_modules/@cspell/dict-en-shared/src/exclude-words.txt checksumFile: true diff --git a/dictionaries/en_CA/cspell-tools.config.yaml b/dictionaries/en_CA/cspell-tools.config.yaml index 316d391dfee..a8b46155f25 100644 --- a/dictionaries/en_CA/cspell-tools.config.yaml +++ b/dictionaries/en_CA/cspell-tools.config.yaml @@ -10,4 +10,6 @@ targets: format: trie3 targetDirectory: '.' generateNonStrict: true + excludeWordsFrom: + - node_modules/@cspell/dict-en-shared/src/exclude-words.txt checksumFile: true diff --git a/dictionaries/en_GB-MIT/cspell-tools.config.yaml b/dictionaries/en_GB-MIT/cspell-tools.config.yaml index 5bf8b7a874f..5c21dc18620 100644 --- a/dictionaries/en_GB-MIT/cspell-tools.config.yaml +++ b/dictionaries/en_GB-MIT/cspell-tools.config.yaml @@ -9,4 +9,6 @@ targets: - listFile: source-files.txt sort: true generateNonStrict: true + excludeWordsFrom: + - node_modules/@cspell/dict-en-shared/src/exclude-words.txt checksumFile: true diff --git a/dictionaries/en_GB/cspell-tools.config.yaml b/dictionaries/en_GB/cspell-tools.config.yaml index d9b26de3622..2fcf9e9bed9 100644 --- a/dictionaries/en_GB/cspell-tools.config.yaml +++ b/dictionaries/en_GB/cspell-tools.config.yaml @@ -13,4 +13,6 @@ targets: - node_modules/@cspell/dict-en-shared/src/shared-additional-words.txt sort: true generateNonStrict: true + excludeWordsFrom: + - node_modules/@cspell/dict-en-shared/src/exclude-words.txt checksumFile: true diff --git a/dictionaries/en_US/src/exclude-words.txt b/dictionaries/en_GB/src/exclude-words.txt similarity index 55% rename from dictionaries/en_US/src/exclude-words.txt rename to dictionaries/en_GB/src/exclude-words.txt index 4c70b3c26e5..8389d5277f8 100644 --- a/dictionaries/en_US/src/exclude-words.txt +++ b/dictionaries/en_GB/src/exclude-words.txt @@ -1,2 +1,4 @@ +~colum +colum knifes midwifes diff --git a/dictionaries/en_US/cspell-tools.config.yaml b/dictionaries/en_US/cspell-tools.config.yaml index c0b4a753b1c..c24a710b3dc 100644 --- a/dictionaries/en_US/cspell-tools.config.yaml +++ b/dictionaries/en_US/cspell-tools.config.yaml @@ -15,5 +15,5 @@ targets: targetDirectory: '.' generateNonStrict: true excludeWordsFrom: - - src/exclude-words.txt + - node_modules/@cspell/dict-en-shared/src/exclude-words.txt checksumFile: true diff --git a/dictionaries/en_US/src/en_US.txt b/dictionaries/en_US/src/en_US.txt index 1b1d2f179a6..1b0965bf593 100644 --- a/dictionaries/en_US/src/en_US.txt +++ b/dictionaries/en_US/src/en_US.txt @@ -3715,7 +3715,7 @@ colors colossians colossuses colporteurs -columbian +Columbian columnal colures combater diff --git a/dictionaries/en_shared/cspell-tools.config.yaml b/dictionaries/en_shared/cspell-tools.config.yaml index 2109620eae6..4e881abc356 100644 --- a/dictionaries/en_shared/cspell-tools.config.yaml +++ b/dictionaries/en_shared/cspell-tools.config.yaml @@ -3,8 +3,10 @@ targets: - name: 'en-shared' sources: - - 'src/shared-additional-words.txt' - format: 'plaintext' + - src/shared-additional-words.txt + format: plaintext targetDirectory: './dict' generateNonStrict: false compress: false + excludeWordsFrom: + - src/exclude-words.txt diff --git a/dictionaries/en_shared/src/exclude-words.txt b/dictionaries/en_shared/src/exclude-words.txt new file mode 100644 index 00000000000..8389d5277f8 --- /dev/null +++ b/dictionaries/en_shared/src/exclude-words.txt @@ -0,0 +1,4 @@ +~colum +colum +knifes +midwifes diff --git a/package.json b/package.json index f49f1ef455c..b4fc9c29402 100644 --- a/package.json +++ b/package.json @@ -40,6 +40,7 @@ "cross-env": "^7.0.3", "cspell": "^8.9.0", "cspell-dict-file-checker": "workspace:*", + "cspell-trie": "^8.9.0", "eslint": "^9.5.0", "generator-cspell-dicts": "workspace:*", "globals": "^15.6.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c021f9d72e4..d137bbf0089 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -38,6 +38,9 @@ importers: cspell-dict-file-checker: specifier: workspace:* version: link:cspell-dict-file-checker + cspell-trie: + specifier: ^8.9.0 + version: 8.9.0 eslint: specifier: ^9.5.0 version: 9.5.0 @@ -2716,6 +2719,16 @@ packages: '@cspell/cspell-types': 8.9.0 gensequence: 7.0.0 + /cspell-trie@8.9.0: + resolution: {integrity: sha512-HlvUgV7gWF18aA7yAOiqQcM5CfdhrgX1RAZ7orN00bQ+NQyxPREHP7diajzD/MO6CdkntuCaxWHyT3f1OOm3lg==} + engines: {node: '>=18'} + hasBin: true + dependencies: + commander: 12.1.0 + cspell-trie-lib: 8.9.0 + gensequence: 7.0.0 + dev: true + /cspell@8.9.0: resolution: {integrity: sha512-lDYu5p/XU3rqiNjMV46s92yJ7SfVyzAy03OtCJ94fopegZwFLjqZvqoy509ccP/0sHmiv83oTed8LP6Fm3kjpw==} engines: {node: '>=18'} From 20618a2a4c479734f59214c5f425ab90bb44b108 Mon Sep 17 00:00:00 2001 From: Jason Dent Date: Thu, 20 Jun 2024 15:09:03 +0200 Subject: [PATCH 2/2] Delete exclude-words.txt --- dictionaries/en_GB/src/exclude-words.txt | 4 ---- 1 file changed, 4 deletions(-) delete mode 100644 dictionaries/en_GB/src/exclude-words.txt diff --git a/dictionaries/en_GB/src/exclude-words.txt b/dictionaries/en_GB/src/exclude-words.txt deleted file mode 100644 index 8389d5277f8..00000000000 --- a/dictionaries/en_GB/src/exclude-words.txt +++ /dev/null @@ -1,4 +0,0 @@ -~colum -colum -knifes -midwifes