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

Output case should follow more consistent rules #46

Closed
5 of 10 tasks
tvquizphd opened this issue Jan 10, 2021 · 0 comments
Closed
5 of 10 tasks

Output case should follow more consistent rules #46

tvquizphd opened this issue Jan 10, 2021 · 0 comments

Comments

@tvquizphd
Copy link
Contributor

tvquizphd commented Jan 10, 2021

This issue seeks to change how suggest.js/generate replaces, switches, and appends characters of different cases from surrounding characters. This issue notes two problems in nspell/main where the results of suggest should be Sentence Case instead of lowercase/UPPERCASE and one problem in nspell/main where the results of suggest should be UPPERCASE instead of lowercase. I'm totally open to the idea that this issue should not be addressed, or should be addressed differently.

This issue is resolved in PR #45.
This issue is ignored in PR #39.

Summary

  1. Because "Colour" suggests "Color":
    • "Aolor" should suggest "Color", not "color"
  2. Because "COLOUR" suggests "COLOR":
    • "COLORFU" should suggest ""COLORFUL", not "colorful"
  3. Because "canada" suggests "Canada":
    • "acnada" should suggest "Canada", not "CANADA"

Current Status

Here is the status of main. I've unchecked all inconsistent behaviors:

  • Usually, lowercase dictionary words inherit case of input:
    • usually return Sentence Case if input is Sentence Case:
      • This is usually true, ie "Colour" -> ["Color"]
      • This fails with "Ghandi" -> ["shandy", ...]
      • This fails with "Aolor" -> ["color", ...]
    • usually return UPPERCASE if input is UPPERCASE
      • This is usually true, ie "COLOUR" -> ["COLOR"]
      • This fails with "COLORFU" -> ["colorful"]
    • always return FuNkY caSE if input is FuNkY caSE
    • always return lowercase if input is lowercase
  • Sentence Case dictionary words usually return sentence case:
    • usually return Sentence Case if input is lowercase, Sentence Case, or FuNkY caSE:
      • This is usually true, ie "canada" -> ["Canada"]
      • This fails with "acnada" -> ["CANADA"]
      • This fails with "Acnada" -> ["CANADA"]
      • This fails for "CaNaDa" -> ["CANADA", ...]
    • always return UPPERCASE if input is UPPERCASE
  • UPPERCASE dictionary words always return UPPERCASE
  • FuNkY caSE dictionary words always return FuNkY caSE
@tvquizphd tvquizphd changed the title Inconsistent sentence case capitalization Output case should follow more consistent rules Jan 10, 2021
@wooorm wooorm closed this as completed in cd81c90 Jan 17, 2021
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

1 participant