pub struct WordNet { /* private fields */ }Implementations§
Source§impl WordNet
impl WordNet
pub fn new(dir: &Path) -> Result<Self>
pub fn contains(&self, word: &str) -> bool
Sourcepub fn resolve(
&self,
part_of_speech: PartOfSpeech,
offset: u64,
) -> Option<SynSet>
pub fn resolve( &self, part_of_speech: PartOfSpeech, offset: u64, ) -> Option<SynSet>
Directly resolve a reference, this should only be used with part_of_speech, offset pairs from the returned results, such as the relationships in synsets.
pub fn all_words(&self) -> Vec<String>
pub fn lemmatize(&self, word: &str) -> PartsOfSpeech<Vec<String>>
pub fn lemmatize_for(&self, word: &str, pos: PartOfSpeech) -> Vec<String>
pub fn synsets(&self, word: &str) -> PartsOfSpeech<Vec<SynSet>>
pub fn synsets_for(&self, word: &str, pos: PartOfSpeech) -> Vec<SynSet>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for WordNet
impl RefUnwindSafe for WordNet
impl Send for WordNet
impl Sync for WordNet
impl Unpin for WordNet
impl UnwindSafe for WordNet
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more