[−][src]Struct fasttext::FastText
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]
&self,
text: &str,
k: i32,
threshold: f32
) -> Result<Vec<Prediction>, String>
pub fn predict_on_words(
&self,
words: &[i32],
k: i32,
threshold: f32
) -> Result<Vec<Prediction>, String>
[src]
&self,
words: &[i32],
k: i32,
threshold: f32
) -> Result<Vec<Prediction>, String>
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(&self) -> 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]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
🔬 This is a nightly-only experimental API. (
try_from
)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> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?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>,