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

Grammar checker should also use speller API #4

Open
snomos opened this issue Feb 15, 2019 · 0 comments
Open

Grammar checker should also use speller API #4

snomos opened this issue Feb 15, 2019 · 0 comments

Comments

@snomos
Copy link
Member

snomos commented Feb 15, 2019

Since the grammar checker is also doing spelling, it should also use the speller API's of LibreOffice. This has several benefits:

  • we can do away with the standard speller, which means less downloads/installations
  • with no external speller, we don't risk the speller creating noise / false alarms or in general behaving worse than the grammar checker+speller; this is true especially when it comes to tokenisation (see example below)
  • unless anounced as a speller, LO will not indicate that there are proofing tools unless also the speller is installed, thus we need to announce the grammar checker as speller to make sure that users are aware that there are proofing tools installed
  • speller suggestions coming from the grammar checker are usually much better, and will thus create an improved user experience:
    • some suggestions are removed by cg rules based on context
    • for all misspellings being recognised and analysed with an error tag, we can generate only the expected suggestion, nothing else

As an example of issues we get away with using this approach, consider this sentence:

Sámedikki kultur- ja valáštallanstipeanddat

The regular speller will mistokenise kultur- and only see kultur, which it does not recognise and thus gives a red underline. The grammar checker tokeniser, on the other hand, does it correct, recognises the full form kultur-, and sees that it is correct. No underline added.

The grammar checker should use the API such that only errors tagged with &typos are provided to the speller API (offsets for redlining, list of suggestions).

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