pub enum EvalTask {
NER {
labels: Vec<String>,
mode: EvalMode,
},
RelationExtraction {
relations: Vec<String>,
require_entity_match: bool,
},
Coreference {
metrics: Vec<CorefMetric>,
},
DiscontinuousNER {
labels: Vec<String>,
},
EventExtraction {
event_types: Vec<String>,
argument_roles: Vec<String>,
},
}Expand description
Evaluation task type.
Clarifies what capability is being evaluated, since the same model may support multiple tasks with different metrics.
§Example
use anno_eval::eval::{EvalTask, EvalMode};
let task = EvalTask::NER {
labels: vec!["PER", "ORG", "LOC"].into_iter().map(String::from).collect(),
mode: EvalMode::Strict,
};
match task {
EvalTask::NER { labels, mode } => {
println!("NER with {} entity types, {:?} mode", labels.len(), mode);
}
_ => {}
}Variants§
NER
Named Entity Recognition: span extraction with type classification.
Input: Text → Output: Vec<Entity>
Metrics: Precision, Recall, F1 (Strict/Exact/Partial/Type modes)
Fields
RelationExtraction
Relation Extraction: entity pairs with relation types.
Input: Text → Output: Vec<(Entity, Relation, Entity)>
Metrics: Relation F1 (with/without entity correctness)
Fields
Coreference
Coreference Resolution: mention clustering.
Input: Text → Output: Vec<CorefChain>
Metrics: MUC, B³, CEAF-e/m, LEA, BLANC, CoNLL F1
Fields
metrics: Vec<CorefMetric>Which coreference metrics to compute
DiscontinuousNER
Discontinuous NER: non-contiguous span extraction.
Input: Text → Output: Vec<DiscontinuousEntity>
Metrics: Same as NER but with discontinuous span matching
EventExtraction
Event Extraction: event triggers and arguments.
Input: Text → Output: Events with trigger and argument spans
Metrics: Trigger F1, Argument F1, Event F1
Trait Implementations§
Source§impl<'de> Deserialize<'de> for EvalTask
impl<'de> Deserialize<'de> for EvalTask
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for EvalTask
impl StructuralPartialEq for EvalTask
Auto Trait Implementations§
impl Freeze for EvalTask
impl RefUnwindSafe for EvalTask
impl Send for EvalTask
impl Sync for EvalTask
impl Unpin for EvalTask
impl UnsafeUnpin for EvalTask
impl UnwindSafe for EvalTask
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
impl<T> ErasedDestructor for Twhere
T: 'static,
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>
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>
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