german-verbs v5.3.1
german-verbs
Agreement of German verbs, depending on tense, person and number.
Use german-verbs-dict
as the linguistic resource.
Installation
npm install german-verbs
Usage
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-dict
for the format - verb (string): the verb to agree
- tense (string):
- Indicativ:
PRASENS
PRATERITUM
FUTUR1
FUTUR2
PERFEKT
PLUSQUAMPERFEKT
- Konjunktiv1:
KONJUNKTIV1_PRASENS
KONJUNKTIV1_FUTUR1
KONJUNKTIV1_PERFEKT
- Konjunktiv2:
KONJUNKTIV2_PRATERITUM
KONJUNKTIV2_FUTUR1
KONJUNKTIV2_FUTUR2
- Indicativ:
- person:
1
2
or3
- number:
S
orP
- aux: SEIN or HABEN. Mandatory when the tense requires an auxiliary (
PERFEKT
PLUSQUAMPERFEKT
FUTUR2
KONJUNKTIV1_PERFEKT
KONJUNKTIV2_FUTUR2
), unless for a short list of verbs that always takeSEIN
(like fliegen gehen etc.) - pronominal (boolean): put
true
if you want the reflexive form Ich wasche mich. You can also directly use the pronominal infinitive:sich waschen
. - pronominalCase:
ACCUSATIVE
for Accusative orDATIVE
for Dative. Mandatory whenpronominal
is true andS
1
orS
2
.
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
FUTUR1
PERFEKT
PLUSQUAMPERFEKT
KONJUNKTIV1_FUTUR1
KONJUNKTIV1_PERFEKT
KONJUNKTIV2_FUTUR1
: for instance['wird', 'sein']
forFUTUR1 sein 3S
- also 2 for
FUTUR2
KONJUNKTIV2_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
23 days ago
1 year ago
1 year ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 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
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
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
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
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
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