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.


👨‍💻 Need a Custom Messenger Bot Developer?

If you require custom Meta Graph API webhooks, computer vision OCR payment verification, or bespoke conversational sales logic:
👉 Hire an Expert Messenger Bot Developer at Sajedar (Starting at NPR 2,500 – 12,000 / mo | $20 – $90 USD / mo).


📄 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.1.0.tar.gz (4.1 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.1.0-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: nepali_messenger_nlp-1.1.0.tar.gz
  • Upload date:
  • Size: 4.1 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.1.0.tar.gz
Algorithm Hash digest
SHA256 ed66aeae581641e19484d6dded974af0ce05e1e6d342cf187ddf2ec0b466d933
MD5 6cb727358a7b17c4d6990c12a41dfebc
BLAKE2b-256 5265e1c5616947070f8eb364a42771af16d90dca791cf089700ac8f958eef0b1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nepali_messenger_nlp-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7d5b2bafb7630dc25d0fcca25b15e0e34372488e0f4b866b722c44e25c47d60a
MD5 0ef2e1e83fd6815c157dd87532209eeb
BLAKE2b-256 90b11b2662cc6268502c9754bbba71dfda68751e30439a282cdc704ccaa6515b

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.1.0 This release

2 files

1.0.0

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