michael@0: New option of Libhyphen 2.7: NOHYPHEN michael@0: michael@0: Hyphen, apostrophe and other characters may be word boundary characters, michael@0: but they don't need (extra) hyphenation. With NOHYPHEN option michael@0: it's possible to hyphenate the words parts correctly. michael@0: michael@0: Example: michael@0: michael@0: ISO8859-1 michael@0: NOHYPHEN -,' michael@0: 1-1 michael@0: 1'1 michael@0: NEXTLEVEL michael@0: michael@0: Description: michael@0: michael@0: 1-1 and 1'1 declare hyphen and apostrophe as word boundary characters michael@0: and NOHYPHEN with the comma separated character (or character sequence) michael@0: list forbid the (extra) hyphens at the hyphen and apostrophe characters. michael@0: michael@0: Implicite NOHYPHEN declaration michael@0: michael@0: Without explicite NEXTLEVEL declaration, Hyphen 2.8 uses the michael@0: previous settings, plus in UTF-8 encoding, endash (U+2013) and michael@0: typographical apostrophe (U+2019) are NOHYPHEN characters, too. michael@0: michael@0: It's possible to enlarge the hyphenation distance from these michael@0: NOHYPHEN characters by using COMPOUNDLEFTHYPHENMIN and michael@0: COMPOUNDRIGHTHYPHENMIN attributes. michael@0: michael@0: Compound word hyphenation michael@0: michael@0: Hyphen library supports better compound word hyphenation and special michael@0: rules of compound word hyphenation of German languages and other michael@0: languages with arbitrary number of compound words. The new options, michael@0: COMPOUNDLEFTHYPHENMIN and COMPOUNDRIGHTHYPHENMIN help to set the right michael@0: style for the hyphenation of compound words. michael@0: michael@0: Algorithm michael@0: michael@0: The algorithm is an extension of the original pattern based hyphenation michael@0: algorithm. It uses two hyphenation pattern sets, defined in the same michael@0: pattern file and separated by the NEXTLEVEL keyword. First pattern michael@0: set is for hyphenation only at compound word boundaries, the second one michael@0: is for hyphenation within words or word parts. michael@0: michael@0: Recursive compound level hyphenation michael@0: michael@0: The algorithm is recursive: every word parts of a successful michael@0: first (compound) level hyphenation will be rehyphenated michael@0: by the same (first) pattern set. michael@0: michael@0: Finally, when first level hyphenation is not possible, Hyphen uses michael@0: the second level hyphenation for the word or the word parts. michael@0: michael@0: Word endings and word parts michael@0: michael@0: Patterns for word endings (patterns with ellipses) match the michael@0: word parts, too. michael@0: michael@0: Options michael@0: michael@0: COMPOUNDLEFTHYPHENMIN: min. hyph. dist. from the left compound word boundary michael@0: COMPOUNDRIGHTHYPHENMIN: min. hyph. dist. from the right comp. word boundary michael@0: NEXTLEVEL: sign second level hyphenation patterns michael@0: michael@0: Default hyphenmin values michael@0: michael@0: Default values of COMPOUNDLEFTHYPHENMIN and COMPOUNDRIGHTHYPHENMIN are 0, michael@0: and 0 under the hyphenation, too. ("0" values of michael@0: LEFTHYPHENMIN and RIGHTHYPHENMIN mean the default "2" under the hyphenation.) michael@0: michael@0: Examples michael@0: michael@0: See tests/compound* test files. michael@0: michael@0: Preparation of hyphenation patterns michael@0: michael@0: It hasn't been special pattern generator tool for compound hyphenation michael@0: patterns, yet. It is possible to use PATGEN to generate both of michael@0: pattern sets, concatenate it manually and set the requested HYPHENMIN values. michael@0: (But don't forget the preprocessing steps by substrings.pl before michael@0: concatenation.) One of the disadvantage of this method, that PATGEN michael@0: doesn't know recursive compound hyphenation of Hyphen. michael@0: michael@0: László Németh michael@0: