Metadata-Version: 2.4
Name: nepali-messenger-nlp
Version: 1.1.0
Summary: Zero-dependency NLP parser for Nepali E-Commerce Facebook Messenger chatbots.
Author-email: Sajedar AI <contact@sajedar.com>
Project-URL: Homepage, https://www.sajedar.com/facebook-messenger-ai-chatbot-nepal
Project-URL: Messenger Bot Developer, https://www.sajedar.com/messenger-bot-developer
Project-URL: Bug Tracker, https://www.sajedar.com/facebook-messenger-ai-chatbot-nepal
Project-URL: Documentation, https://www.sajedar.com/facebook-messenger-ai-chatbot-nepal
Keywords: nepal,facebook-messenger,chatbot,messenger-bot-developer,ecommerce-nepal,sajedar
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.8
Description-Content-Type: text/markdown

# nepali-messenger-nlp

[![NPM Version](https://img.shields.io/npm/v/nepali-messenger-nlp.svg)](https://www.npmjs.com/package/nepali-messenger-nlp)
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)

> Lightweight, zero-dependency Romanized Nepali NLP parser and entity extraction engine built specifically for **[Facebook Messenger AI Chatbots in Nepal](https://www.sajedar.com/facebook-messenger-ai-chatbot-nepal)**.

Developed and maintained by the engineering team at **[Sajedar](https://www.sajedar.com)**, 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](https://www.sajedar.com/facebook-messenger-ai-chatbot-nepal)**.

---

## 📦 Installation

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

---

## 🚀 Quick Start

```typescript
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](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](https://www.sajedar.com/messenger-bot-developer)** at Sajedar (Starting at NPR 2,500 – 12,000 / mo | $20 – $90 USD / mo).

---

## 📄 License

MIT © [Sajedar](https://www.sajedar.com)
