[][src]Struct word_segmenters::Segmenter

pub struct Segmenter { /* fields omitted */ }

Implementations

impl Segmenter[src]

pub fn from_dir(dir: &Path) -> Result<Self, ParseError>[src]

Create Segmenter from files in the given directory

Reads from unigrams.txt and bigrams.txt in dir.

pub fn segment(&self, text: &str) -> Vec<String>[src]

Returns a list of words that is the best segmentation of text

pub fn set_limit(&mut self, limit: usize)[src]

Customize the word length `limit

pub fn set_total(&mut self, total: f64)[src]

Customize the relative score by setting the total

Auto Trait Implementations

Blanket Implementations

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

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

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

impl<T> From<T> for T[src]

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

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.