pub trait SentenceEncoder {
    type Encoding;
    type Error: Error;

    fn encode(
        &self,
        sentence: &Sentence
    ) -> Result<Vec<Self::Encoding>, Self::Error>; }
Expand description

Trait for sentence encoders.

A sentence encoder extracts a representation of each token in a sentence, such as a part-of-speech tag or a topological field.

Required Associated Types§

The encoding error type.

Required Methods§

Encode the given sentence.

Implementors§