devanagari-transliterations: Conversion between Devanagari Unicode, Harvard-Kyoto, IAST and ISO15919.

This is a package candidate release! Here you can preview how this package release will appear once published to the main package index (which can be accomplished via the 'maintain' link below). Please note that once a package has been published to the main package index it cannot be undone! Please consult the package uploading documentation for more information.

[maintain] [Publish]

Please see the README on GitHub at https://github.com/thma/devanagari-transliterations#readme


[Skip to Readme]

Properties

Versions 0.1.0.0, 0.1.0.0
Change log None available
Dependencies array (>=0.5.5 && <0.6), base (>=4.7 && <5), containers (>=0.6.7 && <0.7), deepseq (>=1.4.8 && <1.5), extra (>=1.7.14 && <1.8), text (>=2.0.2 && <2.1) [details]
License BSD-3-Clause
Copyright 2023 Thomas Mahler
Author Thomas Mahler
Maintainer thma@apache.org
Category Linguistics
Home page https://github.com/thma/devanagari-transliterations#readme
Bug tracker https://github.com/thma/devanagari-transliterations/issues
Source repo head: git clone https://github.com/thma/devanagari-transliterations
Uploaded by thma at 2023-12-24T10:09:40Z

Modules

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees


Readme for devanagari-transliterations-0.1.0.0

[back to package description]

devanagari-transliterations

License BSD3 Actions Status codecov Available on Hackage

This library provides conversions between Devanagari (unicode block 0900-097F) and the transliterations Harvard-Kyoto, IAST and ISO15919.

It is particulary useful to produce Devanagari output from a Harvard-Kyoto (ASCII-only) source. This is shown in the example below.

Usage

{-# LANGUAGE OverloadedStrings #-}

import Data.Char.Devanagari (tokenize, toDevanagari, toHarvard, toIast, toIso)
import qualified Data.Text.IO as TIO

main :: IO ()
main = do
  let tokens = tokenize "zubha lAbha" -- meaning "good luck"
  TIO.putStrLn $ "Devanagari:    " <> toDevanagari tokens 
  TIO.putStrLn $ "IAST:          " <> toIast tokens
  TIO.putStrLn $ "ISO15919:      " <> toIso tokens
  TIO.putStrLn $ "Harvard Kyoto: " <> toHarvard tokens

Output:

Devanagari:    शुभ लाभ
IAST:          śubha lābha
ISO15919:      śubha lābha
Harvard Kyoto: zubha lAbha

Available on Hackage

https://hackage.haskell.org/package/devanagari-transliterations

Add the following to your package.yaml file:

dependencies:
- devanagari-transliterations

The complete conversion table

Harvard-Kyoto Devanagari IAST ISO15919
a a a
A ā ā
i i i
I ī ī
u u u
U ū ū
R
RR r̥̄
lR
lRR l̥̄
e e ē
o o ō
ai ai ai
au au au
k क् k k
c च् c c
T ट्
t त् t t
p प् p p
g ग् g g
j ज् j j
D ड्
d द् d d
b ब् b b
G ङ्
J ञ् ñ ñ
N ण्
n न् n n
m म् m m
h ह् h h
y य् y y
r र् r r
l ल् l l
v व् v v
Z ज़् z z
f फ़् f f
z श् ś ś
S ष्
s स् s s
kh ख् kh kh
ch छ् ch ch
Th ठ् ṭh ṭh
th थ् th th
ph फ् ph ph
gh घ् gh gh
jh झ् jh jh
Dh ढ् ḍh ḍh
dh ध् dh dh
bh भ् bh bh
ġ ग़् ġ ġ
0 0 0
1 1 1
2 2 2
3 3 3
4 4 4
5 5 5
6 6 6
7 7 7
8 8 8
9 9 9
M
MM
H
' ' '
OM oṃ ōṁ
_ _ _
|‍ ||