Skip to main content

Module coref_loader

Module coref_loader 

Source
Expand description

Coreference dataset loading and parsing.

Provides specialized loaders for coreference datasets that return CorefDocument structures rather than NER annotations.

§Supported Datasets

DatasetFormatSizeFeatures
GAPTSV8,908 pairsGender-balanced pronoun resolution
PreCoJSON~38k docsLarge-scale, includes singletons
SyntheticGeneratedConfigurableFor testing metrics

§Example

use anno_eval::eval::coref_loader::{CorefLoader, synthetic_coref_dataset};

// Load GAP development set (requires eval feature for download)
let loader = CorefLoader::new().unwrap();
let docs = loader.load_gap().unwrap();

// Or generate synthetic data for testing
let synthetic = synthetic_coref_dataset(10);

Structs§

CorefLoader
Loader for coreference datasets.
GapExample
A single GAP example (pronoun-name pair).
PreCoDocument
A PreCo document with coreference annotations.

Functions§

adversarial_coref_examples
Generate adversarial coreference examples.
domain_specific_coref_dataset
Generate domain-specific synthetic coreference documents.
parse_bookcoref_json
Parse BookCoref JSON/JSONL format.
parse_corefud_conllu
Parse CorefUD CoNLL-U format into coreference documents.
parse_ecb_plus_coref
Parse ECB+ coreference from any supported format.
parse_ecb_plus_zip
Parse ECB+ from the real XML zip archive (ECB+.zip).
parse_gap_tsv
Parse GAP TSV format.
parse_preco_json
Parse PreCo JSON format. Parse PreCo JSON format (public for use by DatasetLoader).
synthetic_coref_dataset
Generate synthetic coreference documents for testing.