Skip to content

maroun-baydoun/wiktionary-definition-parser

Repository files navigation

wiktionary-definition-parser

Parse a Wiktionary word's definitions

Install

npm install wiktionary-definition-parser

Usage

import parse from 'wiktionary-definition-parser';
 
const wikitext = '...';
const startIndex = ...; // The text between this index and the first line not beginning with a # will be parsed

const definitions = parse(wikitext, startIndex);

[
    'first defintion',
    'second definition',
    ...
]

About

Parse a Wiktionary word's definitions

Resources

License

Stars

Watchers

Forks

Packages

No packages published