pub struct HeuristicClassifier { /* private fields */ }Expand description
Fast classifier based entirely on language-agnostic structural signals.
No keyword matching. Works identically for English, Korean, Japanese, or any other language. Signals used:
| Signal | What it measures |
|---|---|
| Message length | Longer = more complex request |
| Line count | Multi-line = structured request |
| Code blocks (```) | Code-related task |
| File paths | File operation task |
| Symbol density | Technical/code content |
| Question form (?) | Likely Q&A → lower tier |
| Single sentence | Simple → lower tier |
| Context tokens | Rich conversation → higher |
| Turn count | More turns → richer context |
Produces a score in [0.0, 1.0]:
≤ 0.3→ simple Q&A, greeting, single-line →Lowtier0.3–0.7→ moderate →Mediumtier≥ 0.7→ complex, multi-file, code-heavy →Hightier
Implementations§
Trait Implementations§
Source§impl Clone for HeuristicClassifier
impl Clone for HeuristicClassifier
Source§fn clone(&self) -> HeuristicClassifier
fn clone(&self) -> HeuristicClassifier
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for HeuristicClassifier
impl Debug for HeuristicClassifier
Auto Trait Implementations§
impl Freeze for HeuristicClassifier
impl RefUnwindSafe for HeuristicClassifier
impl Send for HeuristicClassifier
impl Sync for HeuristicClassifier
impl Unpin for HeuristicClassifier
impl UnsafeUnpin for HeuristicClassifier
impl UnwindSafe for HeuristicClassifier
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