pub trait SentenceDecoder {
    type Encoding: ToOwned;
    type Error: Error;

    // Required method
    fn decode<S>(
        &self,
        labels: &[S],
        sentence: &mut Sentence
    ) -> Result<(), Self::Error>
       where S: AsRef<[EncodingProb<Self::Encoding>]>;
}
Expand description

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.

Required Associated Types§

source

type Encoding: ToOwned

source

type Error: Error

The decoding error type.

Required Methods§

source

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

Implementors§