11-29-2015, 02:46 PM | #1 |
Addict
Posts: 201
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. |
11-29-2015, 04:13 PM | #2 |
Sigil Developer
Posts: 7,657
Karma: 5433388
Join Date: Nov 2009
Device: many
|
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 |
Advert | |
|
11-29-2015, 04:25 PM | #3 |
Ex-Helpdesk Junkie
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
"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? 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. Last edited by eschwartz; 11-29-2015 at 04:28 PM. |
11-29-2015, 04:36 PM | #4 |
null operator (he/him)
Posts: 20,590
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
@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 |
11-30-2015, 01:58 PM | #5 |
Addict
Posts: 201
Karma: 62362
Join Date: Jul 2015
Device: Sony
|
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. |
Advert | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
dictionaries | shleepy | Bookeen | 29 | 12-14-2013 11:15 AM |
Other Non-Fiction Lin, Roger: hunspell le glouton. V1. FRENCH. 02 FEB 2013 | roger64 | Other Books | 0 | 02-02-2013 06:49 AM |
Batch process of words for the hunspell user dictionnary | roger64 | Sigil | 3 | 01-26-2013 07:32 AM |
Dictionaries under 2.1.0. | jshzh | PocketBook | 11 | 01-13-2012 04:53 AM |
About dictionaries | ddaneel | Bookeen | 8 | 07-12-2008 11:07 AM |