hzenhan: Zenhan library for Haskell

[ bsd3, library, text ] [ Propose Tags ]

Converter between Full-width Japanese and Half-width Japanese

[Skip to Readme]
Versions [faq] 0.0.1, 0.0.3, 0.0.4, 0.0.5 (info)
Dependencies base (>=4.7 && <5), containers, text [details]
License BSD-3-Clause
Copyright 2017 karky7 Calimakvonia
Author karky7
Maintainer cantimerny.g@gmail.com
Category Text
Home page https://github.com/karky7/hzenhan#readme
Source repo head: git clone https://github.com/karky7/hzenhan
Uploaded by karky7 at 2021-04-12T21:28:46Z
Distributions NixOS:0.0.5
Downloads 1042 total (65 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Hackage Matrix CI
Docs available [build log]
Last success reported on 2021-04-12 [all 1 reports]


[Index] [Quick Jump]


Maintainer's Corner

For package maintainers and hackage trustees

Readme for hzenhan-0.0.5

[back to package description]


Converter between Full-width Japanese and Half-width Japanese

This module ported Python's zenhan library, similar to the
"zenhan" library found in pypi:



Installing from Hackage with stack is straightforward:

> stack install

or gentoo emerge from gentoo-haskell overlay

> layman -a haskell
> emerge dev-haskell/hzenhan


Let's see an example.

> {-# LANGUAGE OverloadedStrings #-}
> import Text.Zenhan
> import Data.Text (pack, unpack)
> main :: IO ()
> main = do
>   let h = h2z [Kana, Digit, Ascii] \"A\" \"ABCd\\\\「」アイウエオ123\"
>       z = z2h [Kana, Digit, Ascii] \"Bエ\" h
>       r = isAllZenKana "アイウエオ"
>   putStrLn $ toString h
>   putStrLn $ toString z