rubocop-spellcheck 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/CHANGELOG.md +15 -0
- data/LICENSE.txt +21 -0
- data/README.md +236 -0
- data/config/default.yml +17 -0
- data/data/en/LICENSE +347 -0
- data/data/en/README.md +14 -0
- data/data/en/en.aff +205 -0
- data/data/en/en.dic +49569 -0
- data/lib/rubocop/cop/spellcheck/spelling.rb +131 -0
- data/lib/rubocop/spellcheck/checker.rb +139 -0
- data/lib/rubocop/spellcheck/front_matter.rb +111 -0
- data/lib/rubocop/spellcheck/markdown.rb +90 -0
- data/lib/rubocop/spellcheck/plugin.rb +30 -0
- data/lib/rubocop/spellcheck/prose_source.rb +35 -0
- data/lib/rubocop/spellcheck/version.rb +7 -0
- data/lib/rubocop-spellcheck.rb +10 -0
- metadata +128 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 1ed77adacb8aa94379378b10cebf66ffd8a710761d873c2eb845cebb15610c13
|
|
4
|
+
data.tar.gz: 949d777b38250c6f8427ec9509d5ea02bc181ef972515dec0e07e0d3ef974075
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: d54af9fc4f4faab80ff0f2d4476a2cd2dd923a22809d0e41d105137ef3d2d87e0df8e403be2d0c0a9d784f42d142b93c3a4b0499234987cfe791ede01e2501d8
|
|
7
|
+
data.tar.gz: 98c3511624a7244ce86a354a1842f04532bfb6cbd81b62f5783b7873b3221c60652bdee77d6a68eb82a5dea351afe63070dec44ad204b6d3c414dac8f859f40a
|
data/CHANGELOG.md
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
## Changelog
|
|
2
|
+
|
|
3
|
+
### 0.1.0 (2026/10/20)
|
|
4
|
+
|
|
5
|
+
* [#12](https://github.com/dblock/rubocop-spellcheck/pull/12): Preserve Markdown parsing and use original prose buffers - [@dblock](https://github.com/dblock).
|
|
6
|
+
* [#9](https://github.com/dblock/rubocop-spellcheck/pull/9): Preserve English accented words and ignore quoted delimiters, numeric identifiers, and Liquid template expressions in Markdown - [@dblock](https://github.com/dblock).
|
|
7
|
+
* [#6](https://github.com/dblock/rubocop-spellcheck/pull/6): Include plain text files by default while excluding configured dictionaries and bundled dictionary resources from spelling checks - [@dblock](https://github.com/dblock).
|
|
8
|
+
* [#8](https://github.com/dblock/rubocop-spellcheck/pull/8): Check YAML front matter string values recursively with original source locations and grouped Markdown settings - [@dblock](https://github.com/dblock).
|
|
9
|
+
* [#7](https://github.com/dblock/rubocop-spellcheck/pull/7): Separate lint, test, and package workflows with individual status badges - [@dblock](https://github.com/dblock).
|
|
10
|
+
* [#5](https://github.com/dblock/rubocop-spellcheck/pull/5): Rename Spellcheck/Comments to Spellcheck/Spelling and check Markdown prose with original source locations and shared dictionaries - [@dblock](https://github.com/dblock).
|
|
11
|
+
* [#4](https://github.com/dblock/rubocop-spellcheck/pull/4): Enable rubocop-rake and rubocop-rspec for development and disable Metrics/BlockLength - [@dblock](https://github.com/dblock).
|
|
12
|
+
* [#3](https://github.com/dblock/rubocop-spellcheck/pull/3): Enable this gem's own Spellcheck/Comments cop in repository linting with a project vocabulary file - [@dblock](https://github.com/dblock).
|
|
13
|
+
* [#2](https://github.com/dblock/rubocop-spellcheck/pull/2): Add monthly and manual maintenance PRs for the latest stable Kotoshu release and bundled English dictionary with license and provenance updates - [@dblock](https://github.com/dblock).
|
|
14
|
+
* [#1](https://github.com/dblock/rubocop-spellcheck/pull/1): Bundle English for zero-setup defaults and support language-keyed DictionaryFiles with gem-relative and local paths for replacement, supplemental vocabulary, and multilingual checking - [@dblock](https://github.com/dblock).
|
|
15
|
+
* Initial implementation of Spellcheck/Spelling with offline Kotoshu dictionaries, project vocabulary, precise offenses, and spelling suggestions - [@dblock](https://github.com/dblock).
|
data/LICENSE.txt
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Daniel (dB.) Doubrovkine
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
data/README.md
ADDED
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
# rubocop-spellcheck
|
|
2
|
+
|
|
3
|
+
[](https://github.com/dblock/rubocop-spellcheck/actions/workflows/test.yml)
|
|
4
|
+
[](https://github.com/dblock/rubocop-spellcheck/actions/workflows/lint.yml)
|
|
5
|
+
[](https://github.com/dblock/rubocop-spellcheck/actions/workflows/package.yml)
|
|
6
|
+
[](https://rubygems.org/gems/rubocop-spellcheck)
|
|
7
|
+
|
|
8
|
+
Spellcheck Ruby comments, Markdown prose, and plain text with [RuboCop](https://rubocop.org/) and [Kotoshu](https://github.com/kotoshu/kotoshu).
|
|
9
|
+
|
|
10
|
+
## Table of Contents
|
|
11
|
+
|
|
12
|
+
- [Installation](#installation)
|
|
13
|
+
- [Usage](#usage)
|
|
14
|
+
- [Configuration](#configuration)
|
|
15
|
+
- [Dictionary files](#dictionary-files)
|
|
16
|
+
- [Adding project vocabulary](#adding-project-vocabulary)
|
|
17
|
+
- [Replacing dictionaries and adding languages](#replacing-dictionaries-and-adding-languages)
|
|
18
|
+
- [Exclusions and suppression](#exclusions-and-suppression)
|
|
19
|
+
- [Scope and limitations](#scope-and-limitations)
|
|
20
|
+
- [Contributing](#contributing)
|
|
21
|
+
- [Copyright and License](#copyright-and-license)
|
|
22
|
+
|
|
23
|
+
## Installation
|
|
24
|
+
|
|
25
|
+
Requires Ruby 3.2 or newer and RuboCop 1.72.1 or newer (1.x).
|
|
26
|
+
|
|
27
|
+
Add to your `Gemfile`:
|
|
28
|
+
|
|
29
|
+
```ruby
|
|
30
|
+
group :development do
|
|
31
|
+
gem 'rubocop-spellcheck', require: false
|
|
32
|
+
end
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Enable the plugin in `.rubocop.yml`:
|
|
36
|
+
|
|
37
|
+
```yaml
|
|
38
|
+
plugins:
|
|
39
|
+
- rubocop-spellcheck
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Install and run; the default American English dictionary is included in the gem:
|
|
43
|
+
|
|
44
|
+
```sh
|
|
45
|
+
bundle install
|
|
46
|
+
bundle exec rubocop
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
By default, the plugin uses the bundled American English dictionary. No dictionary setup, external cache, or network access is needed.
|
|
50
|
+
|
|
51
|
+
For another language, download a Hunspell dictionary and its license into your project. For example, download the [latest German resources](https://github.com/kotoshu/dictionaries/tree/v1/de/spelling):
|
|
52
|
+
|
|
53
|
+
```sh
|
|
54
|
+
mkdir -p dictionaries/de
|
|
55
|
+
curl -fL https://raw.githubusercontent.com/kotoshu/dictionaries/v1/de/spelling/index.dic -o dictionaries/de/de.dic
|
|
56
|
+
curl -fL https://raw.githubusercontent.com/kotoshu/dictionaries/v1/de/spelling/index.aff -o dictionaries/de/de.aff
|
|
57
|
+
curl -fL https://raw.githubusercontent.com/kotoshu/dictionaries/v1/de/spelling/license -o dictionaries/de/LICENSE
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Then configure the locations explicitly:
|
|
61
|
+
|
|
62
|
+
```yaml
|
|
63
|
+
Spellcheck:
|
|
64
|
+
DictionaryFiles:
|
|
65
|
+
de:
|
|
66
|
+
- dictionaries/de/de.dic
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
The matching `dictionaries/de/de.aff` is loaded alongside it. Review the downloaded license and preserve its notices when committing or redistributing dictionary files. Commit these files or provision the same files in CI for reproducible results. You can also point to Hunspell files supplied by your operating system. The plugin does not use Kotoshu's resource cache, registration, or setup command; linting never downloads anything.
|
|
70
|
+
|
|
71
|
+
## Usage
|
|
72
|
+
|
|
73
|
+
`Spellcheck/Spelling` is enabled by default:
|
|
74
|
+
|
|
75
|
+
```ruby
|
|
76
|
+
# bad
|
|
77
|
+
# The red brown fox jumsp over the lazy dog.
|
|
78
|
+
|
|
79
|
+
# good
|
|
80
|
+
# The red brown fox jumps over the lazy dog.
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
```sh
|
|
84
|
+
bundle exec rubocop
|
|
85
|
+
bundle exec rubocop --only Spellcheck/Spelling
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
For example, given `example.rb`:
|
|
89
|
+
|
|
90
|
+
```ruby
|
|
91
|
+
# The red brown fox jumsp over the lazy dog.
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
Running `bundle exec rubocop --only Spellcheck/Spelling example.rb` reports:
|
|
95
|
+
|
|
96
|
+
```text
|
|
97
|
+
Inspecting 1 file
|
|
98
|
+
C
|
|
99
|
+
|
|
100
|
+
Offenses:
|
|
101
|
+
|
|
102
|
+
example.rb:1:21: C: Spellcheck/Spelling: Misspelled word: jumsp. Did you mean jumps, jump, jumpy?
|
|
103
|
+
# The red brown fox jumsp over the lazy dog.
|
|
104
|
+
^^^^^
|
|
105
|
+
|
|
106
|
+
1 file inspected, 1 offense detected
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
Each offense highlights the misspelled word and includes up to three suggestions when available. Spelling is ambiguous, so there is no autocorrection.
|
|
110
|
+
|
|
111
|
+
The same cop discovers `.md` and `.markdown` files and checks their prose:
|
|
112
|
+
|
|
113
|
+
```markdown
|
|
114
|
+
# The red brown fox jumsp over the lazy dog.
|
|
115
|
+
|
|
116
|
+
Check [the spelling](https://example.com) but not `code_identifiers`.
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
Markdown headings, paragraphs, lists, blockquotes, table cells, link labels, image descriptions, and footnote text are checked. Code blocks and inline code, link destinations and reference identifiers, and HTML tags/comments and HTML blocks are skipped. URLs and email addresses are ignored in both formats. HTML entities and escaped punctuation are decoded with offenses mapped back to the original source. No `rubocop-md` plugin is required; Ruby code inside Markdown blocks is not inspected.
|
|
120
|
+
|
|
121
|
+
YAML front matter checks string values recursively, including values inside mappings and arrays. Keys and strongly typed values such as numbers, booleans, dates, timestamps, and nulls are skipped. Quoted values are strings even when their contents resemble another type. Anchored strings are checked at their definition, not repeated through aliases; explicit string tags are supported, while other tags are ignored. YAML is parsed without constructing application objects. Plain and quoted values and multiline literal/folded values retain their original diagnostic locations, including quoted escape sequences. Invalid YAML produces an explicit error. Strings such as layout names and slugs are checked too; add intentional vocabulary to your dictionary. To disable front matter checks:
|
|
122
|
+
|
|
123
|
+
```yaml
|
|
124
|
+
Spellcheck/Spelling:
|
|
125
|
+
Markdown:
|
|
126
|
+
FrontMatter:
|
|
127
|
+
Enabled: false
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
Before the first release, `Spellcheck/Comments` was renamed to `Spellcheck/Spelling`. Update any existing cop-specific configuration, `--only` arguments, or Ruby suppression directives to use the new name.
|
|
131
|
+
|
|
132
|
+
Liquid output expressions and tags are ignored, including expressions inside link destinations. English words retain accented letters and internal apostrophes; surrounding quotation marks and numeric identifiers such as commit hashes and ordinals are not checked.
|
|
133
|
+
|
|
134
|
+
Plain `.txt` files are also discovered by default. Their entire contents are checked literally, including text that looks like Markdown code or headings; URLs and email addresses are still ignored. Configured dictionary files (including symbolic links to them) and this gem's bundled `data/` resources are excluded from spelling checks, so dictionary words and license/provenance files are not treated as prose. Hunspell `.dic` and `.aff` files are not included by default. Other text files, including project license files, can be excluded with normal `Spellcheck/Spelling` configuration.
|
|
135
|
+
|
|
136
|
+
## Configuration
|
|
137
|
+
|
|
138
|
+
### Dictionary files
|
|
139
|
+
|
|
140
|
+
`DictionaryFiles` maps language codes to lists of dictionary paths. When omitted or `null`, it selects packaged English, equivalent to:
|
|
141
|
+
|
|
142
|
+
```yaml
|
|
143
|
+
Spellcheck:
|
|
144
|
+
DictionaryFiles:
|
|
145
|
+
en:
|
|
146
|
+
- gem:rubocop-spellcheck/data/en/en.dic
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
An explicit map replaces the default selection completely; no English dictionary is implicitly retained. Each language key determines Kotoshu's tokenization for its dictionaries. A word passes if any configured dictionary accepts it. This supports multilingual comments, but a typo that is valid in another active language will pass. There is no language detection or separate `Language` setting.
|
|
150
|
+
|
|
151
|
+
Paths beginning with `gem:<gem-name>/` resolve relative to that installed gem's root; for example, `gem:rubocop-spellcheck/data/en/en.dic`. Other paths are relative to the effective RuboCop configuration directory (or working directory without a configuration file). No ERB is needed. Missing gems, files, empty language lists, and unsupported file extensions produce explicit errors; there is no fallback.
|
|
152
|
+
|
|
153
|
+
Hunspell `.dic` files load their matching `.aff` file in the same directory with the same basename. Plain `.txt` files contain literal words, one per line, matched case-insensitively without automatic inflection. Blank lines and lines starting with `#` are ignored; phrases are rejected.
|
|
154
|
+
|
|
155
|
+
Settings can also be overridden for `Spellcheck/Spelling` using normal RuboCop department/cop configuration. RuboCop merges explicitly inherited hashes by its normal configuration rules; within an explicit map, arrays replace inherited arrays unless `inherit_mode` says otherwise. Kotoshu's personal dictionary is not consulted. Changes to any selected dictionary or affix file invalidate cached results.
|
|
156
|
+
|
|
157
|
+
### Adding project vocabulary
|
|
158
|
+
|
|
159
|
+
Project vocabulary is just a plain `.txt` file with one word per line. Retain the gem dictionary path and append your version-controlled word list for product names and domain terms:
|
|
160
|
+
|
|
161
|
+
```yaml
|
|
162
|
+
Spellcheck:
|
|
163
|
+
DictionaryFiles:
|
|
164
|
+
en:
|
|
165
|
+
- gem:rubocop-spellcheck/data/en/en.dic
|
|
166
|
+
- .spellcheck.txt
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
```text
|
|
170
|
+
# Project vocabulary
|
|
171
|
+
Kotoshu
|
|
172
|
+
RuboCop
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
In `.spellcheck.txt`, blank lines and `#` comments are ignored. Words match case-insensitively, with no automatic inflection: list plural or other forms explicitly when needed. Unlike this literal word list, the bundled English dictionary uses Hunspell's `.dic` word list and `.aff` rules to recognize forms such as plurals and suffixes. Both formats can be combined in `DictionaryFiles`.
|
|
176
|
+
|
|
177
|
+
There is no separate `AllowedWords`, `DictionaryPath`, or additional-files option. To use only your own word list, omit the gem path.
|
|
178
|
+
|
|
179
|
+
### Replacing dictionaries and adding languages
|
|
180
|
+
|
|
181
|
+
List replacement dictionaries and any other active languages explicitly:
|
|
182
|
+
|
|
183
|
+
```yaml
|
|
184
|
+
Spellcheck:
|
|
185
|
+
DictionaryFiles:
|
|
186
|
+
en:
|
|
187
|
+
- dictionaries/custom-en.dic
|
|
188
|
+
de:
|
|
189
|
+
- dictionaries/de/de.dic
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
Both dictionaries participate in spelling checks. To check only German, omit the `en` key. Download instructions above show how to obtain the latest German files and their license.
|
|
193
|
+
|
|
194
|
+
### Exclusions and suppression
|
|
195
|
+
|
|
196
|
+
Use standard RuboCop exclusions and inline directives:
|
|
197
|
+
|
|
198
|
+
```yaml
|
|
199
|
+
Spellcheck/Spelling:
|
|
200
|
+
Exclude:
|
|
201
|
+
- spec/fixtures/**/*
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
```ruby
|
|
205
|
+
# rubocop:disable Spellcheck/Spelling
|
|
206
|
+
# Deliberately misspelled example: resutl.
|
|
207
|
+
# rubocop:enable Spellcheck/Spelling
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
Ruby inline directives apply to comments; Markdown HTML comments are ignored, not interpreted as suppression directives. To check only one format, use standard file inclusion:
|
|
211
|
+
|
|
212
|
+
```yaml
|
|
213
|
+
Spellcheck/Spelling:
|
|
214
|
+
Include:
|
|
215
|
+
- "**/*.rb"
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
## Scope and limitations
|
|
219
|
+
|
|
220
|
+
The first release checks Ruby comments, including trailing comments, Markdown prose, and plain `.txt` files. Ruby checks skip shebangs, magic comments, RuboCop/Standard directives, and Sorbet `typed:` declarations. It does not inspect Ruby strings, identifiers, symbols, or regular expressions.
|
|
221
|
+
|
|
222
|
+
Other comment content, including embedded code and documentation tags, is treated as text. Use a project dictionary or standard suppression for intentional non-prose. Word boundaries and spelling follow Kotoshu's selected language; this extension does not add language detection or grammar checking.
|
|
223
|
+
|
|
224
|
+
Kotoshu ships precompiled gems for macOS, Linux, and Windows. Building native dependencies from source on other platforms may require a Rust toolchain.
|
|
225
|
+
|
|
226
|
+
## Contributing
|
|
227
|
+
|
|
228
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md) for development and [RELEASING.md](RELEASING.md) for releases.
|
|
229
|
+
|
|
230
|
+
## Copyright and License
|
|
231
|
+
|
|
232
|
+
Copyright (c) 2026 Daniel (dB.) Doubrovkine. MIT License; see [LICENSE.txt](LICENSE.txt).
|
|
233
|
+
|
|
234
|
+
Kotoshu is a separate BSD-2-Clause dependency. The bundled SCOWL-derived American English dictionary carries its own copyright and redistribution terms; see [its full license](data/en/LICENSE) and [pinned provenance](data/en/README.md). Dictionary files and notices are included in the packaged gem.
|
|
235
|
+
|
|
236
|
+
As of October 20, 2026, `kotoshu/dictionaries` describes its repository as MIT-licensed, but individual dictionaries retain their own licenses. The English package declares [`MIT AND BSD`](https://github.com/kotoshu/dictionaries/blob/v1/en/spelling/package.json); its [full notice](data/en/LICENSE) includes SCOWL's permissive redistribution grant, Ispell's BSD-style terms, and constituent word-list notices. The German dictionary used in the download example is [`GPL-2.0 OR GPL-3.0`](https://github.com/kotoshu/dictionaries/blob/v1/de/spelling/package.json), confirmed by its [license notice](https://github.com/kotoshu/dictionaries/blob/v1/de/spelling/license). German is not bundled with this gem. Other languages vary: inspect each dictionary's own license before using or redistributing it; the repository's MIT label does not relicense those files.
|
data/config/default.yml
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
Spellcheck:
|
|
2
|
+
# Null selects the packaged English dictionary; an explicit map replaces it.
|
|
3
|
+
DictionaryFiles:
|
|
4
|
+
|
|
5
|
+
AllCops:
|
|
6
|
+
Include:
|
|
7
|
+
- "**/*.md"
|
|
8
|
+
- "**/*.markdown"
|
|
9
|
+
- "**/*.txt"
|
|
10
|
+
|
|
11
|
+
Spellcheck/Spelling:
|
|
12
|
+
Description: Check spelling in Ruby comments, Markdown prose, and plain text.
|
|
13
|
+
Enabled: true
|
|
14
|
+
Markdown:
|
|
15
|
+
FrontMatter:
|
|
16
|
+
Enabled: true
|
|
17
|
+
VersionAdded: "0.1"
|
data/data/en/LICENSE
ADDED
|
@@ -0,0 +1,347 @@
|
|
|
1
|
+
en_US Hunspell Dictionary
|
|
2
|
+
Version 2020.12.07
|
|
3
|
+
Mon Dec 7 20:14:35 2020 -0500 [5ef55f9]
|
|
4
|
+
http://wordlist.sourceforge.net
|
|
5
|
+
|
|
6
|
+
README file for English Hunspell dictionaries derived from SCOWL.
|
|
7
|
+
|
|
8
|
+
These dictionaries are created using the speller/make-hunspell-dict
|
|
9
|
+
script in SCOWL.
|
|
10
|
+
|
|
11
|
+
The following dictionaries are available:
|
|
12
|
+
|
|
13
|
+
en_US (American)
|
|
14
|
+
en_CA (Canadian)
|
|
15
|
+
en_GB-ise (British with "ise" spelling)
|
|
16
|
+
en_GB-ize (British with "ize" spelling)
|
|
17
|
+
en_AU (Australian)
|
|
18
|
+
|
|
19
|
+
en_US-large
|
|
20
|
+
en_CA-large
|
|
21
|
+
en_GB-large (with both "ise" and "ize" spelling)
|
|
22
|
+
en_AU-large
|
|
23
|
+
|
|
24
|
+
The normal (non-large) dictionaries correspond to SCOWL size 60 and,
|
|
25
|
+
to encourage consistent spelling, generally only include one spelling
|
|
26
|
+
variant for a word. The large dictionaries correspond to SCOWL size
|
|
27
|
+
70 and may include multiple spelling for a word when both variants are
|
|
28
|
+
considered almost equal. The larger dictionaries however (1) have not
|
|
29
|
+
been as carefully checked for errors as the normal dictionaries and
|
|
30
|
+
thus may contain misspelled or invalid words; and (2) contain
|
|
31
|
+
uncommon, yet valid, words that might cause problems as they are
|
|
32
|
+
likely to be misspellings of more common words (for example, "ort" and
|
|
33
|
+
"calender").
|
|
34
|
+
|
|
35
|
+
To get an idea of the difference in size, here are 25 random words
|
|
36
|
+
only found in the large dictionary for American English:
|
|
37
|
+
|
|
38
|
+
Bermejo Freyr's Guenevere Hatshepsut Nottinghamshire arrestment
|
|
39
|
+
crassitudes crural dogwatches errorless fetial flaxseeds godroon
|
|
40
|
+
incretion jalapeño's kelpie kishkes neuroglias pietisms pullulation
|
|
41
|
+
stemwinder stenoses syce thalassic zees
|
|
42
|
+
|
|
43
|
+
The en_US, en_CA and en_AU are the official dictionaries for Hunspell.
|
|
44
|
+
The en_GB and large dictionaries are made available on an experimental
|
|
45
|
+
basis. If you find them useful please send me a quick email at
|
|
46
|
+
kevina@gnu.org.
|
|
47
|
+
|
|
48
|
+
If none of these dictionaries suite you (for example, maybe you want
|
|
49
|
+
the normal dictionary that also includes common variants) additional
|
|
50
|
+
dictionaries can be generated at http://app.aspell.net/create or by
|
|
51
|
+
modifying speller/make-hunspell-dict in SCOWL. Please do let me know
|
|
52
|
+
if you end up publishing a customized dictionary.
|
|
53
|
+
|
|
54
|
+
If a word is not found in the dictionary or a word is there you think
|
|
55
|
+
shouldn't be, you can lookup the word up at http://app.aspell.net/lookup
|
|
56
|
+
to help determine why that is.
|
|
57
|
+
|
|
58
|
+
General comments on these list can be sent directly to me at
|
|
59
|
+
kevina@gnu.org or to the wordlist-devel mailing lists
|
|
60
|
+
(https://lists.sourceforge.net/lists/listinfo/wordlist-devel). If you
|
|
61
|
+
have specific issues with any of these dictionaries please file a bug
|
|
62
|
+
report at https://github.com/kevina/wordlist/issues.
|
|
63
|
+
|
|
64
|
+
IMPORTANT CHANGES INTRODUCED In 2016.11.20:
|
|
65
|
+
|
|
66
|
+
New Australian dictionaries thanks to the work of Benjamin Titze
|
|
67
|
+
(btitze@protonmail.ch).
|
|
68
|
+
|
|
69
|
+
IMPORTANT CHANGES INTRODUCED IN 2016.04.24:
|
|
70
|
+
|
|
71
|
+
The dictionaries are now in UTF-8 format instead of ISO-8859-1. This
|
|
72
|
+
was required to handle smart quotes correctly.
|
|
73
|
+
|
|
74
|
+
IMPORTANT CHANGES INTRODUCED IN 2016.01.19:
|
|
75
|
+
|
|
76
|
+
"SET UTF8" was changes to "SET UTF-8" in the affix file as some
|
|
77
|
+
versions of Hunspell do not recognize "UTF8".
|
|
78
|
+
|
|
79
|
+
ADDITIONAL NOTES:
|
|
80
|
+
|
|
81
|
+
The NOSUGGEST flag was added to certain taboo words. While I made an
|
|
82
|
+
honest attempt to flag the strongest taboo words with the NOSUGGEST
|
|
83
|
+
flag, I MAKE NO GUARANTEE THAT I FLAGGED EVERY POSSIBLE TABOO WORD.
|
|
84
|
+
The list was originally derived from Németh László, however I removed
|
|
85
|
+
some words which, while being considered taboo by some dictionaries,
|
|
86
|
+
are not really considered swear words in today's society.
|
|
87
|
+
|
|
88
|
+
COPYRIGHT, SOURCES, and CREDITS:
|
|
89
|
+
|
|
90
|
+
The English dictionaries come directly from SCOWL
|
|
91
|
+
and is thus under the same copyright of SCOWL. The affix file is
|
|
92
|
+
a heavily modified version of the original english.aff file which was
|
|
93
|
+
released as part of Geoff Kuenning's Ispell and as such is covered by
|
|
94
|
+
his BSD license. Part of SCOWL is also based on Ispell thus the
|
|
95
|
+
Ispell copyright is included with the SCOWL copyright.
|
|
96
|
+
|
|
97
|
+
The collective work is Copyright 2000-2018 by Kevin Atkinson as well
|
|
98
|
+
as any of the copyrights mentioned below:
|
|
99
|
+
|
|
100
|
+
Copyright 2000-2018 by Kevin Atkinson
|
|
101
|
+
|
|
102
|
+
Permission to use, copy, modify, distribute and sell these word
|
|
103
|
+
lists, the associated scripts, the output created from the scripts,
|
|
104
|
+
and its documentation for any purpose is hereby granted without fee,
|
|
105
|
+
provided that the above copyright notice appears in all copies and
|
|
106
|
+
that both that copyright notice and this permission notice appear in
|
|
107
|
+
supporting documentation. Kevin Atkinson makes no representations
|
|
108
|
+
about the suitability of this array for any purpose. It is provided
|
|
109
|
+
"as is" without express or implied warranty.
|
|
110
|
+
|
|
111
|
+
Alan Beale <biljir@pobox.com> also deserves special credit as he has,
|
|
112
|
+
in addition to providing the 12Dicts package and being a major
|
|
113
|
+
contributor to the ENABLE word list, given me an incredible amount of
|
|
114
|
+
feedback and created a number of special lists (those found in the
|
|
115
|
+
Supplement) in order to help improve the overall quality of SCOWL.
|
|
116
|
+
|
|
117
|
+
The 10 level includes the 1000 most common English words (according to
|
|
118
|
+
the Moby (TM) Words II [MWords] package), a subset of the 1000 most
|
|
119
|
+
common words on the Internet (again, according to Moby Words II), and
|
|
120
|
+
frequently class 16 from Brian Kelk's "UK English Wordlist
|
|
121
|
+
with Frequency Classification".
|
|
122
|
+
|
|
123
|
+
The MWords package was explicitly placed in the public domain:
|
|
124
|
+
|
|
125
|
+
The Moby lexicon project is complete and has
|
|
126
|
+
been place into the public domain. Use, sell,
|
|
127
|
+
rework, excerpt and use in any way on any platform.
|
|
128
|
+
|
|
129
|
+
Placing this material on internal or public servers is
|
|
130
|
+
also encouraged. The compiler is not aware of any
|
|
131
|
+
export restrictions so freely distribute world-wide.
|
|
132
|
+
|
|
133
|
+
You can verify the public domain status by contacting
|
|
134
|
+
|
|
135
|
+
Grady Ward
|
|
136
|
+
3449 Martha Ct.
|
|
137
|
+
Arcata, CA 95521-4884
|
|
138
|
+
|
|
139
|
+
grady@netcom.com
|
|
140
|
+
grady@northcoast.com
|
|
141
|
+
|
|
142
|
+
The "UK English Wordlist With Frequency Classification" is also in the
|
|
143
|
+
Public Domain:
|
|
144
|
+
|
|
145
|
+
Date: Sat, 08 Jul 2000 20:27:21 +0100
|
|
146
|
+
From: Brian Kelk <Brian.Kelk@cl.cam.ac.uk>
|
|
147
|
+
|
|
148
|
+
> I was wondering what the copyright status of your "UK English
|
|
149
|
+
> Wordlist With Frequency Classification" word list as it seems to
|
|
150
|
+
> be lacking any copyright notice.
|
|
151
|
+
|
|
152
|
+
There were many many sources in total, but any text marked
|
|
153
|
+
"copyright" was avoided. Locally-written documentation was one
|
|
154
|
+
source. An earlier version of the list resided in a filespace called
|
|
155
|
+
PUBLIC on the University mainframe, because it was considered public
|
|
156
|
+
domain.
|
|
157
|
+
|
|
158
|
+
Date: Tue, 11 Jul 2000 19:31:34 +0100
|
|
159
|
+
|
|
160
|
+
> So are you saying your word list is also in the public domain?
|
|
161
|
+
|
|
162
|
+
That is the intention.
|
|
163
|
+
|
|
164
|
+
The 20 level includes frequency classes 7-15 from Brian's word list.
|
|
165
|
+
|
|
166
|
+
The 35 level includes frequency classes 2-6 and words appearing in at
|
|
167
|
+
least 11 of 12 dictionaries as indicated in the 12Dicts package. All
|
|
168
|
+
words from the 12Dicts package have had likely inflections added via
|
|
169
|
+
my inflection database.
|
|
170
|
+
|
|
171
|
+
The 12Dicts package and Supplement is in the Public Domain.
|
|
172
|
+
|
|
173
|
+
The WordNet database, which was used in the creation of the
|
|
174
|
+
Inflections database, is under the following copyright:
|
|
175
|
+
|
|
176
|
+
This software and database is being provided to you, the LICENSEE,
|
|
177
|
+
by Princeton University under the following license. By obtaining,
|
|
178
|
+
using and/or copying this software and database, you agree that you
|
|
179
|
+
have read, understood, and will comply with these terms and
|
|
180
|
+
conditions.:
|
|
181
|
+
|
|
182
|
+
Permission to use, copy, modify and distribute this software and
|
|
183
|
+
database and its documentation for any purpose and without fee or
|
|
184
|
+
royalty is hereby granted, provided that you agree to comply with
|
|
185
|
+
the following copyright notice and statements, including the
|
|
186
|
+
disclaimer, and that the same appear on ALL copies of the software,
|
|
187
|
+
database and documentation, including modifications that you make
|
|
188
|
+
for internal use or for distribution.
|
|
189
|
+
|
|
190
|
+
WordNet 1.6 Copyright 1997 by Princeton University. All rights
|
|
191
|
+
reserved.
|
|
192
|
+
|
|
193
|
+
THIS SOFTWARE AND DATABASE IS PROVIDED "AS IS" AND PRINCETON
|
|
194
|
+
UNIVERSITY MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
|
|
195
|
+
IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, PRINCETON
|
|
196
|
+
UNIVERSITY MAKES NO REPRESENTATIONS OR WARRANTIES OF MERCHANT-
|
|
197
|
+
ABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE
|
|
198
|
+
LICENSED SOFTWARE, DATABASE OR DOCUMENTATION WILL NOT INFRINGE ANY
|
|
199
|
+
THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
|
|
200
|
+
|
|
201
|
+
The name of Princeton University or Princeton may not be used in
|
|
202
|
+
advertising or publicity pertaining to distribution of the software
|
|
203
|
+
and/or database. Title to copyright in this software, database and
|
|
204
|
+
any associated documentation shall at all times remain with
|
|
205
|
+
Princeton University and LICENSEE agrees to preserve same.
|
|
206
|
+
|
|
207
|
+
The 40 level includes words from Alan's 3esl list found in version 4.0
|
|
208
|
+
of his 12dicts package. Like his other stuff the 3esl list is also in the
|
|
209
|
+
public domain.
|
|
210
|
+
|
|
211
|
+
The 50 level includes Brian's frequency class 1, words appearing
|
|
212
|
+
in at least 5 of 12 of the dictionaries as indicated in the 12Dicts
|
|
213
|
+
package, and uppercase words in at least 4 of the previous 12
|
|
214
|
+
dictionaries. A decent number of proper names is also included: The
|
|
215
|
+
top 1000 male, female, and Last names from the 1990 Census report; a
|
|
216
|
+
list of names sent to me by Alan Beale; and a few names that I added
|
|
217
|
+
myself. Finally a small list of abbreviations not commonly found in
|
|
218
|
+
other word lists is included.
|
|
219
|
+
|
|
220
|
+
The name files form the Census report is a government document which I
|
|
221
|
+
don't think can be copyrighted.
|
|
222
|
+
|
|
223
|
+
The file special-jargon.50 uses common.lst and word.lst from the
|
|
224
|
+
"Unofficial Jargon File Word Lists" which is derived from "The Jargon
|
|
225
|
+
File". All of which is in the Public Domain. This file also contain
|
|
226
|
+
a few extra UNIX terms which are found in the file "unix-terms" in the
|
|
227
|
+
special/ directory.
|
|
228
|
+
|
|
229
|
+
The 55 level includes words from Alan's 2of4brif list found in version
|
|
230
|
+
4.0 of his 12dicts package. Like his other stuff the 2of4brif is also
|
|
231
|
+
in the public domain.
|
|
232
|
+
|
|
233
|
+
The 60 level includes all words appearing in at least 2 of the 12
|
|
234
|
+
dictionaries as indicated by the 12Dicts package.
|
|
235
|
+
|
|
236
|
+
The 70 level includes Brian's frequency class 0 and the 74,550 common
|
|
237
|
+
dictionary words from the MWords package. The common dictionary words,
|
|
238
|
+
like those from the 12Dicts package, have had all likely inflections
|
|
239
|
+
added. The 70 level also included the 5desk list from version 4.0 of
|
|
240
|
+
the 12Dics package which is in the public domain.
|
|
241
|
+
|
|
242
|
+
The 80 level includes the ENABLE word list, all the lists in the
|
|
243
|
+
ENABLE supplement package (except for ABLE), the "UK Advanced Cryptics
|
|
244
|
+
Dictionary" (UKACD), the list of signature words from the YAWL package,
|
|
245
|
+
and the 10,196 places list from the MWords package.
|
|
246
|
+
|
|
247
|
+
The ENABLE package, mainted by M\Cooper <thegrendel@theriver.com>,
|
|
248
|
+
is in the Public Domain:
|
|
249
|
+
|
|
250
|
+
The ENABLE master word list, WORD.LST, is herewith formally released
|
|
251
|
+
into the Public Domain. Anyone is free to use it or distribute it in
|
|
252
|
+
any manner they see fit. No fee or registration is required for its
|
|
253
|
+
use nor are "contributions" solicited (if you feel you absolutely
|
|
254
|
+
must contribute something for your own peace of mind, the authors of
|
|
255
|
+
the ENABLE list ask that you make a donation on their behalf to your
|
|
256
|
+
favorite charity). This word list is our gift to the Scrabble
|
|
257
|
+
community, as an alternate to "official" word lists. Game designers
|
|
258
|
+
may feel free to incorporate the WORD.LST into their games. Please
|
|
259
|
+
mention the source and credit us as originators of the list. Note
|
|
260
|
+
that if you, as a game designer, use the WORD.LST in your product,
|
|
261
|
+
you may still copyright and protect your product, but you may *not*
|
|
262
|
+
legally copyright or in any way restrict redistribution of the
|
|
263
|
+
WORD.LST portion of your product. This *may* under law restrict your
|
|
264
|
+
rights to restrict your users' rights, but that is only fair.
|
|
265
|
+
|
|
266
|
+
UKACD, by J Ross Beresford <ross@bryson.demon.co.uk>, is under the
|
|
267
|
+
following copyright:
|
|
268
|
+
|
|
269
|
+
Copyright (c) J Ross Beresford 1993-1999. All Rights Reserved.
|
|
270
|
+
|
|
271
|
+
The following restriction is placed on the use of this publication:
|
|
272
|
+
if The UK Advanced Cryptics Dictionary is used in a software package
|
|
273
|
+
or redistributed in any form, the copyright notice must be
|
|
274
|
+
prominently displayed and the text of this document must be included
|
|
275
|
+
verbatim.
|
|
276
|
+
|
|
277
|
+
There are no other restrictions: I would like to see the list
|
|
278
|
+
distributed as widely as possible.
|
|
279
|
+
|
|
280
|
+
The 95 level includes the 354,984 single words, 256,772 compound
|
|
281
|
+
words, 4,946 female names and the 3,897 male names, and 21,986 names
|
|
282
|
+
from the MWords package, ABLE.LST from the ENABLE Supplement, and some
|
|
283
|
+
additional words found in my part-of-speech database that were not
|
|
284
|
+
found anywhere else.
|
|
285
|
+
|
|
286
|
+
Accent information was taken from UKACD.
|
|
287
|
+
|
|
288
|
+
The VarCon package was used to create the American, British, Canadian,
|
|
289
|
+
and Australian word list. It is under the following copyright:
|
|
290
|
+
|
|
291
|
+
Copyright 2000-2016 by Kevin Atkinson
|
|
292
|
+
|
|
293
|
+
Permission to use, copy, modify, distribute and sell this array, the
|
|
294
|
+
associated software, and its documentation for any purpose is hereby
|
|
295
|
+
granted without fee, provided that the above copyright notice appears
|
|
296
|
+
in all copies and that both that copyright notice and this permission
|
|
297
|
+
notice appear in supporting documentation. Kevin Atkinson makes no
|
|
298
|
+
representations about the suitability of this array for any
|
|
299
|
+
purpose. It is provided "as is" without express or implied warranty.
|
|
300
|
+
|
|
301
|
+
Copyright 2016 by Benjamin Titze
|
|
302
|
+
|
|
303
|
+
Permission to use, copy, modify, distribute and sell this array, the
|
|
304
|
+
associated software, and its documentation for any purpose is hereby
|
|
305
|
+
granted without fee, provided that the above copyright notice appears
|
|
306
|
+
in all copies and that both that copyright notice and this permission
|
|
307
|
+
notice appear in supporting documentation. Benjamin Titze makes no
|
|
308
|
+
representations about the suitability of this array for any
|
|
309
|
+
purpose. It is provided "as is" without express or implied warranty.
|
|
310
|
+
|
|
311
|
+
Since the original words lists come from the Ispell distribution:
|
|
312
|
+
|
|
313
|
+
Copyright 1993, Geoff Kuenning, Granada Hills, CA
|
|
314
|
+
All rights reserved.
|
|
315
|
+
|
|
316
|
+
Redistribution and use in source and binary forms, with or without
|
|
317
|
+
modification, are permitted provided that the following conditions
|
|
318
|
+
are met:
|
|
319
|
+
|
|
320
|
+
1. Redistributions of source code must retain the above copyright
|
|
321
|
+
notice, this list of conditions and the following disclaimer.
|
|
322
|
+
2. Redistributions in binary form must reproduce the above copyright
|
|
323
|
+
notice, this list of conditions and the following disclaimer in the
|
|
324
|
+
documentation and/or other materials provided with the distribution.
|
|
325
|
+
3. All modifications to the source code must be clearly marked as
|
|
326
|
+
such. Binary redistributions based on modified source code
|
|
327
|
+
must be clearly marked as modified versions in the documentation
|
|
328
|
+
and/or other materials provided with the distribution.
|
|
329
|
+
(clause 4 removed with permission from Geoff Kuenning)
|
|
330
|
+
5. The name of Geoff Kuenning may not be used to endorse or promote
|
|
331
|
+
products derived from this software without specific prior
|
|
332
|
+
written permission.
|
|
333
|
+
|
|
334
|
+
THIS SOFTWARE IS PROVIDED BY GEOFF KUENNING AND CONTRIBUTORS ``AS IS'' AND
|
|
335
|
+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
336
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
337
|
+
ARE DISCLAIMED. IN NO EVENT SHALL GEOFF KUENNING OR CONTRIBUTORS BE LIABLE
|
|
338
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
339
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
340
|
+
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
341
|
+
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
342
|
+
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
343
|
+
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
344
|
+
SUCH DAMAGE.
|
|
345
|
+
|
|
346
|
+
Build Date: Mon Dec 7 20:19:27 EST 2020
|
|
347
|
+
Wordlist Command: mk-list --accents=strip en_US 60
|
data/data/en/README.md
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Bundled English dictionary
|
|
2
|
+
|
|
3
|
+
`en.aff` and `en.dic` are unchanged copies of `en/spelling/index.aff` and `en/spelling/index.dic` from [kotoshu/dictionaries at commit `744120eb38a485a64c9185496c8422f66c491c05`](https://github.com/kotoshu/dictionaries/tree/744120eb38a485a64c9185496c8422f66c491c05/en/spelling).
|
|
4
|
+
|
|
5
|
+
This is the SCOWL-derived American English Hunspell dictionary, version 2020.12.07 (size 60). Its upstream copyright, redistribution permissions, credits, and notices are reproduced in full in [LICENSE](LICENSE). The gem's MIT license does not replace these dictionary terms.
|
|
6
|
+
|
|
7
|
+
SHA-256 checksums of the unmodified upstream files:
|
|
8
|
+
|
|
9
|
+
```text
|
|
10
|
+
8ae1f19d4840d957728ad90555d5a8dff6cc5c046279c95ff0c00fc0a0136c7b en.aff
|
|
11
|
+
f0b1a234bd178bdd01875b2a392a9647f888b8fe879f79c52aae62c2759b3647 en.dic
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Run `ruby script/update_resources.rb` to check the latest upstream dictionary and stable Kotoshu release, then review the dictionary and full license diff before merging. The monthly/manual [**Update spelling resources** workflow](../../.github/workflows/update-resources.yml) opens a maintenance PR for these changes. Dictionary updates should be intentional gem changes, not downloads during linting.
|