bramstein/hypher — pull request #12 by lmeurs (2013-01-21 11:34:28+00:00)
Title: Custom exceptions separator and case insensitive exceptions

LS,

Thanks for the great script! I added 2 alterations:

1. Custom exception separator: the original Hypher uses a dash for exception separator to show where a word may be soft hyphened. All the exception separators are automatically replaced by soft hyphens, but some words contain a dash which should stay a dash, ie. the Dutch word "hotel-restaurant". By adding a custom exception separator like "*" the exception could look like "ho*tel-res*tau*rant".
2. The orginal Hypher needs all case variations of exceptions defined, ie. "Probably", "PROBABLY" and "probably". My 2nd alteration stores the lowercase version of the exception and compares this with a lowercase version of words in the to-be-hyphenated text. In case of a match, Hypher now loops through the syllabes and gets substrings of the to-be-hyphenated word to retain the original case.

I hope you like these additions!

Cheers, Laurens