View Single Post
Old 11-29-2015, 02:46 PM   #1
CalibUser
Addict
CalibUser goes to eleven.CalibUser goes to eleven.CalibUser goes to eleven.CalibUser goes to eleven.CalibUser goes to eleven.CalibUser goes to eleven.CalibUser goes to eleven.CalibUser goes to eleven.CalibUser goes to eleven.CalibUser goes to eleven.CalibUser goes to eleven.
 
Posts: 203
Karma: 62362
Join Date: Jul 2015
Device: Sony
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.
CalibUser is offline   Reply With Quote