https://github.com/njaard/wordnet-rs
Read a wordnet dictionary in Rust
https://github.com/njaard/wordnet-rs
rust wordnet
Last synced: 5 months ago
JSON representation
Read a wordnet dictionary in Rust
- Host: GitHub
- URL: https://github.com/njaard/wordnet-rs
- Owner: njaard
- License: bsd-2-clause
- Created: 2017-10-18T21:14:17.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-10-22T00:17:03.000Z (almost 8 years ago)
- Last Synced: 2025-05-06T08:49:53.970Z (5 months ago)
- Topics: rust, wordnet
- Language: Rust
- Size: 13.7 KB
- Stars: 11
- Watchers: 2
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://raw.githubusercontent.com/njaard/wordnet-rs/master/LICENSE)
[](https://crates.io/crates/wordnet)
[](https://docs.rs/wordnet)[dependencies]
wordnet = "0.1"# Introduction
This is a parser for [Wordnet](https://wordnet.princeton.edu/)
dictionaries, written in 100% Rust.# Completeness
The library poorly tested and incomplete.
Here are the unimplemented features:
* [lexicographical file numbers](https://wordnet.princeton.edu/man/lexnames.5WN.html)
* handling of word numbers in the synset
* verb exceptions
* verb sentences
* many more things
* There may be some `Send` and `Sync` traits that could be applied.
* Source-breaking changes will follow semantic versioning.# Example
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
# Robustness
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.# Compatibility
The library is known to work on Linux and Windows.# See Also
* [wordnet_stemmer](https://crates.io/crates/wordnet_stemmer) crate.