#[non_exhaustive]pub enum Task {
Show 19 variants
NER,
NED,
RelationExtraction,
IntraDocCoref,
InterDocCoref,
AbstractAnaphora,
DiscontinuousNER,
EventExtraction,
TextClassification,
SentimentAnalysis,
PosTagging,
MachineTranslation,
LanguageModeling,
Temporal,
HierarchicalExtraction,
DiscourseRelations,
DiscourseCoherence,
DiscourseSegmentation,
SpeechActClassification,
}Expand description
Information extraction and NLP tasks supported by anno.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
NER
Named Entity Recognition: extract entity spans with types
NED
Named Entity Disambiguation: link entities to knowledge bases
RelationExtraction
Relation Extraction: extract entity-relation-entity triples
IntraDocCoref
Intra-document Coreference: resolve mentions within a document
InterDocCoref
Inter-document Coreference: resolve mentions across documents
AbstractAnaphora
Abstract Anaphora: resolve pronouns to events/propositions
DiscontinuousNER
Discontinuous NER: extract non-contiguous entity spans
EventExtraction
Event Extraction: extract event triggers and arguments
TextClassification
Text Classification: classify entire text or spans
SentimentAnalysis
Sentiment analysis (a specialization of text classification)
PosTagging
Part-of-speech tagging
MachineTranslation
Machine translation
LanguageModeling
Language modeling
Temporal
Temporal extraction / temporal information (catalogued from registries).
Note: this is distinct from HierarchicalExtraction. Some registries use “temporal”
to mean time expressions, event ordering, or temporal relations; we keep it separate
so we don’t mislabel temporal datasets as hierarchical.
HierarchicalExtraction
Hierarchical Structure Extraction: extract nested structures
DiscourseRelations
Discourse relations (e.g., PDTB-style)
DiscourseCoherence
Discourse coherence / coherence modeling
DiscourseSegmentation
Discourse segmentation
SpeechActClassification
Speech act classification (dialogue acts)
Implementations§
Source§impl Task
impl Task
Sourcepub fn from_code(code: &str) -> Option<Self>
pub fn from_code(code: &str) -> Option<Self>
Parse task from short code string.
Supports many common aliases used in dataset registry:
- NER: “ner”, “sequence_labeling”, “nested-ner”, “mner”, “pii_detection”, “slot_filling”
- NED: “ned”, “el”, “entity_linking”, “entity-linking”
- RelationExtraction: “re”, “relation_extraction”, “relation-extraction”
- IntraDocCoref: “coref”, “intra-coref”, “intra_coref”
- InterDocCoref: “inter-coref”, “inter_coref”, “cdcr”, “event_coref”
- AbstractAnaphora: “abstract-anaphora”, “abstract_anaphora”, “bridging”, “discourse_deixis”
- DiscontinuousNER: “discontinuous-ner”, “discontinuous_ner”, “dner”
- EventExtraction: “events”, “event_extraction”, “event-extraction”
- TextClassification: “classification”, “text-classification”, “bias_evaluation”, “qa”, “harmonic_analysis”
- Temporal: “temporal”, “timex”
- HierarchicalExtraction: “hierarchical”
Sourcepub fn is_ner_family(&self) -> bool
pub fn is_ner_family(&self) -> bool
Check if this task is in the NER family (NER, discontinuous NER, NED).
Sourcepub fn is_coref_family(&self) -> bool
pub fn is_coref_family(&self) -> bool
Check if this task is in the coreference family.
Trait Implementations§
impl Copy for Task
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>,
impl Eq for Task
impl StructuralPartialEq for Task
Auto Trait Implementations§
impl Freeze for Task
impl RefUnwindSafe for Task
impl Send for Task
impl Sync for Task
impl Unpin for Task
impl UnsafeUnpin for Task
impl UnwindSafe for Task
Blanket Implementations§
impl<T> Boilerplate for T
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