[−][src]Struct sticker_encoders::categorical::CategoricalEncoder
An encoder wrapper that encodes/decodes to a categorical label.
Implementations
impl<E, V, M> CategoricalEncoder<E, V, M> where
V: Clone + Eq + Hash,
M: Number<V>,
[src]
V: Clone + Eq + Hash,
M: Number<V>,
impl<D, M> CategoricalEncoder<D, D::Encoding, M> where
D: SentenceDecoder,
D::Encoding: Clone + Eq + Hash + ToOwned,
M: Number<D::Encoding>,
[src]
D: SentenceDecoder,
D::Encoding: Clone + Eq + Hash + ToOwned,
M: Number<D::Encoding>,
pub fn decode_without_inner<S>(
&self,
labels: &[S]
) -> Vec<Vec<EncodingProb<D::Encoding>>> where
S: AsRef<[EncodingProb<usize>]>,
[src]
&self,
labels: &[S]
) -> Vec<Vec<EncodingProb<D::Encoding>>> where
S: AsRef<[EncodingProb<usize>]>,
Decode without applying the inner decoder.
impl<E, V, M> CategoricalEncoder<E, V, M> where
V: Clone + Eq + Hash,
M: Number<V>,
[src]
V: Clone + Eq + Hash,
M: Number<V>,
Trait Implementations
impl<'de, E, V, M> Deserialize<'de> for CategoricalEncoder<E, V, M> where
V: Clone + Eq + Hash,
M: Number<V>,
E: Deserialize<'de>,
M: Deserialize<'de>,
[src]
V: Clone + Eq + Hash,
M: Number<V>,
E: Deserialize<'de>,
M: Deserialize<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl<D, M> SentenceDecoder for CategoricalEncoder<D, D::Encoding, M> where
D: SentenceDecoder,
D::Encoding: Clone + Eq + Hash,
M: Number<D::Encoding>,
[src]
D: SentenceDecoder,
D::Encoding: Clone + Eq + Hash,
M: Number<D::Encoding>,
type Encoding = usize
type Error = D::Error
The decoding error type.
fn decode<S>(
&self,
labels: &[S],
sentence: &mut Sentence
) -> Result<(), Self::Error> where
S: AsRef<[EncodingProb<Self::Encoding>]>,
[src]
&self,
labels: &[S],
sentence: &mut Sentence
) -> Result<(), Self::Error> where
S: AsRef<[EncodingProb<Self::Encoding>]>,
impl<E, M> SentenceEncoder for CategoricalEncoder<E, E::Encoding, M> where
E: SentenceEncoder,
E::Encoding: Clone + Eq + Hash,
M: Number<E::Encoding>,
[src]
E: SentenceEncoder,
E::Encoding: Clone + Eq + Hash,
M: Number<E::Encoding>,
type Encoding = usize
type Error = E::Error
The encoding error type.
fn encode(
&self,
sentence: &Sentence
) -> Result<Vec<Self::Encoding>, Self::Error>
[src]
&self,
sentence: &Sentence
) -> Result<Vec<Self::Encoding>, Self::Error>
impl<E, V, M> Serialize for CategoricalEncoder<E, V, M> where
V: Clone + Eq + Hash,
M: Number<V>,
E: Serialize,
M: Serialize,
[src]
V: Clone + Eq + Hash,
M: Number<V>,
E: Serialize,
M: Serialize,
Auto Trait Implementations
impl<E, V, M> RefUnwindSafe for CategoricalEncoder<E, V, M> where
E: RefUnwindSafe,
M: RefUnwindSafe,
V: RefUnwindSafe,
E: RefUnwindSafe,
M: RefUnwindSafe,
V: RefUnwindSafe,
impl<E, V, M> Send for CategoricalEncoder<E, V, M> where
E: Send,
M: Send,
V: Send,
E: Send,
M: Send,
V: Send,
impl<E, V, M> Sync for CategoricalEncoder<E, V, M> where
E: Sync,
M: Sync,
V: Sync,
E: Sync,
M: Sync,
V: Sync,
impl<E, V, M> Unpin for CategoricalEncoder<E, V, M> where
E: Unpin,
M: Unpin,
V: Unpin,
E: Unpin,
M: Unpin,
V: Unpin,
impl<E, V, M> UnwindSafe for CategoricalEncoder<E, V, M> where
E: UnwindSafe,
M: UnwindSafe,
V: UnwindSafe,
E: UnwindSafe,
M: UnwindSafe,
V: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
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, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,