[][src]Struct fasttext::FastText

pub struct FastText { /* fields omitted */ }

Methods

impl FastText[src]

pub fn new() -> Self[src]

pub fn load_model(&mut self, filename: &str) -> Result<(), String>[src]

pub fn save_model(&mut self, filename: &str) -> Result<(), String>[src]

pub fn save_output(&mut self, filename: &str) -> Result<(), String>[src]

pub fn save_vectors(&mut self, filename: &str) -> Result<(), String>[src]

pub fn get_dimension(&self) -> isize[src]

pub fn get_word_id(&self, word: &str) -> isize[src]

pub fn get_subword_id(&self, word: &str) -> isize[src]

pub fn is_quant(&self) -> bool[src]

pub fn load_vectors(&mut self, filename: &str) -> Result<(), String>[src]

pub fn train(&mut self, args: &Args) -> Result<(), String>[src]

pub fn predict(
    &self,
    text: &str,
    k: i32,
    threshold: f32
) -> Result<Vec<Prediction>, String>
[src]

pub fn predict_on_words(
    &self,
    words: &[i32],
    k: i32,
    threshold: f32
) -> Result<Vec<Prediction>, String>
[src]

pub fn quantize(&mut self, args: &Args) -> Result<(), String>[src]

pub fn get_word_vector(&self, word: &str) -> Vec<f32>[src]

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

pub fn get_sentence_vector(&self, sentence: &str) -> Vec<f32>[src]

Trait Implementations

impl Default for FastText[src]

impl Clone for FastText[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl Send for FastText[src]

impl Drop for FastText[src]

impl Sync for FastText[src]

impl Debug for FastText[src]

Blanket Implementations

impl<T> From for T[src]

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

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

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

impl<T> Any for T where
    T: 'static + ?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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.