get word definitions from wikitionary.org
-
Add this library on :dependencies in your project.clj file:
[wiktionary "0.0.3-SNAPSHOT"]
-
Require the library:
(:require [wiktionary.core :as wiktionary])
-
get-definitions
(get-definitions word)
(get-definitions word language)
Search for definitions for provided
word
.
Iflanguage
is not provided"english"
will be the default value.
The return is a list of definitions.Example:
(wiktionary/get-definitions "stop" "english") ;["verb" "noun" "adverb" "noun" "adjective"]
The possible return values are:
["pronoun", "verb", "noun", "adjective", "adverb", "conjunction", "preposition", "interjection", "letter", "numeral", "article", "particle", "mutation", "determiner", "participle", "circumposition"]
Feel free to contribute 🤗, just create an issue before submiting a PR.