Creating Custom Spellcheck

Post here questions and problems related to editing and publishing DITA content.
BentCat
Posts: 6
Joined: Wed Sep 13, 2023 9:54 pm

Creating Custom Spellcheck

Post by BentCat »

How does one go about creating a Hunspell custom dictionary/spell check mechanism (that I can plug into Preferences>Spellcheck) that when the spellcheck is run would suggest words based on our corporate style guide? Some of these words would no be misspelled per se, but would instead be words misused in terms of what the style guide says. For example, often writers will say end-user, but the style guide says you should be using the term user instead. In this case, I would want the spellcheck to flag the word "end-user" and suggest "user". So imagine a long table with two columns -- one column with a questionable term and the other column with the suggested alternative. Instead of "connect" say "log in", instead of "account group" say "product group"-- you get the idea.

This seems like it should be fairly easily to pull off...but I'm having trouble figuring out how to do it.

Has anyone done something similar or have any suggestions?
Radu
Posts: 9059
Joined: Fri Jul 09, 2004 5:18 pm

Re: Creating Custom Spellcheck

Post by Radu »

Hi,
Oxygen's spell checker (even customized with a custom dictionary) goes word by word. So you cannot get it to match "word1 word2" and propose a replacement with something else.
For what you want you should use our free terminology checker add-on which can be configured with custom rules and propose replacements for each match:
https://www.oxygenxml.com/doc/ug-editor ... addon.html

For example this rules file in the Oxygen's user's guide which matches "will be":
https://github.com/oxygenxml/userguide/ ... -terms.xml

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
BentCat
Posts: 6
Joined: Wed Sep 13, 2023 9:54 pm

Re: Creating Custom Spellcheck

Post by BentCat »

Radu --
Thank you, thank you, thank you!
The terminology checker is exactly what I was looking for! This is going to change my life.
Radu
Posts: 9059
Joined: Fri Jul 09, 2004 5:18 pm

Re: Creating Custom Spellcheck

Post by Radu »

Hi,
Great, I hope you'll find it useful for your team.
The terminology checker can work both with rules described in our own specific XML format or in Vale (for which there are already rules available with styleguides like the Microsoft Style guide). If you start from zero I would suggest using our own XML format to describe the matching rules as it is more powerful.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply