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

glost

v0.5.0

Published

GLOST - Glossed Syntax Tree for language learning and multilingual text processing

Readme

GLOST - Glossed Syntax Tree

npm version License: MIT

GLOST (Glossed Syntax Tree) is a powerful framework for processing multilingual text with language learning annotations using a unified/remark-style plugin system.

Quick Start

npm install glost
import { glost, createSimpleDocument, getAllWords } from "glost";
import { languageLearningPreset } from "glost/presets";

// Create a document
const words = [
  { type: "WordNode", value: "สวัสดี" },
  { type: "WordNode", value: "ครับ" }
];

const document = createSimpleDocument(words, "th", "thai", {
  sentenceText: "สวัสดีครับ"
});

// Process with plugins
const result = await glost()
  .use(languageLearningPreset)
  .process(document);

// Access processed data
const allWords = getAllWords(result);

What's Included

The glost package is a convenient meta-package that includes:

  • glost-core - Core types, nodes, and utilities
  • glost-processor - Unified-style processor with fluent API
  • glost-registry - Plugin discovery and validation
  • glost-presets - Pre-configured plugin combinations

Features

🚀 Unified-Style Processor

Fluent API for plugin composition:

const processor = glost()
  .use(transcription, { scheme: "ipa" })
  .use(translation, { target: "en" })
  .use(frequency)
  .freeze();

const result = await processor.process(document);

🔍 Plugin Discovery

Find and validate plugins:

import { pluginRegistry } from "glost";

const plugins = pluginRegistry.search({ language: "th" });
const report = pluginRegistry.checkConflicts(["plugin1", "plugin2"]);

📦 Presets

Quick setup with common configurations:

import { languageLearningPreset } from "glost/presets";

const processor = glost()
  .use(languageLearningPreset);

Available presets:

  • languageLearningPreset - Full language learning stack
  • readingAppPreset - Interactive reading features
  • vocabularyBuilderPreset - Word frequency and difficulty
  • grammarAnalyzerPreset - POS and clause analysis
  • minimalPreset - Just the essentials

🎯 Multi-Language Support

Built-in support for:

  • Thai (glost-th)
  • Japanese (glost-ja)
  • Korean (glost-ko)
  • English (glost-en)

🔧 Extensible

Create custom plugins or use community plugins:

const myPlugin = {
  id: "my-plugin",
  name: "My Custom Plugin",
  transform: (tree) => {
    // Your custom logic
    return tree;
  }
};

processor.use(myPlugin);

Package Structure

GLOST is organized as a monorepo:

glost/
├── glost              # Main package (this one)
├── glost-core         # Core types and nodes
├── glost-processor    # Processor API
├── glost-registry     # Plugin registry
├── glost-presets      # Preset configurations
├── glost-common       # Language utilities
├── glost-extensions   # Extension system
├── glost-th           # Thai language support
├── glost-ja           # Japanese language support
└── glost-cli          # CLI tools

Installation Options

All-in-One (Recommended)

npm install glost

Granular Installation

# Just the core
npm install glost-core

# Core + processor
npm install glost-core glost-processor

# Core + specific language
npm install glost-core glost-th

Usage Examples

Basic Document Creation

import { createSimpleDocument, getAllWords } from "glost";

const document = createSimpleDocument(words, "th", "thai");
const allWords = getAllWords(document);

With Processor

import { glost } from "glost";

const processor = glost()
  .use("transcription")
  .use("translation")
  .use("frequency");

const result = await processor.process(document);

With Hooks

import { glost } from "glost";

const processor = glost()
  .use("transcription")
  .before("transcription", (doc) => {
    console.log("Starting transcription");
  })
  .after("transcription", (doc) => {
    console.log("Transcription complete");
  })
  .onProgress((stats) => {
    console.log(`Progress: ${stats.completed}/${stats.total}`);
  });

await processor.process(document);

With Registry

import { pluginRegistry } from "glost";

// Search for plugins
const thaiPlugins = pluginRegistry.search({ 
  language: "th",
  category: "enhancer"
});

// Validate combinations
const report = pluginRegistry.checkConflicts([
  "transcription",
  "translation",
  "frequency"
]);

if (!report.hasConflicts) {
  // Safe to use together
  processor.use("transcription").use("translation").use("frequency");
}

CLI Tools

Install CLI tools globally:

npm install -g glost-cli
# List plugins
glost plugins list

# Search
glost plugins search transcription

# Show info
glost plugins info transcription

# Validate
glost plugins validate transcription translation frequency

Documentation

Examples

See the examples directory for complete examples:

  • Language learning app
  • Large document processing
  • Custom plugin development
  • Multi-language support

Use Cases

GLOST is used for:

  • Language Learning Apps - Interactive reading with annotations
  • Dictionary Systems - Multiple transcription schemes
  • Graded Readers - Content adapted to learner level
  • Educational Tools - Vocabulary and grammar practice
  • Text Analysis - Linguistic annotation and processing

Comparison with v0.4

Before (v0.4)

import { processGLOSTWithExtensions } from "glost-extensions";

const result = processGLOSTWithExtensions(doc, [ext1, ext2, ext3]);

After (v1.0)

import { glost } from "glost";

const result = await glost()
  .use(ext1)
  .use(ext2)
  .use(ext3)
  .process(doc);

See the Migration Guide for details.

Contributing

Contributions are welcome! See CONTRIBUTING.md for guidelines.

License

MIT © fustilio

Related Projects

  • nlcst - Natural Language Concrete Syntax Tree
  • unist - Universal Syntax Tree
  • unified - Interface for parsing, inspecting, transforming, and serializing content

Links