@@ -20,22 +20,24 @@ Indic transliteration tools
2020## Usage
2121
2222``` py
23- In [ 1 ]: from indic_transliteration import sanscript
24- ... : from indic_transliteration.sanscript import SchemeMap, SCHEMES , transliterate
25- ... :
23+ # Import the necessary modules from indic_transliteration
24+ from indic_transliteration import sanscript
25+ from indic_transliteration.sanscript import SchemeMap, SCHEMES , transliterate
2626
27- In [2 ]: data = ' idam adbhutam'
27+ # Input data for transliteration
28+ data = ' idam adbhutam'
2829
29- In [ 3 ]: print (transliterate(data, sanscript. HK , sanscript. TELUGU ))
30- ఇదమ్ అద్భుతమ్
30+ # Transliterate from Harvard-Kyoto (HK) to Telugu
31+ print (transliterate(data, sanscript. HK , sanscript. TELUGU )) # Output: ఇదమ్ అద్భుతమ్
3132
32- In [ 4 ]: print (transliterate(data, sanscript. ITRANS , sanscript. DEVANAGARI ))
33- इदम् अद्भुतम्
33+ # Transliterate from ITRANS to Devanagari
34+ print (transliterate(data, sanscript. ITRANS , sanscript. DEVANAGARI )) # Output: इदम् अद्भुतम्
3435
35- In [5 ]: scheme_map = SchemeMap(SCHEMES [sanscript.VELTHUIS ], SCHEMES [sanscript.TELUGU ])
36+ # Define a scheme map for transliteration from Velthuis to Telugu
37+ scheme_map = SchemeMap(SCHEMES [sanscript.VELTHUIS ], SCHEMES [sanscript.TELUGU ])
3638
37- In [ 6 ]: print (transliterate(data, scheme_map = scheme_map))
38- ఇదమ్ అద్భుతమ్
39+ # Transliterate using the scheme map
40+ print (transliterate(data, scheme_map = scheme_map)) # Output: ఇదమ్ అద్భుతమ్
3941```
4042
4143For a full list of supported schemes, please see files under indic_transliteration/sanscript/schemes/data .
@@ -67,16 +69,16 @@ For a full list of supported schemes, please see files under indic_transliterati
6769 slp_scheme['accents']['꣡'] = '%'
6870```
6971
70- ## Dravidian language extension
72+ ## Dravidian language extensions
7173``` py
72- In [1 ]: from indic_transliteration import xsanscript
73- ... : from indic_transliteration.xsanscript import SchemeMap, SCHEMES , transliterate
74- ... :
74+ # Import the necessary modules from indic_transliteration
75+ from indic_transliteration import sanscript
7576
76- In [2 ]: data = ' असय औषधिः ग्रन्थः। ऎ ऒ यॆक्ककॊ?'
77+ # Input data for transliteration
78+ data = ' असय औषधिः ग्रन्थः। ऎ ऒ यॆक्ककॊ?'
7779
78- In [ 3 ]: print (transliterate(data, xsanscript. DEVANAGARI , xsanscript. KANNADA ))
79- ಅಸಯ ಔಷಧಿಃ ಗ್ರನ್ಥಃ। ಎ ಒ ಯೆಕ್ಕಕೊ ?
80+ # Transliterate from Devanagari to Kannada
81+ print (sanscript.transliterate(data, sanscript. DEVANAGARI , sanscript. OPTITRANS_DRAVIDIAN ))
8082```
8183
8284
@@ -93,8 +95,8 @@ Installing the package with `pip` also installs a console script, `sanscript` wh
9395
9496### Demo
9597
96- <p align = " center " >
97- <img src =" cli-demo.gif " width =" 90% " style =" display : block ; margin : 0 auto ;" >
98+ <p >
99+ <img src =" cli-demo.gif " width =" 90% " style =" display : block ; margin : 0 auto ;" alt = " " >
98100</p >
99101
100102### Usage
0 commit comments