Skip to content

add conversions for demon* from enGB to enUS - #1653

Merged
peternewman merged 3 commits into
codespell-project:masterfrom
sebweb3r:daemon
Sep 3, 2020
Merged

add conversions for demon* from enGB to enUS#1653
peternewman merged 3 commits into
codespell-project:masterfrom
sebweb3r:daemon

Conversation

@sebweb3r

Copy link
Copy Markdown
Contributor

No description provided.

@sebweb3r
sebweb3rforce-pushed the daemon branch 2 times, most recently from 73063a9 to 384d3bcCompareAugust 28, 2020 06:05
@sebweb3rsebweb3r changed the title some more words for the dictionariesadd corrections for daemon and demonAug 28, 2020
@sebweb3r

Copy link
Copy Markdown
ContributorAuthor

how to proceed with words, that are "wrong" in regular english but used in coding?

Comment threadcodespell_lib/data/dictionary_code.txt Outdated
@peternewman

Copy link
Copy Markdown
Collaborator

how to proceed with words, that are "wrong" in regular english but used in coding?

As per my comment, I'm not convinced they are, certainly one isn't, so I suspect the others probably shouldn't be either if you're using the Greek sense.

@sebweb3r

Copy link
Copy Markdown
ContributorAuthor

ok. I reduced it to the enGB->enUS

@peternewmanpeternewman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Do you want to add equivalents for daemonize etc? Up to you?

This looks like it exists!
https://linux.die.net/man/1/daemonize

@sebweb3r

sebweb3r commented Aug 31, 2020

Copy link
Copy Markdown
ContributorAuthor

I wanted to add them first, but they are not in aspell. Thus, the tests fail.
I've put them in #1626, which is blocked by the costum dictionary in #1485.

@lurch

lurch commented Sep 1, 2020

Copy link
Copy Markdown
Contributor

Whilst I agree that daemon can be considered a "proper word", I'm not convinced that daemonize, daemonisation, etc. should ever be considered "proper words", although I accept that they may appear in computing-only contexts?
I.e. in natural-language I think that codespell should suggest daemonize->demonize, and only "allow" daemonize when checking code. But perhaps that's a level of subtlety that codespell doesn't have yet? 🤷

Comment threadcodespell_lib/data/dictionary_en-GB_to_en-US.txt
@peternewman

Copy link
Copy Markdown
Collaborator

Whilst I agree that daemon can be considered a "proper word", I'm not convinced that daemonize, daemonisation, etc. should ever be considered "proper words", although I accept that they may appear in computing-only contexts?
I.e. in natural-language I think that codespell should suggest daemonize->demonize, and only "allow" daemonize when checking code. But perhaps that's a level of subtlety that codespell doesn't have yet? shrug

They were already in the code dictionary before @sebweb3r deleted them, which would mean if you chose to enable that dictionary (typically not in code contexts), it would see them as typos and convert them as you suggested. It does mean you can't have a typo which suggests them if they are corrected to something else elsewhere.

@sebweb3r

Copy link
Copy Markdown
ContributorAuthor

There were not in the dictionary. I proposed to add them in this MR (see b3e9127), but after your remarks I deleted the addition. 😄

@lurch

lurch commented Sep 1, 2020

Copy link
Copy Markdown
Contributor

it would see them as typos and convert them as you suggested. It does mean you can't have a typo which suggests them if they are corrected to something else elsewhere.

I'm afraid you've lost me again 🙃 😆

@sebweb3r

Copy link
Copy Markdown
ContributorAuthor

to simplify it:

You are not allowed to have the same word as a right word in one dictionary and as wrong in a different dictionary (except of enGB_to_enUS).

@peternewman

peternewman commented Sep 2, 2020

Copy link
Copy Markdown
Collaborator

You are not allowed to have the same word as a right word in one dictionary and as wrong in a different dictionary (except of enGB_to_enUS).

And the others currently defined here (which does need a comment clarifying direction if any):
https://github.com/codespell-project/codespell/blob/master/codespell_lib/tests/test_dictionary.py#L180-L186

There were not in the dictionary. I proposed to add them in this MR (see b3e9127), but after your remarks I deleted the addition. smile

Sorry, I meant you'd added them to achieve what @lurch was suggesting. I only meant and said that daemon is never a typo, not the other variants. I haven't done any searching, but I suspect @lurch could be correct about daemonize only being valid in computing concepts (and so should be corrected in the code dictionary). Someone just needs to check a proper dictionary to see if they have both spellings.

@lurch

lurch commented Sep 2, 2020

Copy link
Copy Markdown
Contributor

I can't find it being used outside of a computing context? https://www.google.com/search?q=daemonize+-computer+-process+-command+-program+-library

@lurch

lurch commented Sep 2, 2020

Copy link
Copy Markdown
Contributor

Wow, you clearly have more google-persistence than me!
Given that you've found it used in a real printed book I'll withdraw my objections. 📘

@peternewman

Copy link
Copy Markdown
Collaborator

@sebweb3r do you want to add back the other dea- to dae- words?

@sebweb3r

Copy link
Copy Markdown
ContributorAuthor

Which additions exactly do you mean?
For the code dictionary I had those:

daemonisation->demonisation, demonization,
daemonise->demonise, demonize,
daemonised->demonised, demonized,
daemonising->demonising, demonizing,
daemonization->demonization, demonisation,
daemonize->demonize, demonise,
daemonized->demonized, demonised,
daemonizing->demonizing, demonising,

But you said, that they are real words, that are rarely used outside of the code context.
I would be fine to add them to the code dictionary again (but it is maybe a false positive)

dea- to dae are alreay in.
daemonis*->daemoniz* don't work, due to aspell

@peternewman

Copy link
Copy Markdown
Collaborator

Sorry I lost track the other stuff had been merged elsewhere.

daemonis*->daemoniz* don't work, due to aspell

Okay. They just aren't in aspell at all, so we'd need to have a second dictionary for non-aspell entries or something, so lets give up on them for now.

I'm happy if @lurch is happy with the latest state too.

@lurch

lurch commented Sep 3, 2020

Copy link
Copy Markdown
Contributor

The title of the PR needs updating, but otherwise LGTM!

@peternewman
peternewman merged commit e7d539e into codespell-project:masterSep 3, 2020
@sebweb3rsebweb3r changed the title add corrections for daemon and demonadd conversions for demon* from enGB to enUSSep 3, 2020
@sebweb3r
sebweb3r deleted the daemon branch September 3, 2020 00:29
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