plwordnet 0.0.4

Native Rust library facilitating the integration of plWordNet 4.2 lexical resources.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use once_cell::sync::Lazy;
use crate::model::PlWordNet;


pub(crate) static WORDNET: Lazy<PlWordNet> = Lazy::new(||
    PlWordNet::from_file("plwordnet_4_2.xml").unwrap()
);


#[test]
fn loading() {
    let meta = WORDNET.get_metadata();
    assert_eq!(meta.lexical_units, 513410);
    assert_eq!(meta.synsets, 353585);
    assert_eq!(meta.relation_types, 306);
    assert_eq!(meta.synset_relations, 1477851);
    assert_eq!(meta.lexical_relations, 393137);
}