NepaliKit is a Python library for natural language processing tasks in the Nepali language.
pip install nepalikitfrom nepalikit.tokenization import Tokenizer
from nepalikit.preprocessing import TextProcessor
from nepalikit.manage_stopwords import get_stopwords, remove_stopwords_from_text
# Tokenize text
tokenizer = Tokenizer()
tokens = tokenizer.tokenize("नमस्ते, के छ खबर? यो एउटा वाक्य हो।", level='word')
# Clean text
processor = TextProcessor()
clean = processor.remove_html_tags("<p>नमस्ते</p>")
clean = processor.remove_special_characters(clean)
# Remove stopwords
filtered = remove_stopwords_from_text("म घर जाँदै छु")- Tokenization — Rule-based and SentencePiece tokenizers
- Preprocessing — HTML removal, special character cleaning, whitespace normalization
- Stopword Management — 340+ curated Nepali stopwords with dynamic add/remove
- Stemming — Rule-based suffix stripping
- Normalization — Unicode NFC normalization, ZWNJ/ZWJ stripping, script detection
- POS Tagging — Dictionary-based tagger with 11 grammatical categories
- Spell Checking — Dictionary-based with Levenshtein edit distance suggestions
- Transliteration — Roman ↔ Devanagari + Preeti font conversion
- Number Extraction — Parse Devanagari digits and Nepali number words to integers
- Sentence Operations — Sentence segmentation, extraction, and analysis
Full documentation is available at the living website:
- Webpage: prabhashj07.github.io/nepalikit
- Source: docs/
Alternatively, browse the raw documentation files:
This project is licensed under the MIT License.
- Prabhash Kumar Jha
- Email: prabhashj07@gmail.com