A Typescript clone of the original WiktionaryParser that downloads words from Wiktionary (wiktionary.org) and parses them in an easy to use JSON format. Right now, it parses etymologies, definitions, pronunciations, examples, audio links and related words.
[{
"pronunciations": {
"text": ["pronunciation text"],
"audio": ["pronunciation audio"]
},
"definitions": [{
"relatedWords": [{
"relationshipType": "word relationship type",
"words": ["list of related words"]
}],
"text": ["list of definitions"],
"partOfSpeech": "part of speech",
"examples": ["list of examples"]
}],
"etymology": "etymology text",
}]
npm install parse-wiktionary
- Import the WiktionaryParser class.
- Initialize an object and use the
parse("word", "language")
method.
const { WiktionaryParser } = require('parse-wiktionary');
const parser = new WiktionaryParser();
const englishResults = parser.parse('test');
const frenchResults = parser.parse('test', 'french');
If you want to add features/improvement or report issues, feel free to send a pull request!
Wiktionary Parser is licensed under MIT.