wordnet-types 0.1.1

Shared types and part-of-speech enums for WordNet data.
Documentation

Shared, zero-copy types that mirror WordNet's dictionary format.

The goal is to expose the exact fields found in data.*/index.* while making it cheap to build higher-level tooling. Text fields borrow from a backing buffer (&str); numeric fields keep their raw representation (offset, lex_id, ss_type, pointer source/target indices).

Use [Pos] and [SynsetId] to key into a database, [Synset] and [IndexEntry] to inspect parsed records, and helpers like [decode_st] to interpret pointer source/target pairs.

use wordnet_types::{Pos, SynsetId, decode_st};

let pos = Pos::from_char('n').unwrap();
let id = SynsetId { pos, offset: 1740 };
assert_eq!(decode_st("0a0b"), (Some(10), Some(11)));