pub struct Empty;Expand description
The featurizer returned by empty()
Trait Implementations§
Source§impl<Origin> Ftzr<Origin> for Emptywhere
Self: IterFtzr<Origin>,
impl<Origin> Ftzr<Origin> for Emptywhere
Self: IterFtzr<Origin>,
Source§type TokenGroup = <Empty as IterFtzr<Origin>>::TokenGroup
type TokenGroup = <Empty as IterFtzr<Origin>>::TokenGroup
Type of tokens visited by the featurizer. Usually something like
&'a [T] (for one dimensional data)Source§fn push_tokens<Push>(&self, origin: Origin, push: &mut Push)where
Push: FnMut(Self::TokenGroup),
fn push_tokens<Push>(&self, origin: Origin, push: &mut Push)where
Push: FnMut(Self::TokenGroup),
The main method to implement for the
Ftzr<InputData> trait. Each group of tokens is visited by the FnMut(Self::TokenGroup) function. Read moreSource§fn push_tokens_from<Push, T>(&self, input: InputData, push: &mut Push)
fn push_tokens_from<Push, T>(&self, input: InputData, push: &mut Push)
Identical to
Ftzr::push_tokens, except with implicit coercion via FeatureFrom<Self::TokenGroup> Read moreSource§fn featurize<Feature, A>(&self, input: InputData) -> A
fn featurize<Feature, A>(&self, input: InputData) -> A
The most versatile tool in the entire crate. Read more
Source§fn featurize_x2<A1, T1, A2, T2>(&self, input: InputData) -> (A1, A2)where
Self::TokenGroup: Clone,
A1: Accumulates<T1>,
A2: Accumulates<T2>,
T1: FeatureFrom<Self::TokenGroup>,
T2: FeatureFrom<Self::TokenGroup>,
fn featurize_x2<A1, T1, A2, T2>(&self, input: InputData) -> (A1, A2)where
Self::TokenGroup: Clone,
A1: Accumulates<T1>,
A2: Accumulates<T2>,
T1: FeatureFrom<Self::TokenGroup>,
T2: FeatureFrom<Self::TokenGroup>,
Identical to
Ftzr::featurize, but produces two outputs while still only featurizing the input once. Pretty cool! Read morefn as_fn<X: FeatureFrom<Self::TokenGroup>>( self, ) -> Arc<dyn Fn(InputData) -> Vec<X> + Send + Sync>
Source§impl<'a, T> IterFtzr<&'a [T]> for Empty
impl<'a, T> IterFtzr<&'a [T]> for Empty
Source§type TokenGroup = EmptyAtom
type TokenGroup = EmptyAtom
Type of tokens produced by the featurizer. Usually something like
&'a [T] (for one dimensional data)Source§type Iter = IntoIter<<Empty as IterFtzr<&'a [T]>>::TokenGroup>
type Iter = IntoIter<<Empty as IterFtzr<&'a [T]>>::TokenGroup>
The associated iterator. For example:
NGramIter, MultiFtzrIter, etcSource§fn iterate_features(&self, origin: &'a [T]) -> Self::Iter
fn iterate_features(&self, origin: &'a [T]) -> Self::Iter
Similar to
into_iter, but for featurizers.Source§impl<'a, T, const N: usize> IterFtzr<&'a [T; N]> for Empty
impl<'a, T, const N: usize> IterFtzr<&'a [T; N]> for Empty
Source§type TokenGroup = <Empty as IterFtzr<&'a [T]>>::TokenGroup
type TokenGroup = <Empty as IterFtzr<&'a [T]>>::TokenGroup
Type of tokens produced by the featurizer. Usually something like
&'a [T] (for one dimensional data)Source§type Iter = <Empty as IterFtzr<&'a [T]>>::Iter
type Iter = <Empty as IterFtzr<&'a [T]>>::Iter
The associated iterator. For example:
NGramIter, MultiFtzrIter, etcSource§fn iterate_features(&self, origin: &'a [T; N]) -> Self::Iter
fn iterate_features(&self, origin: &'a [T; N]) -> Self::Iter
Similar to
into_iter, but for featurizers.Source§impl<'a> IterFtzr<&'a String> for Empty
impl<'a> IterFtzr<&'a String> for Empty
Source§type TokenGroup = <Empty as IterFtzr<&'a [u8]>>::TokenGroup
type TokenGroup = <Empty as IterFtzr<&'a [u8]>>::TokenGroup
Type of tokens produced by the featurizer. Usually something like
&'a [T] (for one dimensional data)Source§type Iter = <Empty as IterFtzr<&'a [u8]>>::Iter
type Iter = <Empty as IterFtzr<&'a [u8]>>::Iter
The associated iterator. For example:
NGramIter, MultiFtzrIter, etcSource§fn iterate_features(&self, origin: &'a String) -> Self::Iter
fn iterate_features(&self, origin: &'a String) -> Self::Iter
Similar to
into_iter, but for featurizers.Source§impl<'a, T> IterFtzr<&'a Vec<T>> for Empty
impl<'a, T> IterFtzr<&'a Vec<T>> for Empty
Source§type TokenGroup = <Empty as IterFtzr<&'a [T]>>::TokenGroup
type TokenGroup = <Empty as IterFtzr<&'a [T]>>::TokenGroup
Type of tokens produced by the featurizer. Usually something like
&'a [T] (for one dimensional data)Source§type Iter = <Empty as IterFtzr<&'a [T]>>::Iter
type Iter = <Empty as IterFtzr<&'a [T]>>::Iter
The associated iterator. For example:
NGramIter, MultiFtzrIter, etcSource§fn iterate_features(&self, origin: &'a Vec<T>) -> Self::Iter
fn iterate_features(&self, origin: &'a Vec<T>) -> Self::Iter
Similar to
into_iter, but for featurizers.Source§impl<'a> IterFtzr<&'a str> for Empty
impl<'a> IterFtzr<&'a str> for Empty
Source§type TokenGroup = <Empty as IterFtzr<&'a [u8]>>::TokenGroup
type TokenGroup = <Empty as IterFtzr<&'a [u8]>>::TokenGroup
Type of tokens produced by the featurizer. Usually something like
&'a [T] (for one dimensional data)Source§type Iter = <Empty as IterFtzr<&'a [u8]>>::Iter
type Iter = <Empty as IterFtzr<&'a [u8]>>::Iter
The associated iterator. For example:
NGramIter, MultiFtzrIter, etcSource§fn iterate_features(&self, origin: &'a str) -> Self::Iter
fn iterate_features(&self, origin: &'a str) -> Self::Iter
Similar to
into_iter, but for featurizers.Source§impl LinearFixed for Empty
impl LinearFixed for Empty
Source§fn chunk_size(&self) -> usize
fn chunk_size(&self) -> usize
must be equal to the ‘n’ of an n-gram, or the total stretch of a
GapGram (including both groups and the space between).Source§impl Ord for Empty
impl Ord for Empty
Source§impl PartialOrd for Empty
impl PartialOrd for Empty
impl Copy for Empty
impl Eq for Empty
impl StructuralPartialEq for Empty
Auto Trait Implementations§
impl Freeze for Empty
impl RefUnwindSafe for Empty
impl Send for Empty
impl Sync for Empty
impl Unpin for Empty
impl UnwindSafe for Empty
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