[][src]Struct notmecab::Dict

pub struct Dict { /* fields omitted */ }

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]

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]

pub fn read_feature_string(
    &self,
    token: &LexerToken
) -> Result<String, &'static str>
[src]

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

impl Send for Dict

impl Sync for Dict

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]