pub struct TFIDFData<N = f32, K = String, E = DefaultTFIDFEngine>{
pub documents: IndexMap<KeyRc<K>, TFVector<N>>,
pub token_dim_sample: Vec<Box<str>>,
pub idf: Option<IDFVector>,
/* private fields */
}Expand description
Data structure for deserializing TFIDFVectorizer.
This struct does not contain references, so it can be serialized.
Use the into_tf_idf_vectorizer method to convert to TFIDFVectorizer.
Fields§
§documents: IndexMap<KeyRc<K>, TFVector<N>>TF vectors for documents
token_dim_sample: Vec<Box<str>>Token dimension sample for TF vectors
idf: Option<IDFVector>IDF vector
Implementations§
Source§impl<N, K, E> TFIDFData<N, K, E>
impl<N, K, E> TFIDFData<N, K, E>
Sourcepub fn into_tf_idf_vectorizer(
self,
corpus_ref: Arc<Corpus>,
) -> TFIDFVectorizer<N, K, E>
pub fn into_tf_idf_vectorizer( self, corpus_ref: Arc<Corpus>, ) -> TFIDFVectorizer<N, K, E>
Convert TFIDFData into TFIDFVectorizer.
corpus_ref is a reference to the corpus.
Trait Implementations§
Source§impl<'de, N, K, E> Deserialize<'de> for TFIDFData<N, K, E>where
N: Num + Copy + Deserialize<'de>,
E: TFIDFEngine<N, K>,
K: Clone + Eq + Hash + Deserialize<'de>,
impl<'de, N, K, E> Deserialize<'de> for TFIDFData<N, K, E>where
N: Num + Copy + Deserialize<'de>,
E: TFIDFEngine<N, K>,
K: Clone + Eq + Hash + Deserialize<'de>,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl<N, K, E> Freeze for TFIDFData<N, K, E>
impl<N, K, E> RefUnwindSafe for TFIDFData<N, K, E>
impl<N = f32, K = String, E = DefaultTFIDFEngine> !Send for TFIDFData<N, K, E>
impl<N = f32, K = String, E = DefaultTFIDFEngine> !Sync for TFIDFData<N, K, E>
impl<N, K, E> Unpin for TFIDFData<N, K, E>
impl<N, K, E> UnwindSafe for TFIDFData<N, K, E>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more