crftag 0.1.0

CRF-based POS tagger and shallow parser (chunker) built on crfrs
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use thiserror::Error;

/// Errors produced by crftag operations.
#[derive(Debug, Error)]
pub enum Error {
    /// The model has not been loaded yet.
    #[error("model is not loaded — call load_model() first")]
    ModelNotLoaded,
    /// Underlying CRF error.
    #[error(transparent)]
    Crf(#[from] crfrs::Error),
}

/// A specialized `Result` type for crftag operations.
pub type Result<T> = std::result::Result<T, Error>;