#[non_exhaustive]pub enum Task {
Show 13 variants
NER,
IntraDocCoref,
InterDocCoref,
NED,
RelationExtraction,
EventExtraction,
DiscontinuousNER,
VisualNER,
TemporalNER,
AspectExtraction,
SlotFilling,
POS,
DependencyParsing,
}Expand description
The primary NLP task a dataset is designed for.
A dataset may support multiple tasks (e.g., NER + Entity Linking), but has one primary task that determines its structure.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
NER
Named Entity Recognition (sequence labeling)
IntraDocCoref
Intra-document coreference resolution
InterDocCoref
Inter-document (cross-document) coreference resolution
NED
Named Entity Disambiguation / Entity Linking to KB
RelationExtraction
Relation Extraction between entities
EventExtraction
Event extraction and argument role labeling
DiscontinuousNER
Discontinuous/nested NER (e.g., CADEC, ShARe)
VisualNER
Visual document NER (forms, receipts, etc.)
TemporalNER
Temporal NER (diachronic entities, time expressions)
AspectExtraction
Sentiment/opinion target extraction
SlotFilling
Slot filling for dialogue systems
POS
Part-of-speech tagging (often bundled with NER)
DependencyParsing
Dependency parsing
Implementations§
Source§impl Task
impl Task
Sourcepub const fn produces_entities(&self) -> bool
pub const fn produces_entities(&self) -> bool
Returns true if this task produces entity spans.
Sourcepub const fn involves_coreference(&self) -> bool
pub const fn involves_coreference(&self) -> bool
Returns true if this task involves coreference chains.
Sourcepub const fn involves_kb_linking(&self) -> bool
pub const fn involves_kb_linking(&self) -> bool
Returns true if this task links to external knowledge bases.
Sourcepub const fn involves_relations(&self) -> bool
pub const fn involves_relations(&self) -> bool
Returns true if this task extracts relations between entities.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Task
impl<'de> Deserialize<'de> for Task
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>,
Source§impl FromStr for Task
impl FromStr for Task
Source§fn from_str(s: &str) -> Result<Self, Self::Err>
fn from_str(s: &str) -> Result<Self, Self::Err>
Parse task from string (case-insensitive, supports common aliases).
§Examples
use anno_core::core::dataset::Task;
assert_eq!("ner".parse::<Task>().unwrap(), Task::NER);
assert_eq!("coref".parse::<Task>().unwrap(), Task::IntraDocCoref);
assert_eq!("entity_linking".parse::<Task>().unwrap(), Task::NED);
assert_eq!("RE".parse::<Task>().unwrap(), Task::RelationExtraction);