[][src]Trait sticker_encoders::SentenceEncoder

pub trait SentenceEncoder {
    type Encoding;
    fn encode(&self, sentence: &Sentence) -> Result<Vec<Self::Encoding>, Error>;
}

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.

Associated Types

Loading content...

Required methods

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

Encode the given sentence.

Loading content...

Implementors

impl SentenceEncoder for RelativePOSEncoder[src]

impl SentenceEncoder for RelativePositionEncoder[src]

impl SentenceEncoder for LayerEncoder[src]

type Encoding = String

impl SentenceEncoder for EditTreeEncoder[src]

type Encoding = EditTree<char>

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

type Encoding = usize

Loading content...