duden-search-api
v1.0.7
Published
Search API für duden.de
Downloads
13
Readme
duden-search-api
A Node.js Duden.de 'API' (website scraper for searching of german words on duden.de)
Install
npm i duden-search-api --save
Usage
const DudenSearchApi = require( "duden-search-api" );
let instance = new DudenSearchApi();
instance.searchWord( "gestern" ).then( ( result ) => {
console.log( result );
} ).catch( ( error ) => {
console.log( error );
} );
The result array
The resulted return value is in the following scheme:
[
{
"word": "gestern",
"props": {
"wordClass": "Adverb",
"hyphenation": [
"ges",
"tern"
],
"meanings": [
"an dem Tag, der dem heutigen unmittelbar vorausgegangen ist",
"früher"
],
"ancestry": "mittelhochdeutsch gester(n), althochdeutsch gesteron, eigentlich = am anderen Tag"
}
}
]
Todo
- [x] simple word search
- [x] extend word results (distribution, hyphenation, ancestry, examples)
- [ ] documentation ;)
- [ ] …