TypedGrammar Logo

Learn and understand natural languages with TypeScript

๐Ÿง 

Learn Grammar Through Code

Leverage your programming knowledge to understand natural language structures in a familiar format.

๐Ÿงฉ

Type-Safe Languages

Construct grammatically correct sentences with advanced type system in TypeScript.

๐Ÿค–

AI-Enhanced Learning

Intermediate format for AI-assisted language learning with type-level verification.

Typed Japanese Demo

Typed Japanese sentence in TypeScript:

// Define ProperNoun "ใƒ’ใƒณใƒกใƒซ"
type ใƒ’ใƒณใƒกใƒซ = ProperNoun<"ใƒ’ใƒณใƒกใƒซ">;
// Define irregular verb "ใ™ใ‚‹"
type ใ™ใ‚‹ = IrregularVerb & { dictionary: "ใ™ใ‚‹" };
// Create "ใใ†ใ—ใŸ" pattern
type ใใ†ใ—ใŸ = DemonstrativeAction<Demonstrative & "ใใ†", ใ™ใ‚‹, "ใŸๅฝข">;
// Create conditional phrase "ใƒ’ใƒณใƒกใƒซใชใ‚‰ใใ†ใ—ใŸ"
type ใƒ’ใƒณใƒกใƒซใชใ‚‰ใใ†ใ—ใŸ = ConditionalPhrase<ใƒ’ใƒณใƒกใƒซ, "ใชใ‚‰", ใใ†ใ—ใŸ>;
// Type checking example
const example: ใƒ’ใƒณใƒกใƒซใชใ‚‰ใใ†ใ—ใŸ = "ใƒ’ใƒณใƒกใƒซใชใ‚‰ใใ†ใ—ใŸ"; // Correct!

Our Projects

๐ŸŒธ

Typed Japanese

Our first prototype implements Japanese grammar as a TypeScript type system, enabling grammatically correct sentences to be verified through TypeScript.

Explore
๐Ÿ”ค

Typed English

Currently in development, applying similar principles to English grammar, making it easier to understand complex grammatical structures.

Explore

Our Vision

We aim to create practical tools for language learners, educators, and developers by representing grammar rules through TypeScript's type system.

This is an early-stage initiative. We're focusing on building solid implementations for a few languages before expanding further.