pub struct LoadedDataset {
pub id: DatasetId,
pub sentences: Vec<AnnotatedSentence>,
pub loaded_at: String,
pub source_url: String,
pub data_source: DataSource,
pub temporal_metadata: Option<TemporalMetadata>,
pub metadata: DatasetMetadata,
}Expand description
A loaded dataset with metadata.
Fields§
§id: DatasetIdDataset identifier.
sentences: Vec<AnnotatedSentence>Annotated sentences.
loaded_at: StringWhen the dataset was loaded.
source_url: StringSource URL.
data_source: DataSourceWhere the data was actually loaded from.
temporal_metadata: Option<TemporalMetadata>Optional temporal metadata for temporal stratification
metadata: DatasetMetadataDataset provenance and attribution metadata.
Implementations§
Source§impl LoadedDataset
impl LoadedDataset
Sourcepub fn entity_count(&self) -> usize
pub fn entity_count(&self) -> usize
Total number of entities.
Sourcepub fn entity_counts_by_type(&self) -> HashMap<String, usize>
pub fn entity_counts_by_type(&self) -> HashMap<String, usize>
Count entities by type.
Sourcepub fn stats(&self) -> DatasetStats
pub fn stats(&self) -> DatasetStats
Get statistics summary.
Sourcepub fn to_test_cases(&self) -> Vec<(String, Vec<GoldEntity>)>
pub fn to_test_cases(&self) -> Vec<(String, Vec<GoldEntity>)>
Convert to test cases format for evaluation.
Trait Implementations§
Source§impl Clone for LoadedDataset
impl Clone for LoadedDataset
Source§fn clone(&self) -> LoadedDataset
fn clone(&self) -> LoadedDataset
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 LoadedDataset
impl Debug for LoadedDataset
Source§impl<'de> Deserialize<'de> for LoadedDataset
impl<'de> Deserialize<'de> for LoadedDataset
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for LoadedDataset
impl RefUnwindSafe for LoadedDataset
impl Send for LoadedDataset
impl Sync for LoadedDataset
impl Unpin for LoadedDataset
impl UnsafeUnpin for LoadedDataset
impl UnwindSafe for LoadedDataset
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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>
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