hyphenation-0.2.1.3: Configurable Knuth-Liang hyphenation

Portabilityportable
Stabilityprovisional
MaintainerEdward Kmett <ekmett@gmail.com>
Safe HaskellSafe-Infered

Text.Hyphenation.Language

Contents

Description

 

Synopsis

Pattern file support

languageHyphenator :: Language -> HyphenatorSource

Load (and cache) the hyphenator for a given language.

Provided language hyphenators

english_US :: HyphenatorSource

>>> hyphenate english_US "supercalifragilisticexpialadocious"
["su","per","cal","ifrag","ilis","tic","ex","pi","al","ado","cious"]

favors US hyphenation

english_GB :: HyphenatorSource

>>> hyphenate english_GB "supercalifragilisticexpialadocious"
["su","per","cal","i","fra","gil","istic","ex","pi","alado","cious"]

favors UK hyphenation

french :: HyphenatorSource

>>> hyphenate french "anticonstitutionnellement"
["an","ti","cons","ti","tu","tion","nel","le","ment"]

icelandic :: HyphenatorSource

>>> hyphenate icelandic "vaðlaheiðavegavinnuverkfærageymsluskúr"
["va\240la","hei\240a","vega","vinnu","verk","f\230ra","geymslu","sk\250r"]

loadHyphenator :: String -> IO HyphenatorSource

Read a built-in language file from the data directory where cabal installed this package.

(e.g. hyphenateLanguage "en-us" opens "/Users/ekmett/.cabal/share/hyphenation-0.2/ghc-7.4.1/hyph-en-us.hyp.txt" among others when run on the author's local machine)

languageAffix :: Language -> StringSource

the infix portion of the data file names used for this language