Trait syntaxdot_encoders::SentenceEncoder
source · pub trait SentenceEncoder {
type Encoding;
type Error: Error;
// Required method
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.