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

@lokal-id/ner

v0.18.3

Published

Lokal's local NER model for Indonesian person names in chat, tickets, and documents: adds names Samaran's rules do not know. Runs on the CPU in WebAssembly; the text never leaves the machine.

Readme

@lokal-id/ner

Finds Indonesian people's names that nothing announces, for Samaran: no "Nama:", no "a.n.", no "Bapak", just a name in a sentence.

saya di chat sama rianto surya tadi pagi        → saya di chat sama [NAME_1] tadi pagi
ada yang ngeliat minan minanto ga ya            → ada yang ngeliat [NAME_2] ga ya

It runs Lokal's own model, IndoBERT-base fine-tuned for person names, on the CPU in WebAssembly (onnxruntime-web: no native binaries, no install scripts). The text never leaves the machine.

npm install @lokal-id/core @lokal-id/ner
import { Samaran } from '@lokal-id/core';
import { NerNames } from '@lokal-id/ner';

const ner = await NerNames.load(); // the first time: downloads the model (125 MB) and checks its SHA-256
const samaran = new Samaran();

const text = 'saya di chat sama rianto surya tadi pagi, NIK 3201011508950001';
const { text: masked } = samaran.mask(text, await ner.find(text));
// → 'saya di chat sama [NAME_1] tadi pagi, NIK [NIK_1]'

ner.find(text) returns NAME matches with offsets into the text. Pass them to samaran.mask, samaran.scan, or detectPii(text, { extra }): Samaran's own matches win where they overlap.

Options

await NerNames.load({
  modelPath: './models/lokal-ner-base-v1', // a folder with model.onnx, tokenizer.json, config.json: offline use
  minScore: 0.7,                           // the model's confidence below which a name is dropped
  threads: 2,                              // default: half the CPUs, at most 4
  download: false,                         // fail instead of downloading when the model is not cached
});

The model is cached in LOKAL_NER_DIR, or ~/.cache/lokal-id/ner (%LOCALAPPDATA%\lokal-id\ner on Windows). downloadModel(dir) fetches it ahead of time, for a container image or a machine without internet later.

MCP server and proxy

With "ner": true in .samaran.json, read_file_masked, scan_pii (at min_confidence: "medium"), and Samaran Proxy add the model's names. Install the package next to the server:

npx -y -p @lokal-id/mcp -p @lokal-id/ner lokal-mcp

The guard hook stays rules-only: it has to answer in milliseconds.

How good is it

On held-out test data, rules and model together: 98.9% of names in chat (19.4% rules alone), 98.8% in Samaran's benchmark (93.6% rules alone), 93.4% of people in news, with no false positives in the test corpora. See MODEL.md for the data, the results, and the limits.

In Python, the same model is lokal.samaran.ner.NerNames() (pip install "lokal-id[ner-lokal]"), sharing this cache folder; it also offers two larger models from their authors.

License

MIT. The model is MIT too; see MODEL.md for what it was trained on and credits.