Skip to main content

nepali-messenger-nlp

NPM Version License: MIT

Lightweight, zero-dependency Romanized Nepali NLP parser and entity extraction engine built specifically for Facebook Messenger AI Chatbots in Nepal.

Developed and maintained by the engineering team at Sajedar, powering automated 24/7 conversational sales for Nepali e-commerce pages on Meta Messenger.


🌟 Why nepali-messenger-nlp?

Nepali e-commerce on Facebook Messenger operates predominantly in Romanized colloquial Nepali mixed with English ("Kathmandu ma delivery kati parcha?", "cod huncha ki advance halna parcha?", "mero size L ho"). Traditional NLP pipelines fail on these phrases because of informal spelling variations, lack of standard orthography, and regional slang.

This library provides deterministic, ultra-fast (<2ms) parsing for:

  • 💰 Pricing & Rate queries ("kati parcha", "rate k ho", "price plx")
  • 📍 Kathmandu Valley Delivery Locations (Classifying Inside Ring Road vs. Outside Ring Road vs. Out of Valley)
  • 📱 Nepali Mobile Number Sanitization (Detecting NTC 984/985/986, Ncell 980/981/982, SmartCell 988/961, stripping +977, spaces, hyphens)
  • 👕 Apparel Size & Color Extraction (S, M, L, XL, XXL, Free Size, Rato, Kalo, Seto, etc.)
  • 💳 Cash on Delivery & Advance Payment Intent (Detecting Rs. 100 advance deposit intent to slash COD cancellations from 35% to <10%)
  • 📸 Payment Screenshot Detection Intent (Flagging when a buyer announces they sent an eSewa/Fonepay screenshot)

For enterprise-grade conversational AI with 2-second live latency, human supervisor handoff, and direct order catalog sync, check out the full Facebook Messenger AI Chatbot Nepal Solution by Sajedar.


📦 Installation

npm install nepali-messenger-nlp
# or
yarn add nepali-messenger-nlp

🚀 Quick Start

import { 
  parseNepaliIntent, 
  classifyNepalLocation, 
  extractNepalPhoneNumber,
  detectAdvancePaymentIntent 
} from 'nepali-messenger-nlp';

// 1. Parse Romanized Nepali customer intent
const intent = parseNepaliIntent("Dai yo jacket ko price kati ho? New Road ma delivery huncha?");
console.log(intent);
// Output:
// {
//   category: 'PRICE_INQUIRY',
//   confidence: 0.98,
//   extractedEntities: {
//     item: 'jacket',
//     location: 'New Road'
//   }
// }

// 2. Classify Delivery Logistics (Inside vs Outside Ring Road)
const locationInfo = classifyNepalLocation("Mero ghar Baneshwor Shankhamul tira ho");
console.log(locationInfo);
// Output:
// {
//   isInsideRingRoad: true,
//   hub: 'Kathmandu Central',
//   suggestedCourierRate: 100
// }

// 3. Clean and validate Nepali phone numbers
const phone = extractNepalPhoneNumber("Contact no: 984-1234567 call me");
console.log(phone);
// Output: "9841234567" (Carrier: NTC Mobile, Valid: true)

// 4. Advance COD confirmation intent
const isAdvance = detectAdvancePaymentIntent("Maile 100 advance pathaye screenshot hernus ta");
console.log(isAdvance);
// Output: { hasAdvanceIntent: true, hasScreenshotProof: true }

🏛️ Official Commercial Solution

Looking for a fully managed, turn-key AI chatbot with a dedicated human technical supervisor for your Nepali Facebook store?

Visit https://www.sajedar.com/facebook-messenger-ai-chatbot-nepal to test the interactive live simulator and get onboarded in under 48 hours.


📄 License

MIT © Sajedar

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nepali_messenger_nlp-1.0.0.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nepali_messenger_nlp-1.0.0-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

Details for the file nepali_messenger_nlp-1.0.0.tar.gz.

File metadata

  • Download URL: nepali_messenger_nlp-1.0.0.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.3

File hashes

Hashes for nepali_messenger_nlp-1.0.0.tar.gz
Algorithm Hash digest
SHA256 523413dc4ecaf2dca116c11b88d48194308fa50392b9e56e7056420caadfcc8a
MD5 4e092915bc1bfd146018659f5d68bff8
BLAKE2b-256 ffbe9060059d0cc4c1f1c7c065cb4e15764ec4a43326400a8baddf3e3853ef86

See more details on using hashes here.

File details

Details for the file nepali_messenger_nlp-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for nepali_messenger_nlp-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 faadd494a0882a4c3e9cc8813ab5be2a6c0bac7cf425a17c0130745861be3f02
MD5 ab4ffce10fe2c79dd3adecfeb74ded91
BLAKE2b-256 8a5bfa3b560ae53a29af1ef04927822903022fefe7d30172b8b8b9e07f20a8b2

See more details on using hashes here.

Release history Release notifications | RSS feed

1.1.0

2 files

This release

1.0.0 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page