#[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<Task, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Task, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl FromStr for Task
impl FromStr for Task
Source§fn from_str(s: &str) -> Result<Task, <Task as FromStr>::Err>
fn from_str(s: &str) -> Result<Task, <Task as FromStr>::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);Source§impl Serialize for Task
impl Serialize for Task
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl Copy for Task
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§
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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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<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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
CompactString. Read moreSource§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.