pub struct TFIDFData<N = f32, K = String, E = DefaultTFIDFEngine, C = DefaultCompare>{
pub documents: Vec<TFVector<N, K>>,
pub token_dim_sample: Vec<String>,
pub idf: IDFVector<N>,
/* private fields */
}Expand description
TFIDFVectorizerのデシリアライズ用のデータ構造
これは参照を含んでいないため、シリアライズ可能です。
into_tf_idf_vectorizerメソッドを使用して、TFIDFVectorizerに変換できます。
Fields§
§documents: Vec<TFVector<N, K>>ドキュメントのTFベクトル
token_dim_sample: Vec<String>TFベクトルのトークンの次元サンプル
idf: IDFVector<N>IDFベクトル
Implementations§
Source§impl<N, K, E, C> TFIDFData<N, K, E, C>
impl<N, K, E, C> TFIDFData<N, K, E, C>
Sourcepub fn into_tf_idf_vectorizer<'a>(
self,
corpus_ref: &'a Corpus,
) -> TFIDFVectorizer<'a, N, K, E, C>
pub fn into_tf_idf_vectorizer<'a>( self, corpus_ref: &'a Corpus, ) -> TFIDFVectorizer<'a, N, K, E, C>
TFIDFDataからTFIDFVectorizerに変換します。
corpus_refはコーパスの参照です。
Trait Implementations§
Source§impl<'de, N, K, E, C> Deserialize<'de> for TFIDFData<N, K, E, C>
impl<'de, N, K, E, C> Deserialize<'de> for TFIDFData<N, K, E, C>
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, C> Freeze for TFIDFData<N, K, E, C>
impl<N, K, E, C> RefUnwindSafe for TFIDFData<N, K, E, C>
impl<N, K, E, C> Send for TFIDFData<N, K, E, C>
impl<N, K, E, C> Sync for TFIDFData<N, K, E, C>
impl<N, K, E, C> Unpin for TFIDFData<N, K, E, C>
impl<N, K, E, C> UnwindSafe for TFIDFData<N, K, E, C>
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