File size: 4,309 Bytes
373a364
b7e2173
 
 
373a364
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
281033d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
ef6d0b8
 
 
 
 
 
 
 
309fc6d
 
 
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
166
167
168
169
170
171
172
173
174
175
176
---
license: apache-2.0
datasets:
- Supernova11c/Supernova-teraillm
language:
- ne
---

# Supernova Nepali Normalizer V2

**Supernova Nepali Normalizer V2** is an independent, lightweight,
rule-based text normalization system designed for Nepali and
Nepali-English mixed text.

## Features

- Unicode NFC normalization
- Zero-width character cleanup
- Whitespace normalization
- Newline normalization
- Tab normalization
- Punctuation normalization
- Nepali + English mixed-text preservation
- URL and email preservation
- Emoji preservation
- Very fast CPU processing

## Validation

The normalizer was validated on **9,112 text samples**
containing approximately **936K characters**.

Validation results:

- UTF-8 failures: 0
- NFC failures: 0
- Empty outputs: 0
- Stress tests: 17/17 passed
- Processing speed: approximately 12,490 samples/sec
  in the development environment

## Architecture

V2 is a deterministic normalization system.

It does not use neural model weights and does not perform
context-based spelling correction.

## Intended Use

V2 can be used as:

- A Nepali NLP preprocessing layer
- A data-cleaning component
- A preprocessing stage before tokenization
- A preprocessing stage before model inference
- A safety layer around learned normalizers

## Relationship to V3

V2 is an **independent model/component**.

It is not the same model as Supernova Nepali Normalizer V3.

V2 can optionally be used before or after V3 as a deterministic
normalization and safety layer.

## License

Apache-2.0
How to Use

##Supernova Nepali Normalizer V2 is a lightweight deterministic Nepali text normalization tool.

It is designed to clean common Unicode and punctuation inconsistencies in Nepali text.

Installation

Clone the repository:

git clone https://huggingface.co/Supernova11c/Supernova-Nepali-Normalizer-V2
cd Supernova-Nepali-Normalizer-V2

Python Usage

from normalizer import SupernovaNepaliNormalizer

normalizer = SupernovaNepaliNormalizer()

text = "कृपया कृपय\u200cा मलाई गणितमा कमजोर छु।"

result = normalizer.normalize(text)

print(result)

Example:

कृपया कृपया मलाई गणितमा कमजोर छु।

What V2 Does

Supernova Nepali Normalizer V2 currently provides deterministic normalization for:

- Zero-width characters
- Unicode inconsistencies
- Common punctuation variants
- Nepali text cleanup

For example:

\u200c
\u200d

can be removed when they occur in unwanted positions.

Common punctuation variants are also normalized:

— → -
– → -
“ → "
” → "
‘ → '
’ → '

No Neural Model Required

V2 does not require:

- GPU
- Transformers
- PyTorch
- Fine-tuned weights
- External APIs
- Internet connection during inference

It runs locally using deterministic rules.

Example

from normalizer import SupernovaNepaliNormalizer

normalizer = SupernovaNepaliNormalizer()

examples = [
    "मलाई  नेपाली  राम्रोसँग  लेख्न सिक्नुछ।",
    "कृपया कृपय\u200cा मलाई गणितमा कमजोर छु।",
    "यो एउटा—परीक्षण वाक्य हो।"
]

for text in examples:
    print("Input :", text)
    print("Output:", normalizer.normalize(text))
    print()

Design Philosophy

Supernova V2 is intentionally simple and predictable.

The normalizer performs only the transformations explicitly defined by its rules. It does not generate new text or make neural predictions.

This makes V2 suitable as a preprocessing component before other NLP systems.

License

See the repository license and project files for licensing information.
## ⚡ Performance & CPU Benchmarks

Supernova text processing architecture is engineered for extreme, zero-overhead systems efficiency. Running entirely on standard CPU hardware without any GPU acceleration or heavy vector models, it delivers elite-tier throughput:

* **Language Detection & Processing:** 1,237,070,359+ characters/sec
* **Hardware Requirement:** Standard CPU (Zero GPU dependency, ultra-low memory footprint)
* **Architecture:** Modular, deterministic, and hallucination-free text pipeline.

* **Test Environment:** Google Colab Free Tier (Standard Shared CPU Runtime)