Crates.io | wordnet |
lib.rs | wordnet |
version | 0.1.2 |
source | src |
created_at | 2017-10-18 21:16:26.803426 |
updated_at | 2017-10-22 00:17:07.478637 |
description | Read a wordnet dictionary in Rust |
homepage | |
repository | https://github.com/njaard/wordnet-rs |
max_upload_size | |
id | 36117 |
size | 21,018 |
[dependencies]
wordnet = "0.1"
This is a parser for Wordnet dictionaries, written in 100% Rust.
The library poorly tested and incomplete.
Here are the unimplemented features:
Send
and Sync
traits that could be applied.let senses = wn.senses("horse");
senses[0]
.pointers.iter()
.filter(|p| p.relationship == wordnet::Relationship::Hypernym)
.map(|p| p.read())
.for_each( |e| println!("a horse is an {}", e.synonyms[0].word));
Output: A horse is an equine
If the database is corrupt then the library may panic.
I'm not clear on if there's a cause to use Result
.
It is possible that there are bugs that may cause the library to enter an infinite loop while parsing the database.
The library is known to work on Linux and Windows.