๐ธ Typed Japanese If you can write TypeScript, you can understand Japanese! Typed Japanese is a TypeScript type-level library that enables the expression of complete Japanese sentences through the type system. It creates a domain-specific language (DSL) based on Japanese grammar rules, allowing a subset of grammatically correct natural language to be written and verified using TypeScript's compiler. This project also explores an intermediate format for AI in language learning. For example, LLMs could return grammar analysis of Japanese sentences using this format instead of JSON, enabling verification through TypeScript's type checker to improve correctness. ๐ Want to learn more? Check out our detailed blog post which explains how the TypeScript type system can be used to learn Japanese grammar from the ground up. The article starts with basic programming concepts and gradually builds up to complex Japanese grammatical structures like conditional sentences and interrogative phrases. // Define the proper noun "ใใณใกใซ" type ใใณใกใซ = ProperNoun < "ใใณใกใซ" > ; // Define ใใ verb type ใใ = IrregularVerb & { dictionary : "ใใ" } ; // Create the ใใใใ pattern (past form of ใใใใ) type ใใใใ = DemonstrativeAction < Demonstrative & "ใใ" , ใใ , "ใๅฝข" > ; // Create the conditional phrase "ใใณใกใซใชใใใใใ" type ใใณใกใซใชใใใใใ = ConditionalPhrase < ใใณใกใซ , "ใชใ" , ใใใใ > ; // Type checking examples const properExample : ใใณใกใซใชใใใใใ = "ใใณใกใซใชใใใใใ" ; // "If it were Himmel, he would do so" // ๅฆๆๆฏ่พ็พๅฐ็่ฏ๏ผไปไนไผ่ฟไนๅ็ ๐ค Verb System Verb Classes Japanese verbs are categorized into three main classes: Godan Verbs (ไบๆฎตๅ่ฉ) - Also known as "Group 1" or "u-verbs" Endings: ใ, ใ, ใ, ใ, ใค, ใฌ, ใถ, ใ, ใ Examples: ่ฉฑใ (hanasu - to speak), ๆธใ (kaku - to write) Ichidan Verbs (ไธๆฎตๅ่ฉ) - Also known as "Group 2" or "ru-verbs" Always end with ใ Examples: ้ฃในใ (taberu - to eat), ่ฆใ (miru - to see) Irregular Verbs (ไธ่ฆๅๅ่ฉ) - Only two main verbs ใใ (suru - to do) ๆฅใ (kuru - to come) Verb Conjugation Forms The system supports these conjugation...
First seen: 2025-03-29 18:29
Last seen: 2025-03-30 00:31