german-adjectives v5.4.0
german-adjectives
Agreement of German adjectives, based on the gender and number of the word, and the case.
You can use german-adjectives-dict as the linguistic resource.
Installation
npm install german-adjectivesUsage
const GermanAdjectivesLib = require('german-adjectives');
const GermanAdjectives = require('german-adjectives-dict/dist/adjectives.json');
// neuen
console.log(GermanAdjectivesLib.agreeGermanAdjective(null, GermanAdjectives, 'neu', 'DATIVE', 'M', 'S', 'DEFINITE'));One single function agreeGermanAdjective that takes multiple parameters and return the agreed adjective:
- exception list on linguistic resources (elements in that list will override elements in second parameter); in general just put
nullhere - linguistic resource (list of adjectives): for the format see below and
german-adjectives-dictlib adjective: the adjective to agree,germanCase:NOMINATIVEACCUSATIVEDATIVEGENITIVEgendergender of the word;MForNnumber: number of the word;SorPdet: determiner;DEFINITEINDEFINITEorDEMONSTRATIVE
[
"Dortmunder":{
"AKK":{
"DEF":{
"P":"Dortmunder",
"F":"Dortmunder",
"M":"Dortmunder",
"N":"Dortmunder"
},
"IND":{
"P":"Dortmunder",
"F":"Dortmunder",
"M":"Dortmunder",
"N":"Dortmunder"
},
"SOL":{
"P":"Dortmunder",
"F":"Dortmunder",
"M":"Dortmunder",
"N":"Dortmunder"
}
},
"DAT":{
...
},
"GEN":{
...
},
"NOM":{
...
}
},
...
]Todo
Add more possible determiners.
dependencies and licences
german-pos-dict provides linguistic binary resources under CC-BY-SA-4.0, which autorises commercial usages. It also contains an export.sh script to generate a textual dump using https://github.com/languagetool-org. dictionary.dump (zipped in dictionary.zip) is this textual dump. It remains under CC-BY-SA-4.0 licence.
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