hzenhan: Zenhan library for Haskell

[ bsd3, library, text ] [ Propose Tags ] [ Report a vulnerability ]

Converter between Full-width Japanese and Half-width Japanese


[Skip to Readme]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 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
Reverse Dependencies 1 direct, 0 indirect [details]
Downloads 1557 total (5 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2021-04-12 [all 1 reports]

Readme for hzenhan-0.0.5

[back to package description]

hzenhan

Converter between Full-width Japanese and Half-width Japanese

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

https://pypi.python.org/pypi/zenhan/

Install

Installing from Hackage with stack is straightforward:

> stack install

or gentoo emerge from gentoo-haskell overlay

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

Usage

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