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

grobid-js

v0.1.0

Published

Pure JS/WASM port of GROBID — scientific PDF → TEI-XML in Node and the browser, no Docker.

Readme

grobid-js

A pure JS / TypeScript port of GROBID — scientific PDF → TEI-XML extraction in Node and the browser, no Docker, no Java.

Status

  • Wapiti CRF path: ties upstream Java GROBID byte-for-byte on the test corpus.
  • BiLSTM_CRF_FEATURES path (opt-in): ONNX runtime, modest quality wins on author + affiliation extraction.
  • Auto-download: Wapiti model weights and pdfalto binary are fetched on first run.

Install

npm install grobid-js

Quick start

import { Grobid } from "grobid-js/node";

const g = new Grobid();
const tei = await g.processPdf("path/to/paper.pdf");
console.log(tei);

Models and the pdfalto binary auto-download to ~/.cache/grobid-js/ on first call. To pin specific paths:

const g = new Grobid({
  modelsDir: "/path/to/grobid-home/models",
  lexiconDir: "/path/to/grobid-home/lexicon",
  pdfaltoOptions: { binaryPath: "/path/to/pdfalto" },
});

Opting into the BiLSTM (ONNX) header model

import { Grobid } from "grobid-js/node";
import {
  GloveFileProvider,
} from "grobid-js/grobid/engines/tagging/glove-file-provider";

const g = new Grobid({
  bidlstmModels: {
    header: {
      modelDir: "/path/to/header-BidLSTM_CRF_FEATURES",
      glove: new GloveFileProvider(vocabPath, vectorsPath),
    },
  },
});

Requires onnxruntime-node (optional peer dep) and a vocab-restricted Glove dump produced by scripts/extract-glove-vocab.py.

Architecture

Faithful port of the upstream Java layers:

  • pdfalto: native binary for PDF token + bounding-box extraction (same binary upstream uses)
  • Wapiti: pure-JS implementation of the Wapiti CRF decoder (src/grobid/jni/wapiti-*.ts), byte-equivalent to upstream's C decoder
  • Engines: header, citation, segmentation, fulltext, affiliation, date, author name, reference segmenter, figure, table, funding-acknowledgement — all ported (src/grobid/engines/)
  • Features: every per-token feature vector upstream produces (src/grobid/features/)
  • Lexicon: same gazetteers and lookup tables
  • TEI emission: same <teiHeader> / <text> / <biblStruct> structure

Building from source

npm install
npm run build
npm test

For the BiLSTM ONNX conversion path, see scripts/convert-bidlstm-crf-features.py.

License

Apache 2.0