You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 15, 2022. It is now read-only.
Contains Applications built around the Transliteration engine. The contents of this folder (to be downloaded from [latest release](https://github.com/AI4Bharat/IndianNLP-Transliteration/releases/latest)) is sufficient for usage.
3
+
## Deep Indic Xlit Engine
4
4
5
-
1. Python Library for running transliteration from Roman to Native text
6
-
2. HTTPS API exposing for interation with web applications
7
-
3. NN based models and related metadata
5
+
A deep transliteration engine for major languages of the Indian sub-continent.
8
6
9
-
# Usage
7
+
This package provides support for:
8
+
1. Python Library for transliteration from Roman to Native text (using NN-based models)
9
+
2. HTTP API exposing for interation with web applications
10
10
11
-
### Python Library
12
-
13
-
*Note: Initially set pythonpath environment variable* <br>
14
-
`export PYTHONPATH=path/to/xlit_apps:$PYTHONPATH`
11
+
## Languages Supported
15
12
16
-
**Example 1** : Using word Transliteration
13
+
|ISO 639 code|Language|
14
+
|---|-----------------|
15
+
|bn |Bengali |
16
+
|gom|Konkani Goan |
17
+
|gu |Gujarati |
18
+
|hi |Hindi |
19
+
|kn |Kannada |
20
+
|mai|Maithili |
21
+
|ml |Malayalam |
22
+
|mr |Marathi |
23
+
|pa |Punjabi (Eastern)|
24
+
|sd |Sindhi (Western) |
25
+
|si |Sinhala |
26
+
|ta |Tamil |
27
+
|te |Telugu |
28
+
|ur |Urdu |
17
29
18
-
Note: <br>
19
-
`beam_width` increases beam search size, resulting in improved accuracy but increases time/compute. <br>
20
-
`topk` returns only specified number of top results.
30
+
## Usage
21
31
32
+
### Python Library
22
33
34
+
Import the transliteration engine by:
23
35
```
24
-
from xlit_src import XlitEngine
36
+
from ai4bharat.transliteration import XlitEngine
37
+
```
38
+
39
+
**Example 1** : Using word Transliteration
40
+
41
+
```py
25
42
26
43
e = XlitEngine("hi")
27
44
out = e.translit_word("aam", topk=5, beam_width=10)
1. Make required modification in SSL paths in `api_expose.py`. By default set to local host and both http & https are enabled <br>
93
+
1. Make required modification in SSL paths in `api_expose.py`. By default set to local host and both http & https are enabled.
77
94
78
-
2. Run the API expose code <br>
79
-
`$ sudo env PATH=$PATH python3 api_expose.py`<br>
80
-
Export `GOOGLE_APPLICATION_CREDENTIALS` if needed, by default functions realted to Google cloud is disabled.
95
+
2. Run the API expose code:
96
+
`$ sudo env PATH=$PATH python3 api_expose.py`
97
+
(Export `GOOGLE_APPLICATION_CREDENTIALS` if needed, by default functions realted to Google cloud is disabled.)
81
98
82
-
3. In browser (or) curl, use link as https://{IP-address}:{port}/tl/{lang-id}/{word in eng script} <br>
83
-
If debug mode enabled port will be 8000, else port will be 80 <br>
84
-
example: <br>
85
-
https://localhost:80/tl/ta/amma <br>
86
-
https://localhost:80/languages <br>
99
+
3. In browser (or) curl, use link as http://{IP-address}:{port}/tl/{lang-id}/{word in eng script}
100
+
If debug mode enabled port will be 8000, else port will be 80.
87
101
102
+
Example:
103
+
http://localhost:80/tl/ta/amma
104
+
http://localhost:80/languages
88
105
89
-
### Language Codes:
90
-
```
91
-
* bn - Bengali
92
-
* gom - Konkani Goan
93
-
* gu - Gujarati
94
-
* hi - Hindi
95
-
* kn - Kannada
96
-
* mai - Maithili
97
-
* ml - Malayalam
98
-
* mr - Marathi
99
-
* pa - Punjabi Eastern
100
-
* sd - Sindhi
101
-
* si - Sinhala
102
-
* ta - Tamil
103
-
* te - Telugu
104
-
* ur - Urdu
105
-
```
106
+
---
106
107
107
-
## Dependencies:
108
-
* torch
109
-
* numpy
108
+
## Release Notes
110
109
111
-
Web api, also depends
112
-
* flask
113
-
* flask_cors
114
-
* gevent
110
+
This package contains applications built around the Transliteration engine. The contents of this package can also be downloaded from [latest GitHub release](https://github.com/AI4Bharat/IndianNLP-Transliteration/releases/latest) is sufficient for inference usage.
0 commit comments