cndict-0.2.3: Chinese/Mandarin <-> English dictionary, Chinese lexer.

Safe HaskellNone
LanguageHaskell98

Data.Chinese.CCDict

Description

Simplified Chinese - English dictionary with pinyin phonetics.

Synopsis

Documentation

type CCDict = Map Char CCTrieEntry Source

data Entry Source

Dictionary entry

Constructors

Entry 

load :: FilePath -> IO CCDict Source

Load dictionary from file.

parse :: Text -> CCDict Source

Load dictionary from unicode text.

lookup :: Text -> CCDict -> Maybe Entry Source

O(n). Lookup dictionary entry for a string of simplified chinese.

ccDict :: CCDict Source

Embedded dictionary.

tokenizer :: CCDict -> Text -> [Token] Source

Break a string of simplified chinese down to a list of tokens.