Python Module Index 9
Total Page:16
File Type:pdf, Size:1020Kb
indictransliterationDocumentation Release 0.0.1 sanskrit-programmers Mar 28, 2021 Contents 1 Submodules 3 1.1 indic_transliteration.sanscript......................................3 1.1.1 Submodules...........................................3 1.1.1.1 indic_transliteration.sanscript.schemes........................3 1.1.1.1.1 Submodules.................................3 1.2 indic_transliteration.xsanscript......................................3 1.3 indic_transliteration.detect........................................3 1.3.1 Supported schemes.......................................4 1.4 indic_transliteration.deduplication....................................5 2 Indices and tables 7 Python Module Index 9 Index 11 i ii indictransliterationDocumentation; Release0:0:1 sanscript is the most popular submodule here. Contents 1 indictransliterationDocumentation; Release0:0:1 2 Contents CHAPTER 1 Submodules 1.1 indic_transliteration.sanscript 1.1.1 Submodules 1.1.1.1 indic_transliteration.sanscript.schemes 1.1.1.1.1 Submodules indic_transliteration.sanscript.schemes.roman indic_transliteration.sanscript.schemes.brahmi 1.2 indic_transliteration.xsanscript 1.3 indic_transliteration.detect Example usage: from indic_transliteration import detect detect.detect('pitRRIn') == Scheme.ITRANS detect.detect('pitRRn') == Scheme.HK When handling a Sanskrit string, it’s almost always best to explicitly state its transliteration scheme. This avoids embarrassing errors with words like pitRRIn. But most of the time, it’s possible to infer the encoding from the text itself. detect.py automatically detects a string’s transliteration scheme: 3 indictransliterationDocumentation; Release0:0:1 detect('pitRRIn') == Scheme.ITRANS detect('pitRRn') == Scheme.HK detect('pitFn') == Scheme.SLP1 detect('') == Scheme.Devanagari detect('') == Scheme.Bengali 1.3.1 Supported schemes All schemes are attributes on the Scheme class. You can also just use the scheme name: Scheme.IAST =='IAST' Scheme.Devanagari =='Devanagari' Scripts: • Bengali ('Bengali') • Devanagari ('Devanagari') • Gujarati ('Gujarati') • Gurmukhi ('Gurmukhi') • Kannada ('Kannada') • Malayalam ('Malayalam') • Oriya ('Oriya') • Tamil ('Tamil') • Telugu ('Telugu') Romanizations: • Harvard-Kyoto ('HK') • IAST ('IAST') • ITRANS ('ITRANS') • Kolkata ('Kolkata') • SLP1 ('SLP1') • Velthuis ('Velthuis') indic_transliteration.detect.BLOCKS = [('Malayalam', 3328), ('Kannada', 3200), ('Telugu', 3072), ('Tamil', 2944), ('Oriya', 2816), ('Gujarati', 2688), ('Gurmukhi', 2560), ('Bengali', 2432), ('Devanagari', 2304)] Schemes sorted by Unicode code point. Ignore schemes with none defined. indic_transliteration.detect.BRAHMIC_FIRST_CODE_POINT = 2304 Start of the Devanagari block. indic_transliteration.detect.BRAHMIC_LAST_CODE_POINT = 3455 End of the Malayalam block. class indic_transliteration.detect.Regex IAST_OR_KOLKATA_ONLY = <_sre.SRE_Pattern object> Match on special Roman characters ITRANS_ONLY = <_sre.SRE_Pattern object> Match on ITRANS-only 4 Chapter 1. Submodules indictransliterationDocumentation; Release0:0:1 ITRANS_OR_VELTHUIS_ONLY = <_sre.SRE_Pattern object> Match on chars shared by ITRANS and Velthuis KOLKATA_ONLY = <_sre.SRE_Pattern object> Match on Kolkata-specific Roman characters SLP1_ONLY = <_sre.SRE_Pattern object> Match on SLP1-only characters and bigrams VELTHUIS_ONLY = <_sre.SRE_Pattern object> Match on Velthuis-only characters indic_transliteration.detect.Scheme Enum for Sanskrit schemes. alias of indic_transliteration.detect.Enum indic_transliteration.detect.detect(text) Detect the input’s transliteration scheme. Parameters text – some text data, either a unicode or a str encoded in UTF-8. 1.4 indic_transliteration.deduplication 1.4. indic_transliteration.deduplication 5 indictransliterationDocumentation; Release0:0:1 6 Chapter 1. Submodules CHAPTER 2 Indices and tables • genindex • modindex • search 7 indictransliterationDocumentation; Release0:0:1 8 Chapter 2. Indices and tables Python Module Index i indic_transliteration, ?? 9 indictransliterationDocumentation; Release0:0:1 10 Python Module Index Index B BLOCKS (in module indic_transliteration.detect),4 BRAHMIC_FIRST_CODE_POINT (in module in- dic_transliteration.detect),4 BRAHMIC_LAST_CODE_POINT (in module in- dic_transliteration.detect),4 D detect() (in module indic_transliteration.detect),5 I IAST_OR_KOLKATA_ONLY (in- dic_transliteration.detect.Regex attribute), 4 indic_transliteration (module),1 ITRANS_ONLY (indic_transliteration.detect.Regex at- tribute),4 ITRANS_OR_VELTHUIS_ONLY (in- dic_transliteration.detect.Regex attribute), 4 K KOLKATA_ONLY (indic_transliteration.detect.Regex at- tribute),5 R Regex (class in indic_transliteration.detect),4 S Scheme (in module indic_transliteration.detect),5 SLP1_ONLY (indic_transliteration.detect.Regex at- tribute),5 V VELTHUIS_ONLY (indic_transliteration.detect.Regex attribute),5 11.