5.3.1 • Published 23 days ago

german-verbs v5.3.1

Weekly downloads
264
License
Apache-2.0
Repository
github
Last release
23 days ago

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
  • person: 1 2 or 3
  • number: S or P
  • 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 take SEIN (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 or DATIVE for Dative. Mandatory when pronominal is true and S 1 or S 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'] for FUTUR1 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
5.3.1

23 days ago

5.3.0

1 year ago

5.2.2

1 year ago

5.2.1

1 year ago

5.2.0

1 year ago

4.4.0

2 years ago

5.0.0

2 years ago

4.3.1

2 years ago

5.1.0

2 years ago

4.3.0

2 years ago

4.2.6

2 years ago

4.2.3

3 years ago

4.2.5

2 years ago

4.2.4

2 years ago

4.2.2

3 years ago

4.2.1

3 years ago

4.0.4

3 years ago

4.0.3

3 years ago

4.2.0

3 years ago

4.1.0

3 years ago

4.1.2

3 years ago

4.1.1

3 years ago

4.0.2

3 years ago

4.0.1

3 years ago

4.0.0

4 years ago

3.1.9

4 years ago

3.1.8

4 years ago

3.1.7

4 years ago

3.1.6

4 years ago

3.1.5

4 years ago

3.1.4

4 years ago

3.1.3

4 years ago

3.1.2

4 years ago

3.1.1

4 years ago

3.1.0

4 years ago

3.0.0

4 years ago

2.20.2

4 years ago

2.20.1

4 years ago

2.20.0

4 years ago

2.19.0

4 years ago

2.18.1

4 years ago

2.18.0

4 years ago

2.17.2

4 years ago

2.17.1

4 years ago

2.17.0

4 years ago

2.16.10

4 years ago

2.16.9

4 years ago

2.16.7

4 years ago

2.16.8

4 years ago

2.16.6

4 years ago

2.16.5

4 years ago

2.16.4

4 years ago

2.16.3

4 years ago

2.16.2

4 years ago

2.16.1

4 years ago

2.16.0

5 years ago

2.15.4

5 years ago

2.15.3

5 years ago

2.15.2

5 years ago

2.15.1

5 years ago

2.15.0

5 years ago

2.14.3

5 years ago

2.14.2

5 years ago

2.14.1

5 years ago

2.14.0

5 years ago

2.13.0

5 years ago

2.12.3

5 years ago

2.12.2

5 years ago

2.12.0

5 years ago

2.12.1

5 years ago

2.11.0

5 years ago

2.10.2

5 years ago

2.10.1

5 years ago

2.10.0

5 years ago

2.9.2

5 years ago

2.9.1

5 years ago

2.9.0

5 years ago

2.8.3

5 years ago

2.8.2

5 years ago

2.8.0

5 years ago

2.7.1

5 years ago

2.7.0

5 years ago

2.6.1

5 years ago

2.6.2

5 years ago

2.6.0

5 years ago

2.5.8

5 years ago

2.5.7

5 years ago

2.5.6

5 years ago

2.5.5

5 years ago

2.5.4

5 years ago

2.5.3

5 years ago

2.5.2

5 years ago

2.5.1

5 years ago

2.5.0

5 years ago

2.4.1

5 years ago

2.4.0

5 years ago

2.3.3

5 years ago

2.3.2

5 years ago

2.3.1

5 years ago

2.3.0

5 years ago

2.2.0

5 years ago

2.1.1

5 years ago

2.1.0

5 years ago

2.0.2

5 years ago

2.0.1

5 years ago

2.0.0

5 years ago

1.1.8

5 years ago