pub struct ErrorClassifier { /* private fields */ }Expand description
Keyword-based classifier for shell errors.
Maps error message keywords to the 24 error categories. Used as fallback when ML model is not trained.
Implementations§
Source§impl ErrorClassifier
impl ErrorClassifier
Sourcepub fn classify_by_keywords(&self, message: &str) -> ErrorCategory
pub fn classify_by_keywords(&self, message: &str) -> ErrorCategory
Classify an error message by keywords.
Sourcepub fn confidence(&self, message: &str, category: ErrorCategory) -> f32
pub fn confidence(&self, message: &str, category: ErrorCategory) -> f32
Calculate confidence based on keyword matches.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ErrorClassifier
impl RefUnwindSafe for ErrorClassifier
impl Send for ErrorClassifier
impl Sync for ErrorClassifier
impl Unpin for ErrorClassifier
impl UnsafeUnpin for ErrorClassifier
impl UnwindSafe for ErrorClassifier
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more