#[non_exhaustive]pub enum Error {
Format {
line: usize,
message: String,
},
Structure(String),
Io(Error),
Chunker(String),
Model(String),
Dictionary(String),
Embedded(String),
Parser(String),
Schema(String),
}Expand description
An error of this crate.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Format
The input is not in the lattice format.
Structure(String)
A sentence is not one the lattice format can hold: its bunsetsu do not cover its morphemes, a head or a position is out of range, or a string holds a tab or a line break.
Io(Error)
Reading or writing failed.
Chunker(String)
The chunker was given something it cannot use: a template or a list of columns that cannot be read, weights that are not finite, or training data that cannot be trained on.
Model(String)
Bytes are not a model file this crate reads: another magic number or version, bytes that end early or go on after the end, or content that is not what the format says.
Dictionary(String)
A model was used with another dictionary than the one it was trained for: the name of the dictionary differs, or a morpheme has fewer feature columns than the schema of the model reads.
Embedded(String)
No model is embedded in the build for the dictionary asked for: no feature embeds one for it, the build is without the feature, or it is a documentation build, which embeds an empty file.
Parser(String)
The parser was given something it cannot use: a feature set that cannot be read, or weights that are not finite.
Schema(String)
A schema was given something it cannot hold: rules of normalization that are not a table.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()