pub struct BagOfWordsFeatureGroup {
pub source_column_name: String,
pub strategy: BagOfWordsFeatureGroupStrategy,
pub tokenizer: Tokenizer,
pub ngram_types: FnvHashSet<NGramType>,
pub ngrams: IndexMap<NGram, BagOfWordsFeatureGroupNGramEntry, FnvBuildHasher>,
}
Expand description
A BagOfWordsFeatureGroup creates features for a text column using the Bag of Words method.
Fields§
§source_column_name: String
This is the name of the text column used to compute features with this feature group.
strategy: BagOfWordsFeatureGroupStrategy
The strategy specifies how to compute feature values given the tokens in the source column.
tokenizer: Tokenizer
This is the tokenizer used to split the text into tokens.
ngram_types: FnvHashSet<NGramType>
These are the ngram types used to create features.
ngrams: IndexMap<NGram, BagOfWordsFeatureGroupNGramEntry, FnvBuildHasher>
These are the ngrams, one for each feature in this feature group.
Implementations§
Source§impl BagOfWordsFeatureGroup
impl BagOfWordsFeatureGroup
pub fn compute_table( &self, column: TableColumnView<'_>, progress: &impl Fn(u64), ) -> Vec<TableColumn>
pub fn compute_array_f32( &self, features: ArrayViewMut2<'_, f32>, column: TableColumnView<'_>, progress: &impl Fn(), )
pub fn compute_array_value( &self, features: ArrayViewMut2<'_, TableValue<'_>>, column: TableColumnView<'_>, progress: &impl Fn(), )
Trait Implementations§
Source§impl Clone for BagOfWordsFeatureGroup
impl Clone for BagOfWordsFeatureGroup
Source§fn clone(&self) -> BagOfWordsFeatureGroup
fn clone(&self) -> BagOfWordsFeatureGroup
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for BagOfWordsFeatureGroup
impl RefUnwindSafe for BagOfWordsFeatureGroup
impl Send for BagOfWordsFeatureGroup
impl Sync for BagOfWordsFeatureGroup
impl Unpin for BagOfWordsFeatureGroup
impl UnwindSafe for BagOfWordsFeatureGroup
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more