[][src]Trait sticker_encoders::SentenceDecoder

pub trait SentenceDecoder {
    type Encoding: ToOwned;
    type Error: Error;
    fn decode<S>(
        &self,
        labels: &[S],
        sentence: &mut Sentence
    ) -> Result<(), Self::Error>
    where
        S: AsRef<[EncodingProb<Self::Encoding>]>
; }

Trait for sentence decoders.

A sentence decoder adds a representation to each token in a sentence, such as a part-of-speech tag or a topological field.

Associated Types

type Encoding: ToOwned

type Error: Error

The decoding error type.

Loading content...

Required methods

fn decode<S>(
    &self,
    labels: &[S],
    sentence: &mut Sentence
) -> Result<(), Self::Error> where
    S: AsRef<[EncodingProb<Self::Encoding>]>, 

Loading content...

Implementors

impl SentenceDecoder for RelativePOSEncoder[src]

type Encoding = DependencyEncoding<RelativePOS>

type Error = Infallible

impl SentenceDecoder for RelativePositionEncoder[src]

type Encoding = DependencyEncoding<RelativePosition>

type Error = Infallible

impl SentenceDecoder for LayerEncoder[src]

type Encoding = String

type Error = Infallible

impl SentenceDecoder for EditTreeEncoder[src]

type Encoding = EditTree<char>

type Error = Infallible

impl SentenceDecoder for TdzLemmaEncoder[src]

type Encoding = <EditTreeEncoder as SentenceDecoder>::Encoding

type Error = <EditTreeEncoder as SentenceDecoder>::Error

impl<D, M> SentenceDecoder for CategoricalEncoder<D, D::Encoding, M> where
    D: SentenceDecoder,
    D::Encoding: Clone + Eq + Hash,
    M: Number<D::Encoding>, 
[src]

type Encoding = usize

type Error = D::Error

Loading content...