[−][src]Struct notmecab::Dict
Methods
impl Dict
[src]
pub fn load<T: Read + Seek>(
sysdic: &mut BufReader<T>,
matrix: &mut BufReader<T>,
unkdic: &mut BufReader<T>,
unkchar: &mut BufReader<T>
) -> Result<Dict, &'static str>
[src]
sysdic: &mut BufReader<T>,
matrix: &mut BufReader<T>,
unkdic: &mut BufReader<T>,
unkchar: &mut BufReader<T>
) -> Result<Dict, &'static str>
Load sys.dic and matrix.bin files into memory and prepare the data that's stored in them to be used by the parser.
Returns a Dict or, on error, a string describing an error that prevented the Dict from being created.
Only supports UTF-8 mecab dictionaries with a version number of 0x66.
Ensures that sys.dic and matrix.bin have compatible connection matrix sizes.
pub fn load_user_dictionary<T: Read>(
&mut self,
userdic: &mut BufReader<T>
) -> Result<(), &'static str>
[src]
&mut self,
userdic: &mut BufReader<T>
) -> Result<(), &'static str>
pub fn read_feature_string(
&self,
token: &LexerToken
) -> Result<String, &'static str>
[src]
&self,
token: &LexerToken
) -> Result<String, &'static str>
Returns the feature string belonging to a LexerToken. They are stored in a large byte buffer internally as copying them on each parse may be expensive.
Auto Trait Implementations
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,