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>]>
; }
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§

The decoding error type.

Required Methods§

Implementors§