pub struct CorefLoader { /* private fields */ }Expand description
Loader for coreference datasets.
This is a thin wrapper around DatasetLoader that provides coreference-specific
loading methods. For most use cases, you can use DatasetLoader::load_coref() directly.
Implementations§
Source§impl CorefLoader
impl CorefLoader
Sourcepub fn with_cache_dir(cache_dir: impl Into<PathBuf>) -> Result<Self>
pub fn with_cache_dir(cache_dir: impl Into<PathBuf>) -> Result<Self>
Create loader with custom cache directory.
Sourcepub fn load_gap(&self) -> Result<Vec<CorefDocument>>
pub fn load_gap(&self) -> Result<Vec<CorefDocument>>
Load GAP dataset as coreference documents.
Sourcepub fn load_gap_examples(&self) -> Result<Vec<GapExample>>
pub fn load_gap_examples(&self) -> Result<Vec<GapExample>>
Load GAP as raw examples (for detailed analysis).
Sourcepub fn load_preco(&self) -> Result<Vec<CorefDocument>>
pub fn load_preco(&self) -> Result<Vec<CorefDocument>>
Load PreCo dataset as coreference documents.
Sourcepub fn load_corefud_from_path(
&self,
path: impl AsRef<Path>,
) -> Result<Vec<CorefDocument>>
pub fn load_corefud_from_path( &self, path: impl AsRef<Path>, ) -> Result<Vec<CorefDocument>>
Load a CorefUD CoNLL-U file from an explicit local path (no caching, no network).
This is the easiest way to run CorefUD experiments without wiring up downloads:
download/extract the desired *.conllu locally and point this method at it.
Sourcepub fn dataset_loader(&self) -> &DatasetLoader
pub fn dataset_loader(&self) -> &DatasetLoader
Get the underlying DatasetLoader.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for CorefLoader
impl RefUnwindSafe for CorefLoader
impl Send for CorefLoader
impl Sync for CorefLoader
impl Unpin for CorefLoader
impl UnsafeUnpin for CorefLoader
impl UnwindSafe for CorefLoader
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
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