npm.io
1.0.7 • Published 6 years ago

duden-search-api

Licence
MIT
Version
1.0.7
Deps
1
Size
4 kB
Vulns
0
Weekly
0

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

  • simple word search
  • extend word results (distribution, hyphenation, ancestry, examples)
  • documentation ;)