Trait syntaxdot_encoders::SentenceEncoder [−][src]
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>, Self::Error>
[src]
&self,
sentence: &Sentence
) -> Result<Vec<Self::Encoding>, Self::Error>
Encode the given sentence.
Implementors
impl SentenceEncoder for RelativePOSEncoder
[src]
type Encoding = DependencyEncoding<RelativePOS>
type Error = EncodeError
fn encode(
&self,
sentence: &Sentence
) -> Result<Vec<Self::Encoding>, Self::Error>
[src]
&self,
sentence: &Sentence
) -> Result<Vec<Self::Encoding>, Self::Error>
impl SentenceEncoder for RelativePositionEncoder
[src]
type Encoding = DependencyEncoding<RelativePosition>
type Error = EncodeError
fn encode(
&self,
sentence: &Sentence
) -> Result<Vec<Self::Encoding>, Self::Error>
[src]
&self,
sentence: &Sentence
) -> Result<Vec<Self::Encoding>, Self::Error>
impl SentenceEncoder for LayerEncoder
[src]
type Encoding = String
type Error = EncodeError
fn encode(
&self,
sentence: &Sentence
) -> Result<Vec<Self::Encoding>, Self::Error>
[src]
&self,
sentence: &Sentence
) -> Result<Vec<Self::Encoding>, Self::Error>
impl SentenceEncoder for EditTreeEncoder
[src]
type Encoding = EditTree
type Error = EncodeError
fn encode(
&self,
sentence: &Sentence
) -> Result<Vec<Self::Encoding>, Self::Error>
[src]
&self,
sentence: &Sentence
) -> Result<Vec<Self::Encoding>, Self::Error>
impl SentenceEncoder for TdzLemmaEncoder
[src]
type Encoding = <EditTreeEncoder as SentenceEncoder>::Encoding
type Error = <EditTreeEncoder as SentenceEncoder>::Error
fn encode(
&self,
sentence: &Sentence
) -> Result<Vec<Self::Encoding>, Self::Error>
[src]
&self,
sentence: &Sentence
) -> Result<Vec<Self::Encoding>, Self::Error>
impl<E, M> SentenceEncoder for CategoricalEncoder<E, E::Encoding, M> where
E: SentenceEncoder,
E::Encoding: Clone + Eq + Hash,
M: Number<E::Encoding>,
[src]
E: SentenceEncoder,
E::Encoding: Clone + Eq + Hash,
M: Number<E::Encoding>,