[][src]Trait sticker_encoders::SentenceEncoder

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

type Encoding

type Error: Error

The encoding error type.

Loading content...

Required methods

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

Encode the given sentence.

Loading content...

Implementors

impl SentenceEncoder for RelativePOSEncoder[src]

type Encoding = DependencyEncoding<RelativePOS>

type Error = EncodeError

impl SentenceEncoder for RelativePositionEncoder[src]

type Encoding = DependencyEncoding<RelativePosition>

type Error = EncodeError

impl SentenceEncoder for LayerEncoder[src]

type Encoding = String

type Error = EncodeError

impl SentenceEncoder for EditTreeEncoder[src]

type Encoding = EditTree<char>

type Error = EncodeError

impl SentenceEncoder for TdzLemmaEncoder[src]

type Encoding = <EditTreeEncoder as SentenceEncoder>::Encoding

type Error = <EditTreeEncoder as SentenceEncoder>::Error

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

type Error = E::Error

Loading content...