Settings

Theme

Typed Japanese: Expressing Natural Language Grammar with TypeScript Types

github.com

6 points by doodlewind a year ago · 2 comments

Reader

nchagnet a year ago

This is really interesting! You mention using LLMs to parse sentences in strongly typed prompts, but how would this work with the prevalence of tolerated grammatical errors in most languages? Would such a parsing always be "pass/fail" or would you be able to get a degree of correctness?

  • doodlewindOP a year ago

    You've raised an excellent point about natural language flexibility! Indeed, a strict pass/fail system would struggle with the grammatical variations found in everyday language.

    Textbook examples are ideal for this approach precisely because they demonstrate grammatical structures with intentional precision. Rather than binary pass/fail results, we could implement degrees of type conformance with specific error messages tied to common mistakes. This makes the approach particularly valuable in educational contexts, where a textbook-aligned type system could provide scaffolded feedback as learners progress.

    In essence, textbook examples with their corresponding type annotations could serve as a "test262" suite for natural language learning - a reference collection against which learners can validate their understanding within a controlled, educational environment.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection