npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

urdu-business-nlu

v0.1.0

Published

Deterministic TypeScript library: informal Urdu / Roman-Urdu business messages to validated structured records. Rules-only v0 (M3 GO); no production accuracy claim outside eval reports.

Readme

urdu-business-nlu

M3 GO — rules-only v0. TypeScript library: normalisers, rules-only propose/extract, deterministic validator and router. Silent-error focus (prefer confirm over a wrong quantity/amount). Optional LLM is BYOK and later. Contact: [email protected]

Abstract diagram: messy text through a validator gate to auto / confirm / reject

Abstract diagram only — not a product screenshot. No WhatsApp/Meta branding.

propose → validate → route architecture

Hosting (what this is)

This is an npm/TypeScript library + eval set, not a hosted SaaS. Source lives on GitHub; when the package is published, consumers install it with npm. There is no Railway/app hosting for the core product, and no always-on API in v0. An optional hosted API remains a possible later add-on and is out of scope for this release.

CI (pending): GitHub Actions is not on main yet — the token lacked the workflow OAuth scope, so the workflow is parked at .github/ci.yml.pending. Branch/tag rulesets are already applied. After gh auth refresh -h github.com -s workflow, restore the file to .github/workflows/ci.yml and push.

What this is

An open-source (MIT) TypeScript library plus an in-repo synthetic eval set (public dataset licence CC-BY-4.0 when/if published separately — not legal advice; gold is in eval/gold/** today, not a separate data release) that turns informal Urdu, Roman-Urdu and mixed-English business messages (orders, payments, credit/udhaar, delivery) into validated structured records. A deterministic validator checks every number, unit and date; anything uncertain goes to human confirmation.

Not in scope for v0: WhatsApp bot, Meta Business API, ledger storage, payments, ASR, or a hosted API.

Source of truth: PROJECT_CONTEXT.md · docs/SPEC.md · docs/DATA_AND_PRIVACY.md · docs/BUILD_PLAN.md

Status (honest)

| Item | State | |---|---| | Hypothesis | Unvalidated — builders may lack an open, tested Urdu/Roman-Urdu business-message parser + eval | | Library | M3 GO rules-only v0 — src/ normalisers + propose/extract + validateRecord + route | | npm publish | [email protected] on npm | | Eval decision | M3 go/no-go · gold baseline — cite reports; no marketing accuracy % | | Spikes | N1 · N3 · N4; N2 LLM/hybrid arms deferred (no key) | | Gold | 101 owner_confirmed in eval/gold/; synthetic placeholders only | | LLM | Optional BYOK adapter — later (M4 deferred) | | CI | Live — .github/workflows/ci.yml on pull_request |

Install

npm i urdu-business-nlu

Requires Node >= 18. From source (develop / contribute):

# From GitHub
npm install github:arsalan-arshad/urdu-business-nlu

# Local clone
git clone https://github.com/arsalan-arshad/urdu-business-nlu.git
cd urdu-business-nlu
npm install
npm test
npm run build

More detail: docs/USAGE.md.

Usage (rules-only, offline)

Public exports match src/index.ts: propose, extract, validateRecord, route, plus normalisers. Rules-only path needs no network and no API keys.

import { propose, extract, validateRecord, route } from "urdu-business-nlu";

// Rules-only: text → candidate (already validated + routed)
const record = propose("PARTY_A ko 5 carton oil bhej do");
// record.route === "auto" | "confirm" | "reject"

// extract is the same function until an optional LLM adapter (later)
const same = extract("PARTY_A ko 5 carton oil bhej do");

// Or validate a candidate yourself:
const { issues } = validateRecord(record, "PARTY_A ko 5 carton oil bhej do");
route(issues);

Every number in a candidate must be traceable (after normalisation / number-word parse) to the input. Ungrounded qty/amount → reject. Ambiguous kal, missing currency/direction, etc. → confirm.

Contract and eval evidence (cite reports; no marketing accuracy %): docs/SPEC.md · M3 go/no-go · gold baseline.

Synthetic example input to confirm route

Architecture

Message → propose (rules-only now; optional LLM later, BYOK) → deterministic validator → auto | confirm | reject.

flowchart LR
  M["Message text"] --> P["Propose candidate"]
  P --> V["Deterministic validator"]
  V -->|ok| A["auto"]
  V -->|uncertain| C["confirm"]
  V -->|invalid| R["reject"]

Data & privacy

Synthetic or explicitly consented, anonymised samples only. No scraping, no real chats in the repo. Draft contributor consent lives in the N4 spike (not legal advice). Code is MIT. Eval data intended CC-BY-4.0 when/if published as a separate dataset — not published separately yet; gold remains in this repo. See docs/DATA_AND_PRIVACY.md.

Contributing / security / licence

See CONTRIBUTING.md, CODE_OF_CONDUCT.md, SECURITY.md, LICENSE (MIT).