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

@mailwoman/core

v9.2.0

Published

Mailwoman core: tokenization, decoder, formatter, resources, filters, utils.

Readme

@mailwoman/core

The foundation of the Mailwoman address parser — types, tokenization, classification primitives, solver, decoder, and the staged pipeline coordinator. Ships ~9 MB of provenance-tracked reference dictionaries (libpostal, Who's On First, chromium-i18n) consumed by the resolver and classifiers.

import { createRuntimePipeline, AddressParser, ComponentTag, Classification, Span } from "@mailwoman/core"

const pipeline = createRuntimePipeline({ locale: "en-US" })
const result = pipeline.parse("1600 Amphitheatre Parkway, Mountain View, CA 94043")

What's inside

| Module | Purpose | | --------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | | types/ | Core type system: ComponentTag, Span, Classification, ClassificationMap, LocaleTag | | tokenization/ | Tokenizer primitives, whitespace/punctuation rules, token classification | | classification/ | Classification data structure, ClassificationMap, span overlap resolution | | decoder/ | Span proposal → tree projection, BIO decoding, reconcile/merge strategies, confidence calibration | | pipeline/ | createRuntimePipeline — the staged pipeline coordinator that wires normalize → query-shape → locale-gate → ... → classifier → decoder | | solver/ | Rule-based solver (the v0 rules engine), Solution, Solver | | parser/ | AddressParser — high-level parse entry point (consumed by mailwoman CLI) | | resources/ | ~9 MB of shipped reference data: libpostal dictionaries, WOF place data, chromium-i18n address formats |

Key exports

// Types
export type { ComponentTag, Span, Classification, ClassificationMap, LocaleTag }

// Pipeline
export { createRuntimePipeline, type RuntimePipeline, type PipelineOpts }

// Classification
export { Classification, ClassificationMap }
export { treeToClassification, classificationToTree }

// Decoder
export { decodeBioSpans, viterbiDecode, reconcileSpans }
export { createCalibrator, type Calibrator } // isotonic confidence calibration

// Solver (v0 rules)
export { Solver, Solution }

// Tokenization
export { tokenize, Token, TokenClass }

// Resources
export { loadDictionary, getAvailableLanguages }

Pipeline architecture

Mailwoman's runtime pipeline is a staged coordinator that chains pure-function stages with typed handoffs:

normalize → query-shape → locale-gate → kind-classifier → phrase-grouper → classifier → decoder

Each stage is published as its own @mailwoman/* package and wired together by the pipeline coordinator in this package. The design ensures every stage is independently testable, benchmarkable, and replaceable.

Reference data

This package ships immutable, provenance-tracked dictionaries consumed by the resolver and rule-based classifiers:

  • libpostal — multilingual street types, place names, directional/ordinal tokens
  • Who's On First — place hierarchy and geography
  • chromium-i18n — per-country address format templates

The dictionaries are ~9 MB total and are loaded lazily.

Related

License

AGPL-3.0-only