sileod commited on
Commit
a373c06
·
verified ·
1 Parent(s): a1269b3

Document the extraction config

Browse files
Files changed (1) hide show
  1. extraction/README.md +24 -0
extraction/README.md ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ## Extraction config
2
+
3
+ `load_dataset("tasksource/tasksource-jev-typed-decisions", "extraction")`: one text and several typed fields to fill from it, answered in one
4
+ pass, as extraction models (e.g. Cloudflare's Clairic) are asked. Rows: 209,452 train, 14,065 validation, 13,842 test.
5
+
6
+ - `state`: the text. `fields`: `[{name, type, instruction}]`; `type` is `text` (one span; the instruction is
7
+ a question) or `list` (every span of a kind, e.g. every person).
8
+ - `answers`: one per field, in order: `{null, values: [{text, start, end}]}`, character offsets into
9
+ `state` (`state[start:end] == text`, checked for every span). `null` means the text does not hold the
10
+ answer (an unanswerable question, an absent entity type). Several values of a `text` field are
11
+ alternative gold spans; of a `list` field, every item.
12
+ - Extractive question answering (SQuAD 2.0, AdversarialQA, Natural Questions, HotpotQA, Quoref, MuSiQue,
13
+ DROP single-span, DuoRC verbatim spans, ConcurrentQA, FairytaleQA explicit spans) groups the questions
14
+ asked about one context, up to 8 fields per row.
15
+ Named entities (CoNLL-2003, OntoNotes, WNUT-17, Few-NERD, NCBI-disease, JNLPBA, acronyms, FiNER-139
16
+ and astronomy, biomedical, financial, software, legal, GUM, Twitter and English opinion-target sources)
17
+ ask for every entity type of the dataset, or the types present plus absent ones up to 8.
18
+ Entity texts are the source tokens joined by spaces.
19
+ - Native splits, except those without released labels; evaluation texts that also occur in training are dropped. Each source is capped at
20
+ 10,000 training rows and 500 per evaluation split. `license`/`license_use` per row;
21
+ `metadata` keeps source question ids or entity types. See [build-manifest.json](build-manifest.json).
22
+
23
+ The same question answering sources load in SQuAD format for `AutoModelForQuestionAnswering` with
24
+ `tasksource.load_task(id, extractive=True)`.