Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add conversions for demon* from enGB to enUS #1653

Merged
merged 3 commits into from
Sep 3, 2020

Conversation

sebweb3r
Copy link
Contributor

No description provided.

@sebweb3r sebweb3r force-pushed the daemon branch 2 times, most recently from 73063a9 to 384d3bc Compare August 28, 2020 06:05
@sebweb3r sebweb3r changed the title some more words for the dictionaries add corrections for daemon and demon Aug 28, 2020
@sebweb3r
Copy link
Contributor Author

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

@peternewman
Copy link
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
Contributor Author

ok. I reduced it to the enGB->enUS

Copy link
Collaborator

@peternewman peternewman left a comment

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
Copy link
Contributor Author

sebweb3r commented Aug 31, 2020

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
Copy link
Contributor

lurch commented Sep 1, 2020

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? 🤷

@peternewman
Copy link
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
Contributor Author

sebweb3r commented Sep 1, 2020

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
Copy link
Contributor

lurch commented Sep 1, 2020

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
Contributor Author

sebweb3r commented Sep 1, 2020

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
Copy link
Collaborator

peternewman commented Sep 2, 2020

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
Copy link
Contributor

lurch commented Sep 2, 2020

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
Copy link
Contributor

lurch commented Sep 2, 2020

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
Collaborator

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

@sebweb3r
Copy link
Contributor Author

sebweb3r commented Sep 2, 2020

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
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
Copy link
Contributor

lurch commented Sep 3, 2020

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

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