pub struct CharApproxCounter;Expand description
Char-count approximation: 4 chars ≈ 1 token. Used when no real tokeniser is available. More accurate than byte-count for CJK text (3 bytes/char but ~0.5 tokens/char).
Trait Implementations§
Source§impl TokenCounter for CharApproxCounter
impl TokenCounter for CharApproxCounter
Auto Trait Implementations§
impl Freeze for CharApproxCounter
impl RefUnwindSafe for CharApproxCounter
impl Send for CharApproxCounter
impl Sync for CharApproxCounter
impl Unpin for CharApproxCounter
impl UnsafeUnpin for CharApproxCounter
impl UnwindSafe for CharApproxCounter
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