bengali-nlp
यह क्या करती है
यह टूल बंगाली (बांग्ला) text को प्रोसेस करने में मदद करता है। यह सुनिश्चित करता है कि text सही तरीके से दिखे और सेव हो, शब्दों को अलग करता है, और बंगाली भाषा के खास अंकों और अक्षरों को संभालता है।
कब इस्तेमाल करें
- ✓जब आपके पास बंगाली text का विश्लेषण करना हो।
- ✓जब बंगाली बोलने वाले लोगों के लिए ऐप बना रहे हों।
- ✓जब बंगाली शैक्षिक सामग्री पर काम कर रहे हों।
Skill का लिंक
https://github.com/affaan-m/ECC/blob/main/pi/core/skills/bengali-nlp/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“कृपया मेरे लिए यह बंगाली text प्रोसेस करो: 'আমি বাংলায় গান গাই।'”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
टूल बंगाली अक्षरों को व्यवस्थित करने के लिए खास नियमों का इस्तेमाल करता है, शब्दों को सही तरह से अलग करता है और बंगाली अंकों को संभालता है। यह यह भी पक्का करता है कि text एक मानक रूप में हो ताकि दिक्कतें न आएं।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
Bengali (Bangla) NLP Patterns
Best practices for processing, storing, and displaying Bengali text in software applications and AI systems.
When to Activate
- Working with Bengali/Bangla text data
- Building apps targeting Bengali-speaking users
- Processing NCTB (National Curriculum and Textbook Board) educational content
- Implementing Bengali search, autocomplete, or text input
- Training or fine-tuning LLMs on Bengali data
- Building Bengali chatbots or conversational AI
- Handling mixed Bengali-English (Banglish) text
Bengali Unicode and Script Handling
Unicode Range
Bengali script occupies U+0980–U+09FF. Key character classes:
U+0981–U+0983 Chandrabindu, Anusvara, Visarga
U+0985–U+0994 Independent vowels (অ আ ই ঈ উ ঊ ঋ ঌ এ ঐ ও ঔ)
U+0995–U+09B0 Consonants (ক–র)
U+09B2 ল
U+09B6–U+09B9 শ ষ স হ
U+09DC, U+09DD, U+09DF Additional consonants (ড়, ঢ়, য়)
U+09BC Nukta
U+09BE–U+09C8 Dependent vowel signs (কার): া ি ী ু ূ ৃ ে ৈ
U+09CB–U+09CC Dependent vowel signs: ো ৌ
U+09CD Hasanta (virama) — forms conjuncts
U+09CE Khanda Ta (ৎ)
U+09D7 AU length mark
U+09E0–U+09E3 Extended vowels
U+09E6–U+09EF Bengali digits: ০১২৩৪৫৬৭৮৯
U+09F0–U+09F1 Assamese letters: ৰ (ra with middle diagonal), ৱ (ra with lower diagonal)
U+09F2–U+09F3 Rupee mark ৲ and rupee sign ৳
U+09F4–U+09F9 Historic currency numerators ৴ ৵ ৶ ৷ ৸ and denominator ৹
U+09FA Isshar ৺
Normalization
Always normalize Bengali text to NFC before comparison, storage, or search:
import unicodedata
def normalize_bangla(text: str) -> str:
"""Normalize Bengali text to NFC form."""
return unicodedata.normalize("NFC", text)
# NFC composes characters: base + combining marks -> precomposed
text_nfd = "ক\u09C7\u09BE" # decomposed form of "কো"
text_nfc = normalize_bangla(text_nfd)
assert text_nfc == "কো"
assert text_nfc == normalize_bangla(text_nfc) # idempotent
// JavaScript
function normalizeBangla(text) {
return text.normalize('NFC');
}
Conjunct Consonants (যুক্তবর্ণ)
Bengali conjuncts are formed with Hasanta (্) between consonants:
ক + ্ + ষ = ক্ষ (ksha)
স + ্ + ত = স্ত (sta)
ন + ্ + ত + ্ + র = ন্ত্র (ntra)
Never split strings in the middle of a conjunct. Use grapheme cluster boundaries:
import regex # pip install regex
def grapheme_length(text: str) -> int:
"""Count user-perceived characters (grapheme clusters)."""
return len(regex.findall(r"\X", text))
# "ক্ষ" is 1 grapheme but 3 code points (ক + ্ + ষ)
assert grapheme_length("ক্ষ") == 1
assert len("ক্ষ") == 3 # code point count — wrong for display
// JavaScript — use Intl.Segmenter for grapheme-safe operations
function graphemeLength(text) {
const segmenter = new Intl.Segmenter('bn', { granularity: 'grapheme' });
return [...segmenter.segment(text)].length;
}
Bengali Digits
Handle both Bengali (০-৯) and ASCII (0-9) digits:
BANGLA_DIGITS = "০১২৩৪৫৬৭৮৯"
ASCII_DIGITS = "0123456789"
def bangla_to_ascii_digits(text: str) -> str:
table = str.maketrans(BANGLA_DIGITS, ASCII_DIGITS)
return text.translate(table)
def ascii_to_bangla_digits(text: str) -> str:
table = str.maketrans(ASCII_DIGITS, BANGLA_DIGITS)
return text.translate(table)
Tokenization
Word Boundary Detection
Bengali uses spaces between words, but compound words and postpositions can complicate tokenization:
import re
def tokenize_bangla(text: str) -> list[str]:
"""Basic Bengali tokenizer — split on whitespace and punctuation."""
# Remove Bengali and ASCII punctuation, but preserve decimal points
text = re.sub(r'(?<!\d)\.|\.(?!\d)|[।,;:!?\-\'"()\[\]{}]', ' ', text)
return [token for token in text.split() if token]
# For production, use a trained tokenizer:
# - bnlp (pip install bnlp_toolkit)
# - stanza with Bengali model
# - spaCy with Bengali pipeline
Using bnlp Toolkit
from bnlp import NLTKTokenizer
tokenizer = NLTKTokenizer()
tokens = tokenizer.word_tokenize("আমি বাংলায় গান গাই।")
# ['আমি', 'বাংলায়', 'গান', 'গাই', '।']
Handling Postpositions and Case Markers
Bengali postpositions attach to nouns. Tokenizers should be aware of common suffixes:
-এর (possessive), -তে (locative), -কে (accusative)
-র (possessive after vowel), -য় (locative variant)
Text Processing Patterns
Script Detection
import re
def is_bangla(text: str) -> bool:
…
अक्सर पूछे जाने वाले सवाल
text normalization क्या है?
normalization का मतलब है बंगाली text को एक समान रूप में लाना, यानी ऐसे अक्षरों को जोड़ना जो अलग तरह से लिखे गए हों पर उनका मतलब एक ही हो।
'conjuncts' क्या हैं?
conjuncts वे बंगाली अक्षर हैं जो मिलकर एक ही ध्वनि या अक्षर बनाते हैं, जैसे 'ক্ষ'। टूल पक्का करता है कि इन अक्षरों को एक इकाई माना जाए।
मुझे बंगाली अंकों की चिंता क्यों करनी चाहिए?
बंगाली के अपने अंक होते हैं (০১২৩৪৫৬৭৮৯)। यह टूल इन अंकों को हम आम तौर पर इस्तेमाल होने वाले अंकों (0-9) में बदल सकता है, और ज़रूरत पड़ने पर वापस भी।
जानकारी
लेखक का मूल विवरण
Bengali (Bangla) text processing patterns including Unicode normalization, script detection, tokenization, conjunct handling, and Bangla-specific NLP best practices for AI applications.
repo: affaan-m/ECC
लोकप्रियता
- GitHub स्टार
- 280k
- रैंकिंग में स्थान
- #143
- लाइसेंस
- MIT
- अपडेट की गई
- 15/10/2026
कमेंट
- …
इस repository की और skills
accessibility
280kयह आपके एजेंट को ऐसे इंटरफ़ेस बनाने में मदद करता है जिन्हें हर कोई इस्तेमाल कर सके। यह पक्का करता है कि वेबसाइट और ऐप दिव्यांग लोगों के लिए भी अच्छे से काम करें, जैसे नेत्रहीन या जिन्हें चलने-फिरने में दिक्कत होती है।
agent-architecture-audit
280kयह आपके एजेंट को जाँचने देता है कि सब कुछ सही से चल रहा है। यह AI सिस्टम में समस्याएँ ढूँढकर ठीक करता है, ताकि वे उम्मीद के मुताबिक काम करें।
agent-eval
280kयह आपके एजेंट को अलग-अलग AI coding tools की तुलना करने में मदद करता है। यह मापता है कि किसी खास काम के लिए कौन सा टूल ज़्यादा तेज़, सस्ता और भरोसेमंद है।
agent-harness-construction
280kयह आपके एजेंट को काम कैसे करना है, यह बेहतर समझने में मदद करता है। यह उन tools और instructions को बेहतर बनाता है जिनका एजेंट इस्तेमाल करता है, ताकि उसकी सफलता की संभावना बढ़े।
मिलती-जुलती skills
writing-skills
311kयह आपके एजेंट को नई स्किल लिखना और हर एक को पहले टेस्ट करना सिखाती है, यह जांचते हुए कि स्किल सच में उसका व्यवहार बदलती है।
writing-for-agents
310kAI एजेंट्स के लिए साफ़ निर्देश कैसे लिखें, यह समझाती है, जिसमें स्किल, AGENTS.md और CLAUDE.md फ़ाइलें शामिल हैं, ताकि एजेंट अनुमानित ढंग से व्यवहार करे।
dspy
260kआपके एजेंट को हर प्रॉम्प्ट हाथ से लिखने के बजाय इनपुट और आउटपुट घोषित करके AI प्रोग्राम बनाने में मदद करती है, फिर उदाहरण डेटा से प्रॉम्प्ट सुधारती है।