hinglishswd
A Python library for Hinglish (Hindi+English code-mixed) NLP.
Features
- Language detection — English / Hindi (Devanagari) / Hinglish (Latin-script Hindi)
- Tokenization — Punctuation-aware splitting for Hinglish, spaCy-based for Devanagari Hindi
- Transliteration — Hinglish → Hindi Devanagari (via
indic-transliteration) - Translation — Hinglish/Hindi → English (via
deep-translatorGoogle Translate) - Stop word removal — Built-in Hindi + Hinglish stop word lists
- Pipeline API — Single-call for full processing
Installation
pip install hinglishswd
Quick Start
from hinglishswd import HinglishNLP
nlp = HinglishNLP()
# Language detection
nlp.detect("kal mai khaana khane gaya") # "hinglish"
nlp.detect("Hello, how are you?") # "english"
nlp.detect("आज मौसम बहुत अच्छा है") # "hindi"
# Tokenization
nlp.tokenize("kal mai khaana khane gaya") # ['kal', 'mai', 'khaana', 'khane', 'gaya']
# Transliteration (Hinglish -> Devanagari)
nlp.transliterate("kal mai khaana khane gaya") # कल मै खान खने गय
# Translation (Hinglish -> English)
nlp.translate("kal mai khaana khane gaya") # "I went to eat yesterday"
# Full pipeline
result = nlp.pipeline("aaj mausam bahut acha hai")
# {
# "text": "aaj mausam bahut acha hai",
# "language": "hinglish",
# "tokens": ["aaj", "mausam", "bahut", "acha", "hai"],
# "tokens_no_stopwords": ["aaj", "mausam", "acha"],
# "devanagari": "आज मौसम बहुत अच्छा है",
# "english": "the weather is very good today"
# }
Module-level API
from hinglishswd import (
detect_language,
tokenize, tokenize_sentences,
transliterate, hinglish_to_devanagari,
to_english, hinglish_to_english, translate_pipeline,
remove_stopwords,
)
lang = detect_language("Aap kahan ho?")
tokens = tokenize("Mujhe paani chahiye")
dev = hinglish_to_devanagari("mera naam rahul hai")
en = hinglish_to_english("aaj kya kar rahe ho?")
Package Structure
hinglishswd/
├── __init__.py
├── core.py # HinglishNLP class (main API)
├── detect.py # Language detection
├── tokenize.py # Tokenization
├── transliterate.py # Script conversion (Indic-transliteration)
├── translate.py # Translation (deep-translator)
└── stopwords.py # Hindi + Hinglish stop words
Dependencies
indic-transliteration— Hinglish ↔ Devanagari transliterationdeep-translator— Google Translate-based translation (optional, for.translate())
License
Modified MIT License — see LICENSE. Large-scale commercial users (>100M MAU or >$20M/month revenue) must display "hinglishswd" in their UI.
Metadata
Release files for hinglishswd 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| hinglishswd-0.1.3.tar.gz | 7.2 kB | Without provenance | Details for hinglishswd-0.1.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| hinglishswd-0.1.3-py3-none-any.whl | Python 3 | none | any | Details for hinglishswd-0.1.3-py3-none-any.whl |
Total release size: 15.6 kB
Release files / hinglishswd-0.1.3.tar.gz
| Download URL | hinglishswd-0.1.3.tar.gz |
|---|---|
| Size | 7.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
12fb360d559468b750cc09ed52273b3c193362939888394fb9bcc4a18156168c
|
|
BLAKE2b-256 checksum How to use checksums |
9454997124fc7dcad575349f164b9bd1ddc6ac44518b6710576f08544518ca7c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Release files / hinglishswd-0.1.3-py3-none-any.whl
| Download URL | hinglishswd-0.1.3-py3-none-any.whl |
|---|---|
| Size | 8.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8b26c885df7f27d6bd86addf1061065a7d4e4e43daf0f55c5b9a0e5e3e7269bc
|
|
BLAKE2b-256 checksum How to use checksums |
76be7f28fc065123b74663452c5dba81d0c442bc5c950f6637080f18ad5d94c7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Security for hinglishswd 0.1.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.