$ account typedgrammar
Typed Japanese is a TypeScript type-level library that models Japanese grammar as composable generic types, enabling the construction of grammatically valid Japanese sentences entirely within the type system. The core library defines interfaces for verbs (godan, ichidan, irregular), adjectives (i-adjectives, na-adjectives), copulas, particles, and sentence patterns, using template literal types and conditional types to encode conjugation rules. This allows developers to write Japanese sentences as type aliases that resolve to the exact Japanese string, with the TypeScript compiler acting as a grammar validator. The repository also includes an interactive playground web application (React + Vite + Monaco Editor) where users can explore the type system, write and analyze sentences, and follow a bilingual (English/Chinese) tutorial course spanning 47 chapters from elementary to advanced levels. A macOS app (TypedTranslate) provides a native interface for grammar annotation and chat, using a Bun bridge to integrate with the type system and LLMs (Codex/Claude). The project is hybrid in nature: while primarily an application/library, it includes a substantial data/research component in the form of curated evaluation datasets, an LLM annotation pipeline, and a rigorous iterative eval loop that measures conformance, reliability, and capability across grammar categories. The eval system produces quantifiable scoreboards and drives systematic improvements to the library's type definitions, prompt templates, and tutorial content.