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

camel case / snake case / numbers / capitalization #4

Closed
jerabaul29 opened this issue Jan 13, 2025 · 2 comments
Closed

camel case / snake case / numbers / capitalization #4

jerabaul29 opened this issue Jan 13, 2025 · 2 comments

Comments

@jerabaul29
Copy link

I use cspell quite a bit and it has simple (but effective) logics implemented around:

  • camel case
  • snake case
  • numbers in variables
  • capitalization and accentuation

See:

Could something similar be implemented, either in core or as an add-on / "extra word splitting layer", in spellbook? :) This is naturally quite useful for developers :) .

@the-mikedavis
Copy link
Member

That part of Spellbook is left to consuming applications. Spellbook assumes that the input for Dictionary::check or Dictionary::suggest is a single word. There is some basic case handling to make sure that proper nouns are correct only when titlecased, for example "Alice" but not "alice" in en_US, but splitting camel case words into separate tokens I would consider out of scope. It's hard to write a tokenization strategy that works for everyone and I want Spellbook to be very thin so I've left this to consumers. But CSpell's strategies are probably worth looking into for figuring out how we should tokenize in the Helix integration (#1).

@jerabaul29
Copy link
Author

closing in favor of the issue you pointed to :) .

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

No branches or pull requests

2 participants