OpenViSTAI · Agents · Blockchain · Crypto
Menu
AI Developer Tools & SDKs

Spacy Js

Spacy Js is a JavaScript library for accessing spaCy linguistic annotations through a Python REST API. It returns processed text as a document-like JavaScript object with token and document properties.

Independent OpenViST project profile, based on linked sources.

Spacy Js — OpenViST project profile in AI Developer Tools & SDKs.
OpenViST project illustration. See the linked sources for product details.
Understand the project

Practical overview

When it fits

Use it when a JavaScript application needs spaCy annotations and can connect to a Python REST API hosting the required model.

Who it is for

  • JavaScript developers adding spaCy-based linguistic analysis to application workflows.
  • Teams that can run a Python service and want to consume its NLP annotations from JavaScript.

Documented uses

  • Send text from JavaScript to a spaCy-backed Python service.
  • Read token properties such as part of speech and syntactic head.
  • Access document annotations such as named entities, sentences and noun chunks.
Before you choose

Requirements & limits

The public GitHub repository lists an MIT license. The README documents installation through npm and a Python REST server.

  • Both the JavaScript package and a Python server with the model are needed.
  • The server defaults to 0.0.0.0:8080 and the en_core_web_sm model.
  • Additional models must be installed in the same Python environment as the server.
  • The project describes itself as mostly experimental, and its JavaScript API has some differences from spaCy’s Python API.

Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.

Source-based practical guide

Set up the JavaScript client and Python REST server

Install the library and start a Python server with a spaCy model available.

Before you start

  • Node.js and npm
  • Python environment for the server and its requirements
  • A spaCy model installed in that same Python environment

Steps

  1. Install the JavaScript package with the command below.

    Documented command
    npm install spacy
  2. Install the server requirements with the command below; the README recommends using a virtual environment.

    Documented command
    pip install -r requirements.txt
  3. Start the REST API with the command below.

    Documented command
    python api/server.py
  4. For additional models, install them in the server environment and pass their comma-separated names when starting the server.

Expected outcome

A REST API is served by default on 0.0.0.0:8080 with en_core_web_sm as its default model, ready for the JavaScript interface to address.

Guide limitations

  • The README describes the project as mostly experimental.
  • The JavaScript interface is similar to, but not identical with, spaCy’s Python API.
Source-based practical guide

Request annotations and inspect tokens in JavaScript

Submit text through the JavaScript interface and read annotations from the returned document.

Before you start

  • The Python REST API must be running with the requested model available.
  • The JavaScript spacy package must be installed.

Steps

  1. Create an NLP object with spacy.load('en_core_web_sm'), using a model available through the REST API.

  2. Call the NLP object with text and await the returned document.

  3. Iterate over the document’s tokens and read properties such as text, pos and head.text; inspect doc.ents for named entities.

Expected outcome

JavaScript code receives a document object with token and linguistic annotation data computed by spaCy in Python.

Guide limitations

  • The returned annotation values are precomputed.
  • The README notes exceptions from the Python API, including challenges representing complex recursive relationships.
Evidence and transparency

Sources & review

Source record details
Source availability
Active
Sources checked
16 October 2026
Original website title
ines/spacy-js · Official homepage title · retained in its source language