![]() |
Using Hunspell dictionaries
I am trying to use the Hunspell dictionary that comes with Sigil to detect hyphenated words that are not always hyphenated.
For example, good-bye, is normally hyphenated but failed-and is not normally hyphenated unless it appears in a phrase such as he failed-and failed dismally. However, the Hunspell dictionary passes both of these examples as correct. Is there a way to enable the Huunspell dictionary to identify good-bye as normally hyphenated and failed-and as not normally hyphenated? I need to be able to distinguish between these types of hyphenated words so that I can write code for my plugin at https://www.mobileread.com/forums/sho...d.php?t=264378 to change the short hyphen to a long hyphen where appropriate. For example, I want to change the short hyphen in: he failed-and failed dismally to a long hyphen (mdash) in: he failed–and failed dismally. |
AFAIK, no. There is no real way to separate "good-bye" and "failed-and" as being different in the eyes of the spell-checker. You could of course build a wordlist of commonly hyphenated words and check it to see if it makes this common list, but I really can't say that one of those is incorrectly spelled and therefore a mistake in spelling.
Sorry |
"good-bye" is an actual word. "failed-and" is two words improperly hyphenated.
But spellcheckers don't really seem to consider that one word, for some reason. I guess they think all dashes are the same -- hyphens, en dashes, em dashes, what's the big deal? :rolleyes: So I'm not really sure what Sigil is supposed to do about that. You'll see the same problem in calibre, or for that matter the Firefox/Chrome edit box. ;) |
@CalibUser - This is what I do - in Spellcheck; check the Show all words box at the bottom of the list, then enter a hyphen into the Filter box at the top of the list. Eyeball the list looking for anomalous entries. such as failed-and.
I also have a saved search to find non-breaking hyphens, which maybe useful in 'identifiers', such as telephone or part numbers etc, but, IMO at least, they're best avoided elsewhere. BR |
Thank you for all your replies.
Interesting that spellcheckers don't really seem to consider "failed-and" as a hyphenated word. As I needed my plugin to replace short hyphens by long hyphens for these types of words, I will follow the suggestion made by KevinH and use the method used by BetterRed to compile a list of words that need to have the long-hyphen changed. |
| All times are GMT -4. The time now is 08:30 PM. |
Powered by: vBulletin
Copyright ©2000 - 3.8.5, Jelsoft Enterprises Ltd.
MobileRead.com is a privately owned, operated and funded community.