pub struct BinaryLexicon<'a> {
pub trie: Trie<'a>,
pub word_id_table: WordIdTable<'a>,
pub word_params: WordParams<'a>,
pub word_infos: WordInfos<'a>,
pub strings: CompactedStrings<'a>,
pub num_total_entries: u32,
}Expand description
Lexicon part of the single binary dictionary
Fields§
§trie: Trie<'a>TRIE (double array), mapping from index form to WordIdTable offset
word_id_table: WordIdTable<'a>list of word ids that have the same index form
word_params: WordParams<'a>list of word information (for analysis)
word_infos: WordInfos<'a>list of word information (for non-analysis)
strings: CompactedStrings<'a>Stotage of strings in the lixicon (normalized form etc.)
num_total_entries: u32The number of entries in the lexicon
Implementations§
Source§impl<'a> BinaryLexicon<'a>
impl<'a> BinaryLexicon<'a>
Sourcepub fn load(buf: &'a [u8], description: &Description) -> SudachiResult<Self>
pub fn load(buf: &'a [u8], description: &Description) -> SudachiResult<Self>
load a lexicon from bytes
Auto Trait Implementations§
impl<'a> Freeze for BinaryLexicon<'a>
impl<'a> RefUnwindSafe for BinaryLexicon<'a>
impl<'a> Send for BinaryLexicon<'a>
impl<'a> Sync for BinaryLexicon<'a>
impl<'a> Unpin for BinaryLexicon<'a>
impl<'a> UnsafeUnpin for BinaryLexicon<'a>
impl<'a> UnwindSafe for BinaryLexicon<'a>
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