Skip to content

Dict: More words - #1688

Merged
peternewman merged 8 commits into
codespell-project:masterfrom
sebweb3r:patch-2
Sep 23, 2020
Merged

Dict: More words#1688
peternewman merged 8 commits into
codespell-project:masterfrom
sebweb3r:patch-2

Conversation

@sebweb3r

Copy link
Copy Markdown
Contributor

No description provided.

@sebweb3rsebweb3r mentioned this pull request Sep 23, 2020
@sebweb3r

Copy link
Copy Markdown
ContributorAuthor

@lurch see. it is strange.

@sebweb3r

Copy link
Copy Markdown
ContributorAuthor

@peternewman The words are in aspell [1] but not shown if you look for US [2] while other words are found. Jenkins doesn't like it too.

[1] http://app.aspell.net/lookup?dict=en_GB-ise&words=program%0D%0Aprogramme%0D%0Aprogrammes
[2] http://app.aspell.net/lookup?dict=en_US&words=program%0D%0Aprogramme%0D%0Aprogrammes%0D%0Acentres

@peternewman

Copy link
Copy Markdown
Collaborator

@peternewman The words are in aspell [1] but not shown if you look for US [2] while other words are found. Jenkins doesn't like it too.

[1] http://app.aspell.net/lookup?dict=en_GB-ise&words=program%0D%0Aprogramme%0D%0Aprogrammes
[2] http://app.aspell.net/lookup?dict=en_US&words=program%0D%0Aprogramme%0D%0Aprogrammes%0D%0Acentres

That's because my naive dictionary implementation only uses one dictionary (in this case en_US), which it seems some GB words (like colour) are in, but not others. The fix will be to have two aspell instances and use the appropriate one for each dictionary, which probably means tracking what language it's in. That would also be problematic for typos for GB words when we start getting stricter about them being in the dictionary. Or the large one might fix it. 🤞

@sebweb3r

Copy link
Copy Markdown
ContributorAuthor

Ok, that sound like a stupid implementation in aspell. To cite the description of aspell-en in debian "American, British, Canadian and Australian spellings are included." :-D

@peternewman

Copy link
Copy Markdown
Collaborator

Ok, that sound like a stupid implementation in aspell. To cite the description of aspell-en in debian "American, British, Canadian and Australian spellings are included." :-D

Or it might be my usage of it, perhaps we can/need to pass in multiple languages at once.

Comment threadcodespell_lib/data/dictionary.txt
@sebweb3r

Copy link
Copy Markdown
ContributorAuthor

I added #1690 to simply add enGB-ise to the tests.

@lurch

Copy link
Copy Markdown
Contributor

The way the aspell lookup works seems a bit weird...

http://app.aspell.net/lookup?dict=en_US&words=program%0D%0Aprogramme%0D%0Acolor%0D%0Acolour says that program and color are in en_US, colour is in en_GB-ise, but programme is only in SCOWL.
(which implies that programme isn't in en_GB-ise?).

http://app.aspell.net/lookup?dict=en_GB-ise&words=program%0D%0Aprogramme%0D%0Acolor%0D%0Acolour says that program, programme and colour are in en_GB-ise, but color is only in SCOWL.
(which implies that color isn't in en_US?) 😕

@peternewman
peternewman merged commit 8ec6420 into codespell-project:masterSep 23, 2020
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@sebweb3r@peternewman@lurch