[][src]Enum sticker_encoders::deprel::EncodeError

pub enum EncodeError {
    MissingHead {
        token: usize,
        sent: Vec<String>,
    },
    MissingPOS {
        sent: Vec<String>,
        token: usize,
    },
    MissingRelation {
        token: usize,
        sent: Vec<String>,
    },
}

Encoder errors.

Variants

MissingHead

The token does not have a head.

Fields of MissingHead

token: usizesent: Vec<String>
MissingPOS

The token's head does not have a part-of-speech.

Fields of MissingPOS

sent: Vec<String>token: usize
MissingRelation

The token does not have a dependency relation.

Fields of MissingRelation

token: usizesent: Vec<String>

Implementations

impl EncodeError[src]

pub fn missing_head(token: usize, sentence: &Sentence) -> EncodeError[src]

Construct EncodeError::MissingHead from a CoNLL-X graph.

Construct an error. token is the node index for which the error applies in sentence.

pub fn missing_pos(token: usize, sentence: &Sentence) -> EncodeError[src]

Construct EncodeError::MissingPOS from a CoNLL-X graph.

Construct an error. token is the node index for which the error applies in sentence.

pub fn missing_relation(token: usize, sentence: &Sentence) -> EncodeError[src]

Construct EncodeError::MissingRelation from a CoNLL-X graph.

Construct an error. token is the node index for which the error applies in sentence.

Trait Implementations

impl Clone for EncodeError[src]

impl Debug for EncodeError[src]

impl Display for EncodeError[src]

impl Eq for EncodeError[src]

impl Error for EncodeError[src]

impl PartialEq<EncodeError> for EncodeError[src]

impl StructuralEq for EncodeError[src]

impl StructuralPartialEq for EncodeError[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.