Tutorials¶
Hands-on guides for every malaysian-manglish-nlp module - from basic usage to production pipelines.
Each tutorial walks through a single capability with realistic Manglish examples, progressive complexity, and CLI usage. All code runs with zero external dependencies unless noted.
-
Positive / negative / neutral with aspect-based, sarcasm-aware, and batch support.
-
Extract persons, organisations, locations, and Malaysian-specific entities.
-
BM ↔ EN ↔ Manglish with entity preservation and formal output.
-
Expand shortforms, clean noise, formalize, and correct spelling.
-
Detect BM, EN, Manglish, code-switching, and 6 regional dialects.
-
Word2Vec and FastText trained on 10M+ Malaysian texts.
-
Extractive summarization with TextRank and length control.
-
Extractive QA with TF-IDF retrieval and Malaysian context.
-
8 emotion categories with intensity scoring.
-
6 categories, severity levels, and leetspeak evasion handling.
-
Detect switching points, switch ratio, and language segmentation.
-
Chain modules, batch processing, and custom workflows.
-
FastAPI server with all endpoints, batch support, and Docker deployment.
How to Use These Tutorials¶
- Pick a module - each page is self-contained
- Copy the code - all examples are runnable as-is
- Start simple - each tutorial progresses from basic to advanced
- Check the CLI - every module works from the terminal too
Prerequisites
Quick Reference¶
| Tutorial | Module | CLI | Dependency |
|---|---|---|---|
| Sentiment | mnlp.sentiment() |
mnlp sentiment |
Core |
| NER | mnlp.ner_tag() |
mnlp ner |
Core |
| Translation | mnlp.translate() |
mnlp translate |
Core |
| Normalization | mnlp.normalize() |
mnlp normalize |
Core |
| Language Detection | mnlp.detect_language() |
mnlp language |
Core |
| Embeddings | mnlp.word_embeddings |
- | Core |
| Summarization | mnlp.summarize() |
mnlp summarize |
Core |
| QA | mnlp.qa_answer() |
- | Core |
| Emotion | mnlp.detect_emotion() |
- | Core |
| Hate Speech | mnlp.detect_hate_speech() |
- | Core |
| Code-Switching | mnlp.code_switching |
- | Core |
| Pipeline | mnlp.pipeline() |
mnlp analyze |
Core |
| REST API | FastAPI server | uvicorn |
[api] |