Skip to Content
DocumentationEcosystem

GLOST Ecosystem

Overview

GLOST is a modular ecosystem of packages for processing multilingual text with language learning annotations. The architecture follows a layered design with clear separation of concerns.

Package Architecture

LAYER 7: MAIN EXPORT └── glost Main entry point combining all functionality LAYER 6: CLI & TOOLS └── glost-cli Command-line interface for plugin management LAYER 5: FRONTEND/INTERFACE ├── glost-react React components for rendering GLOST documents └── glost-dialogue Dialogue syntax and helper functions LAYER 4: PROCESSING INFRASTRUCTURE ├── glost-processor Unified-style processor API ├── glost-registry Plugin discovery and validation └── glost-presets Pre-configured plugin combinations LAYER 3: LANGUAGE PACKAGES ├── glost-en English support (segmentation) ├── glost-ja Japanese support (furigana, romaji, etc.) ├── glost-ko Korean support (romanization) └── glost-th Thai support (RTGS, segmentation) LAYER 2: PLUGIN PACKAGES ├── glost-transcription Pronunciation/transcription data ├── glost-translation Multilingual glosses ├── glost-frequency Word frequency metrics ├── glost-difficulty CEFR/difficulty levels ├── glost-pos Part-of-speech tagging ├── glost-gender Grammatical gender ├── glost-clause-segmenter Sentence segmentation └── glost-inkle Interactive fiction integration LAYER 1: FOUNDATION ├── glost-plugins Core plugin system architecture ├── glost-core Types, nodes, validators, tree utilities ├── glost-common Language utilities and shared code └── glost-utils Text parsing and manipulation

Official Packages

Foundation Layer

PackageVersionDescription
@glotblocks/glost-core0.5.0Core types, nodes, validators, and tree traversal utilities
@glotblocks/glost-common0.2.0Common utilities and language configurations
@glotblocks/glost-utils0.2.0Framework-agnostic utilities for text manipulation
@glotblocks/glost-plugins0.5.0Plugin architecture and extension system

Plugin Packages

PackageVersionDescription
@glotblocks/glost-transcription0.4.0Pronunciation and transcription data (IPA, romanization)
@glotblocks/glost-translation0.4.0Multilingual glosses and translations
@glotblocks/glost-frequency0.4.0Word frequency metrics and prioritization
@glotblocks/glost-difficulty0.4.0CEFR levels and difficulty scoring
@glotblocks/glost-pos0.4.0Part-of-speech tagging and formatting
@glotblocks/glost-gender0.2.1Grammatical gender metadata
@glotblocks/glost-clause-segmenter0.2.1Sentence segmentation into clauses
@glotblocks/glost-inkle0.2.0Inkle/Ink interactive fiction integration

Language Packages

PackageVersionDescription
@glotblocks/glost-th0.4.1Thai language support (RTGS, Paiboon+, segmentation)
@glotblocks/glost-ja0.4.0Japanese language support (furigana, romaji, JLPT)
@glotblocks/glost-ko0.1.0Korean language support (romanization)
@glotblocks/glost-en0.4.0English language support (segmentation)

Processing Infrastructure

PackageVersionDescription
@glotblocks/glost-processor0.5.0Unified-style processor with .use() API
@glotblocks/glost-registry0.5.0Plugin discovery, validation, conflict detection
@glotblocks/glost-presets0.5.0Pre-configured plugin combinations

Interface Packages

PackageVersionDescription
@glotblocks/glost-react0.5.0React components for rendering with ruby annotations
@glotblocks/glost-dialogue0.5.0Dialogue syntax and helper functions

Main Package & Tools

PackageVersionDescription
glost0.5.0Main entry point combining all GLOST functionality
@glotblocks/glost-cli0.5.0CLI for plugin management and discovery

Package Relationships

Dependency Graph

glost (main) ├── glost-core ├── glost-processor ────────────┐ ├── glost-registry ─────────────┼── glost-plugins └── glost-presets ──────────────┘ │ │ glost-react ─────── glost ───────────────┘ glost-dialogue ─────┘ │ │ glost-th ─────────── glost ──────────────┤ ├── glost-clause-segmenter │ ├── glost-transcription ───────────────┤ ├── glost-translation ─────────────────┤ ├── glost-frequency ───────────────────┤ ├── glost-difficulty ──────────────────┤ └── glost-pos ─────────────────────────┘ glost-ja ─────────── glost ├── glost-transcription ├── glost-translation ├── glost-frequency ├── glost-difficulty └── glost-pos glost-ko ─────────── glost ├── glost-transcription ├── glost-translation ├── glost-frequency ├── glost-difficulty └── glost-pos glost-en ─────────── glost └── glost-clause-segmenter

How Packages Work Together

1. Foundation → Plugins

The foundation layer provides core types and utilities. The plugin system (@glotblocks/glost-plugins) builds on this to enable extensible processing.

// Foundation provides types import { GLOSTWord, GLOSTSentence } from '@glotblocks/glost-core'; // Plugin system provides extension architecture import { processGLOST, type GLOSTExtension } from '@glotblocks/glost-plugins';

2. Plugins → Language Packages

Individual plugins (frequency, transcription, etc.) are composed into language-specific packages that provide a complete solution for each language.

// Language package composes multiple plugins import { thaiFrequencyProvider } from '@glotblocks/glost-th/extensions'; import { createFrequencyExtension } from '@glotblocks/glost-frequency'; const [freqGen, freqEnh] = createFrequencyExtension({ targetLanguage: 'th', provider: thaiFrequencyProvider });

3. Processing Infrastructure

The processor, registry, and presets provide the runtime infrastructure for using plugins.

import { glost } from '@glotblocks/glost'; import { languageLearningPreset } from '@glotblocks/glost/presets'; const processor = glost() .use(languageLearningPreset) .freeze(); const result = await processor.process(document);

4. Interface Packages

Frontend packages consume processed documents for rendering.

// React rendering import { GloSTWord, GloSTSentence } from '@glotblocks/glost-react'; // Dialogue structures import { createDialogueFromTurns } from '@glotblocks/glost-dialogue';

Use Cases by Package Combination

Language Learning App

glost + glost-th + glost-react ├── Core processing ├── Thai transcription, frequency, difficulty └── React components for UI

Reading Comprehension Platform

glost + glost-ja + glost-clause-segmenter ├── Core processing ├── Japanese furigana and difficulty └── Sentence breakdown for easier reading

Interactive Fiction

glost + glost-inkle + glost-dialogue ├── Core processing ├── Ink story integration └── Dialogue conversation structures

Grammar Analysis Tool

glost + glost-pos + glost-clause-segmenter ├── Core processing ├── Part-of-speech tagging └── Clause relationship analysis

Community Packages

Naming Conventions

TypePatternExample
Languageglost-{lang}@glotblocks/glost-th, @glotblocks/glost-ja
Data Sourceglost-{lang}-datasource-{source}glost-th-datasource-lexitron
Transcriptionglost-{lang}-transcription-{system}glost-th-transcription-paiboon
Lookupglost-{lang}-lookup-{type}-{system}-{source}glost-th-lookup-transcription-paiboon-lexitron

Creating Community Packages

  1. Follow naming conventions
  2. Implement provider interfaces from plugin packages
  3. Export typed providers
  4. Document usage examples
  5. Submit PR to add to ecosystem list

Standards & Specifications

Getting Help

See Also

Last updated on