File size: 5,280 Bytes
32a8422
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
a55aad0
 
a5bc619
 
 
 
 
 
32a8422
 
 
 
 
 
 
 
 
 
 
 
 
 
d722992
32a8422
a5bc619
32a8422
a5bc619
32a8422
 
a5bc619
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
32a8422
 
 
 
 
a5bc619
32a8422
a5bc619
32a8422
a5bc619
 
 
32a8422
 
 
 
 
 
 
 
 
 
a5bc619
32a8422
 
 
a5bc619
32a8422
 
 
 
a5bc619
 
 
 
32a8422
 
 
 
 
 
 
 
 
 
a5bc619
 
 
32a8422
 
 
 
 
a5bc619
a664fb9
a5bc619
 
32a8422
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
---
language:
- hi
- bn
- ta
- te
- mr
- gu
- kn
- ml
- or
- pa
- as
- ur
- sa
- ne
- mai
- mni
- brx
- sat
- gom
- lus
- kha
- awa
- bho
- hne
- gbm
- bgc
- mwr
- en
license: cc-by-4.0
tags:
- indic-nlp
- language-identification
- sentiment-analysis
- text-classification
- onnx
pipeline_tag: text-classification
metrics:
- accuracy
- f1
---

# Indic-Lite: Unified Indic NLP Suite

**Indic-Lite** is a compact, high-efficiency Indic NLP toolkit designed for edge, mobile, and server environments. It provides lightweight models and text utilities:

1. **Indic-LID**: 28-Language Identification (covering Northeast languages, all 22 Eighth Schedule languages, regional dialects, and English)
2. **Indic-Sentiment**: 12-Language Sentiment Classifier
3. **Indic-Topic**: 6-Class Regional News & Headline Classifier
4. **Indic-Clean**: Rule-based Unicode NFC normalization, Indic numeral translation (e.g. १२३ → 123), and PII scrubbing.

---

## Supported Languages

### 1. `Indic-LID` (Language Identification — 28 Languages)

#### **Northeast Indian Languages (6)**
* **Assamese** (`as`) — Assam *(Bengali-Assamese script)*
* **Bodo** (`brx`) — Bodoland / Assam *(Devanagari script)*
* **Khasi** (`kha`) — Meghalaya *(Latin script)*
* **Manipuri / Meitei** (`mni`) — Manipur *(Meetei Mayek & Bengali script)*
* **Mizo** (`lus`) — Mizoram *(Latin script)*
* **Santali** (`sat`) — Assam, Tripura, Odisha *(Ol Chiki script)*

#### **Scheduled National Languages (15)**
* **Bengali** (`bn`) — West Bengal, Tripura
* **Gujarati** (`gu`) — Gujarat
* **Hindi** (`hi`) — Central & Northern India
* **Kannada** (`kn`) — Karnataka
* **Konkani** (`gom`) — Goa, Maharashtra, Karnataka
* **Maithili** (`mai`) — Bihar, Jharkhand
* **Malayalam** (`ml`) — Kerala
* **Marathi** (`mr`) — Maharashtra
* **Nepali** (`ne`) — Sikkim, West Bengal
* **Odia** (`or`) — Odisha
* **Punjabi** (`pa`) — Punjab
* **Sanskrit** (`sa`) — Pan-India
* **Tamil** (`ta`) — Tamil Nadu
* **Telugu** (`te`) — Andhra Pradesh, Telangana
* **Urdu** (`ur`) — Pan-India

#### **Regional Dialects & Literary Varieties (6)**
* **Awadhi** (`awa`) — Uttar Pradesh
* **Bhojpuri** (`bho`) — Bihar, Uttar Pradesh
* **Chhattisgarhi** (`hne`) — Chhattisgarh
* **Garhwali** (`gbm`) — Uttarakhand
* **Haryanvi** (`bgc`) — Haryana
* **Marwari** (`mwr`) — Rajasthan

#### **Associate Official Language (1)**
* **English** (`en`) — India-wide

---

### 2. `Indic-Sentiment` (Sentiment Analysis — 12 Languages)
* **Assamese** (`as`), **Bengali** (`bn`), **Gujarati** (`gu`), **Hindi** (`hi`), **Kannada** (`kn`), **Malayalam** (`ml`), **Marathi** (`mr`), **Odia** (`or`), **Punjabi** (`pa`), **Tamil** (`ta`), **Telugu** (`te`), **Urdu** (`ur`).

---

### 3. `Indic-Topic` (News & Headline Categorization — 6 Languages)
* **Gujarati** (`gu`), **Hindi** (`hi`), **Malayalam** (`ml`), **Marathi** (`mr`), **Tamil** (`ta`), **Telugu** (`te`).
* **Categories (6):** `entertainment`, `business`, `tech`, `sports`, `state`, `spirituality`.

---

## Benchmark Evaluation

Evaluated on standardized held-out test splits:

| Model | Task / Coverage | Test Set Size | Accuracy | Macro F1 | Joblib Size | ONNX Size | Latency / Item |
|---|---|---|---|---|---|---|---|
| **Indic-LID** | Language ID (28 languages) | 27,312 | **99.53%** | **99.54%** | 10.83 MB | **4.27 MB** | **0.155 ms** |
| **Indic-Sentiment** | Sentiment (12 languages) | 10,129 | **75.84%** | **75.84%** | 1.64 MB | **0.19 MB** | **0.164 ms** |
| **Indic-Topic** | Topic (6 categories) | 3,244 | **90.23%** | **89.35%** | 3.41 MB | **1.03 MB** | **0.135 ms** |

---

## Quickstart

### Installation
```bash
pip install joblib onnxruntime scikit-learn
```

### 1. Python Usage
```python
import joblib

# Load models
lid = joblib.load("indic_lid_model.joblib")['model']
sentiment = joblib.load("indic_sentiment_model.joblib")['model']
topic = joblib.load("indic_topic_model.joblib")['model']

# Language Detection (28 languages including Northeast)
print(lid.predict(["Chibai, eng nge i an?"]))   # ['lus'] (Mizo)
print(lid.predict(["Khublei shibun!"]))        # ['kha'] (Khasi)
print(lid.predict(["வணக்கம் நண்பா"]))          # ['ta'] (Tamil)

# Sentiment Analysis
sent = sentiment.predict(["यह उत्पाद बहुत ही शानदार है!"])[0]
print("Sentiment:", "Positive" if sent == 1 else "Negative")

# News Topic Classification
top = topic.predict(["विराट कोहलीने झळकावले शतक"])[0]
print("Topic:", top)  # 'sports'
```

### 2. ONNX Runtime
Every model has a matching `.onnx` checkpoint inside `onnx/` allowing execution across platforms (C++, Python, Go, Rust, mobile):
- `onnx/indic_lid.onnx` (4.27 MB)
- `onnx/indic_sentiment.onnx` (0.19 MB)
- `onnx/indic_topic.onnx` (1.03 MB)

---

## Provenance
- **Indic-LID**: Sourced from `google/IndicGenBench_flores_in`, `robzchhangte/mizo-corpus-passages`, and `damerajee/khasi-datasets`.
- **Indic-Sentiment**: Sourced from `mteb/IndicSentiment` and IIT Patna reviews (`ai4bharat/indic_glue`).
- **Indic-Topic**: Sourced from India Today Regional News (`inltkh.*`) and BBC Hindi (`bbca.hi`).

## License
Creative Commons Attribution 4.0 International (**CC-BY-4.0**).