This is the code for a browser app that helps you practice German adjective declensions.
Most adjectives were scraped from byki.com.
All nouns have been entered manually.
./app
contains the code for the interface. It interprets the computer-readable format of a Sentence returned by Generator
and makes it human-readable.
./generator
contains the language-data-model-ish code for generating random German sentences. The program randomly selects parameters required to create a German sentence and then returns a sentence in a computer-readable format.
[{
"type": "article",
"text": "Ein"
}, {
"type": "space",
"text": " "
}, {
"type": "noun",
"text": "Neffe",
"gender": "0",
"translations": {
"eng": ["nephew"]
}
}]
-
Words
- Nouns
- Adjectives
-
Grammar
- Possible Genders
- Article Suffixes
- Adjective Suffixes
-
Implementation-specific
- Noun Categories
-
Interface
asksGenerator
for aSentence
. -
Generator
randomly decides three variables.- object gender
- article type
- grammar case
-
Generator
grabs random items fromTables
that comply with these variables. -
Generator
organizes these items and gives them back toInterface
. -
Interface
rendersSentence
in a human-legible way.
-
Kasus
-
NOM
-
Statements
-
Commands
-
Y/N Questions
- Ist das deine kluge Tochter?
-
SUBJ Questions
- Welchen hast du gekauft?
-
-
AKK
-
Statements
-
Y/N Questions - Kann deine kluge Tochter gute Deutsch sprechen?
-
SUBJ Questions - Welchen Sprachen kann deine kluge Tochter sprechen?
-
-
DAT
- Statements
- Y/N Questions
- SUBJ Questions
-
GEN
- Statements
- Y/N Questions
- SUBJ Questions
-
-
Conjunctions
- Coordinating
- Subordinating
-
Verbs
- Modalverben
- Adverbs
- Jemandem verben
- Etwas verben
- Seperable verbs
- Adverbial Inversion
- "Ich laufe schnell. Schnell laufe ich."
-
Comparative Adjectives
- "Deine kleine Tochter. Deine kleinere Tochter. Deine kleinste Tochter."
npm install # Install project dependencies
npm start # Run a dev server at http://localhost:8080
npm test # Run unit tests once
npm lint # Lint all JS files
npm tdd # Run unit tests when a JS file is changed
npm build # Compile JS and CSS and dump them into `./dist`