german-verbs v5.4.0
german-verbs
Agreement of German verbs, depending on tense, person and number.
Use german-verbs-dict as the linguistic resource.
Installation
npm install german-verbsUsage
const GermanVerbsLib = require('german-verbs');
const GermanVerbsDict = require('german-verbs-dict/dist/verbs.json');
// hörten
console.log(GermanVerbsLib.getConjugation(GermanVerbsDict, 'hören', 'PRATERITUM', 3, 'P'));
// werden gehabt haben
console.log(GermanVerbsLib.getConjugation(GermanVerbsDict, 'haben', 'FUTUR2', 3, 'P', 'HABEN'));One single function getConjugation that takes multiple parameters and return the agreed verb:
- verb data (linguistic resource): see
german-verbs-dictfor the format - verb (string): the verb to agree
- tense (string):
- Indicativ:
PRASENSPRATERITUMFUTUR1FUTUR2PERFEKTPLUSQUAMPERFEKT - Konjunktiv1:
KONJUNKTIV1_PRASENSKONJUNKTIV1_FUTUR1KONJUNKTIV1_PERFEKT - Konjunktiv2:
KONJUNKTIV2_PRATERITUMKONJUNKTIV2_FUTUR1KONJUNKTIV2_FUTUR2
- Indicativ:
- person:
12or3 - number:
SorP - aux: SEIN or HABEN. Mandatory when the tense requires an auxiliary (
PERFEKTPLUSQUAMPERFEKTFUTUR2KONJUNKTIV1_PERFEKTKONJUNKTIV2_FUTUR2), unless for a short list of verbs that always takeSEIN(like fliegen gehen etc.) - pronominal (boolean): put
trueif you want the reflexive form Ich wasche mich. You can also directly use the pronominal infinitive:sich waschen. - pronominalCase:
ACCUSATIVEfor Accusative orDATIVEfor Dative. Mandatory whenpronominalis true andS1orS2.
The agreed verb is a string[], not a string, as for many tenses there are multiple parts, and as you might wish to put something between the different parts of the conjugated verb.
The size of the result array will always be:
- 1 for simple tenses
- 2 for
FUTUR1PERFEKTPLUSQUAMPERFEKTKONJUNKTIV1_FUTUR1KONJUNKTIV1_PERFEKTKONJUNKTIV2_FUTUR1: for instance['wird', 'sein']forFUTUR1 sein 3S - also 2 for
FUTUR2KONJUNKTIV2_FUTUR2; even if the result if 3 words long, the split is made at the right place to add content: for instance['werde', 'gegessen haben']for KONJUNKTIV2_FUTUR2
Todo
- imperative form
11 months ago
12 months ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago