Skip to Content
DocumentationWhy GloST?

Why GLOST?

The Challenge

Building language learning applications requires representing text with rich annotations: translations, pronunciations, difficulty levels, grammar information, and cultural context.

Common approaches have trade-offs:

  • Plain text + offsets: Fragile offset matching, lacks standard structure
  • HTML + attributes: Mixes presentation with data, limited structure
  • Custom JSON: Each project creates its own format, limiting interoperability

GLOST’s Approach

GLOST provides a standardized syntax tree for multilingual annotated text:

Standards-Based

Built on nlcst  (Natural Language Concrete Syntax Tree), part of the unified  ecosystem, providing compatibility with existing tools and community-driven standards.

Concrete Syntax Tree

Preserves all details including whitespace and punctuation, which benefits language learners who need to see authentic text.

Multi-Language Support

Supports multiple languages using ISO-639 codes, with flexible script and transcription system handling.

Rich Metadata

Supports comprehensive word annotations:

Extensible

The extension system allows custom processing for features like frequency analysis, translations, and transcriptions.

Type-Safe

Full TypeScript support with type guards for safe node handling.

Use Cases

GLOST is used for language learning apps, reader applications, corpus linguistics, interactive fiction, and dictionary tools.

Comparison

FeatureGLOSTPlain JSONHTML
Standard formatYesVariesNo
Preserves whitespaceYesVariesPartially
Multi-languageYesPossiblePossible
Type-safeYesPossibleNo
ExtensibleYesVariesLimited

Getting Started

pnpm add @glotblocks/glost @glotblocks/glost-common

See the Getting Started guide.

Last updated on