Safe Haskell | None |
---|---|
Language | Haskell98 |
Simplified Chinese - English dictionary with pinyin phonetics.
- type CCDict = IntMap CCTrieEntry
- data Entry = Entry {
- entrySimplified :: !Text
- entryTraditional :: !Text
- entryPinyin :: [Text]
- entryDefinition :: [[Text]]
- load :: FilePath -> IO CCDict
- parse :: Text -> CCDict
- lookup :: Text -> CCDict -> Maybe Entry
- ccDict :: CCDict
- data Token
- tokenizer :: CCDict -> Text -> [Token]
- toTraditional :: Text -> Text
- toSimplified :: Text -> Text
Documentation
Dictionary entry
Entry | |
|
lookup :: Text -> CCDict -> Maybe Entry Source
O(n). Lookup dictionary entry for a string of simplified chinese.
tokenizer :: CCDict -> Text -> [Token] Source
Break a string of simplified chinese down to a list of tokens.
toTraditional :: Text -> Text Source
toSimplified :: Text -> Text Source