Skip to content
This repository has been archived by the owner on Mar 2, 2024. It is now read-only.

Latest commit

 

History

History
28 lines (19 loc) · 673 Bytes

README.md

File metadata and controls

28 lines (19 loc) · 673 Bytes

LibDict -- Read *.dict(.dz) dictionary files

This crate (library) provides a Rust implementation for parsing the dict file format, as used by the dictd server.

License

Please see the file LiCENSE.md for more information.

Example Usage

Citing from the crates documentation:

fn main() {
    let index_file = "/usr/share/dictd/freedict-lat-deu.index";
    let dict_file = "/usr/share/dictd/freedict-lat-deu.dict.dz";
    let mut latdeu = dict::load_dictionary_from_file(dict_file, index_file).unwrap();
    // hey: rust!
    println!("{}", latdeu.lookup("ferrugo").unwrap());
}