Page 1 of 1

how to ignore character while running spellcheck

Posted: Mon Jun 19, 2023 9:33 am
by shikhar_472
Hi Team,

while running perform full spellcheck method how to ignore the characters,
in below image bracket is there in between the word so word is coming as mak while running spell check but it should take the whole word
Could you please help.
image.png

Re: how to ignore character while running spellcheck

Posted: Mon Jun 19, 2023 10:22 am
by Bogdan Dumitru
Hello,

Could you please elaborate a little on this part: "word is coming as mak while running spell check but it should take the whole word"?

Re: how to ignore character while running spellcheck

Posted: Mon Jun 19, 2023 10:30 am
by shikhar_472
Word is makers but taking only mak and not ignoring the brackets,
Please see the image for reference
image.png

Re: how to ignore character while running spellcheck

Posted: Mon Jun 19, 2023 11:24 am
by Bogdan Dumitru
Hello,

What does "mark[ers]" mean? How do you expect/want the spellcheck to handle those words?
  • the "[]" marks an added text, somewhat like the Insert Change Tracking.
  • the spellcheck should report "mark[ers]" as misspelled and propose to replace it with "markers"?
  • the spellcheck should report "mark[ers]" as correctly spelled instead of reporting "mark" as misspelled?

Re: how to ignore character while running spellcheck

Posted: Mon Jun 19, 2023 12:08 pm
by shikhar_472
Hi Dumitru,

the spellcheck should report "mark[ers]" as misspelled and propose to replace it with "markers"?
i want to achieve this.

Thanks for the quick reply.

Re: how to ignore character while running spellcheck

Posted: Mon Jun 19, 2023 4:12 pm
by Bogdan Dumitru
Hi,

Unfortunately, the built-in spellcheck support doesn't allow that but I guess that can be achieved by implementing a ro.sync.ecss.extensions.api.webapp.SpellcheckingEngine and setting via AuthorDocumentModel.getSpellchecker().setSpellcheckingEngine().
To intercept every AuthorDocumentModel opened you can use a WebappEditingSessionLifecycleListener.

Re: how to ignore character while running spellcheck

Posted: Tue Jul 18, 2023 12:01 pm
by shikhar_472
Could you please provide example for this how to do that

Re: how to ignore character while running spellcheck

Posted: Tue Jul 18, 2023 2:36 pm
by cristi_talau
Hello,

Unfortunately we do not have a public sample on how to use this API.
Also note that with this API you basically implement your own spell checker. So the effort may not be worth for fixing this particular case.
Best,
Cristian