1use thiserror::Error;
2
3#[derive(Error, Debug, Clone, PartialEq, Eq)]
5pub enum BytePairEncoderError {
6 #[error("Error reading file: {0}")]
8 InvalidFile(String),
9
10 #[error("Invalid vocabulary input: Could not parse vocabulary file.")]
12 InvalidVocabularyInput,
13
14 #[error("Error decompressing vocabulary data: {0}")]
16 DecompressionError(String),
17
18 #[error("Error deserializing vocabulary data: {0}")]
20 DeserializationError(String),
21
22 #[error("Error, must enable defualt-small, default-medium, and/or default-large feature(s) to use default vocabulary.")]
24 NoDefaultVocabFeature,
25}