wordnet 0.1.2

Read a wordnet dictionary in Rust
Documentation
  • Coverage
  • 92%
    46 out of 50 items documented0 out of 10 items with examples
  • Size
  • Source code size: 20.64 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.38 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • njaard/wordnet-rs
    11 6 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • njaard

GitHub license Crates.io Documentation

[dependencies]
wordnet = "0.1"

Introduction

This is a parser for Wordnet dictionaries, written in 100% Rust.

Completeness

The library poorly tested and incomplete.

Here are the unimplemented features:

  • lexicographical file numbers
  • 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