pub struct W2NERConfig {
pub threshold: f64,
pub entity_labels: Vec<String>,
pub allow_nested: bool,
pub allow_discontinuous: bool,
pub model_id: String,
}Expand description
Configuration for W2NER decoding.
§Tokenization
W2NER uses whitespace tokenization (split_whitespace()), which works
for Latin-script languages but fails for CJK/Thai/Lao. See module-level
docs for details and workarounds.
Fields§
§threshold: f64Confidence threshold for grid predictions
entity_labels: Vec<String>Entity type labels (maps grid channels to types)
allow_nested: boolWhether to extract nested entities
allow_discontinuous: boolWhether to extract discontinuous entities.
Note: Currently, discontinuous decoding is not fully implemented.
This flag exists for forward-compatibility; setting it to true does
not yet produce true discontinuous spans. See backend-02 in docs.
model_id: StringModel identifier for loading
Trait Implementations§
Source§impl Clone for W2NERConfig
impl Clone for W2NERConfig
Source§fn clone(&self) -> W2NERConfig
fn clone(&self) -> W2NERConfig
Returns a duplicate of the value. Read more
1.0.0 · 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 W2NERConfig
impl Debug for W2NERConfig
Auto Trait Implementations§
impl Freeze for W2NERConfig
impl RefUnwindSafe for W2NERConfig
impl Send for W2NERConfig
impl Sync for W2NERConfig
impl Unpin for W2NERConfig
impl UnsafeUnpin for W2NERConfig
impl UnwindSafe for W2NERConfig
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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