14 releases (7 breaking)

0.8.0 Jul 7, 2024
0.7.0 Nov 28, 2021
0.6.1 Jan 4, 2019
0.5.1 Jul 26, 2018
0.4.0 Mar 17, 2018

#936 in Web programming


Used in backslash-z

Apache-2.0 OR MIT

10KB
130 lines

daumdic-rs docs.rs

Daum Dictionary API wrapper written in Rust, inspired by daumdic-ruby.

use daumdic::search;

fn main() {
    let res = search("ironic").unwrap();
    println!("{}", res);
    // => "ironic  [airάnik]  아이러니한, 역설적인, 모순적인, 반어적인"
}

 


daumdic-rs is primarily distributed under the terms of both the Apache License (Version 2.0) and the MIT license. See COPYRIGHT for details.


lib.rs:

A Rust library that searches for words (Korean, English, Japanese, Chinese, ...) in the Daum dictionary and returns their meanings and pronunciations.

let res = &daumdic::search("독수리").await.unwrap().words[0];
assert_eq!(res.word, "독수리");
assert_eq!(res.lang, daumdic::Lang::Korean);
println!("{:?} {}", res.pronounce, res.meaning.join(", "));

Dependencies

~7–18MB
~246K SLoC