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

[ bsd3, library, linguistics ] [ Propose Tags ] [ Report a vulnerability ]
Versions [RSS] 0.1.0.0
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:11:13Z
Distributions NixOS:0.1.0.0
Downloads 58 total (5 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs uploaded by user
Build status unknown [no reports yet]

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](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ṃ ōṁ
_ _ _
|‍ ||