lara-martin
commited on
Commit
•
c4951d3
1
Parent(s):
bb202c5
Information on calling through the API + added details
Browse files
README.md
CHANGED
@@ -26,7 +26,8 @@ paperswithcode_id: scifi-tv-plots
|
|
26 |
## Table of Contents
|
27 |
- [Dataset Description](#dataset-description)
|
28 |
- [Format](#format)
|
29 |
-
- [Dataset
|
|
|
30 |
- [Files in _OriginalStoriesSeparated_ Directory](#original-stories)
|
31 |
- [Additional Information](#additional-information)
|
32 |
- [Citation](#citation)
|
@@ -52,37 +53,59 @@ Total: 2276 stories
|
|
52 |
|
53 |
Dataset is "eventified" and generalized (see LJ Martin, P Ammanabrolu, X Wang, W Hancock, S Singh, B Harrison, and MO Riedl. Event Representations for Automated Story Generation with Deep Neural Nets, Thirty-Second AAAI Conference on Artificial Intelligence (AAAI), 2018. for details on these processes.) and split into train-test-validation sets—separated by story so that full stories will stay together—for converting events into full sentences.
|
54 |
|
55 |
-
|
|
|
56 |
| Dataset Split | Number of Stories in Split | Number of Sentences in Split |
|
57 |
| ------------- |--------------------------- |----------------------------- |
|
58 |
-
| Train |
|
59 |
| Validation | 194 | 32,855 |
|
60 |
| Test | 450 | 30,938 |
|
61 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
62 |
---
|
63 |
-
## Dataset Structure
|
64 |
* File names: scifi-val.txt, scifi-test.txt, & scifi-train.txt
|
65 |
* Each sentence of the stories are split into smaller sentences and the events are extracted.
|
66 |
* Each line of the file contains information about a single sentence, delimited by "|||". Each line contains, in order:
|
67 |
* The story number
|
68 |
* The line number (within the story)
|
69 |
-
* 5-tuple events in a list (subject, verb, direct object, modifier noun, preposition)
|
70 |
``
|
71 |
[[u'Voyager', u'run', 'EmptyParameter', u'deuterium', u'out'], [u'Voyager', u'force', u'go', 'EmptyParameter', 'EmptyParameter'], [u'Voyager', u'go', 'EmptyParameter', u'mode', u'into']]
|
72 |
``
|
73 |
-
* generalized 5-tuple events in a list
|
74 |
``
|
75 |
[['<VESSEL>0', 'function-105.2.1', 'EmptyParameter', "Synset('atom.n.01')", u'out'], ['<VESSEL>0', 'urge-58.1-1', u'escape-51.1-1', 'EmptyParameter', 'EmptyParameter'], ['<VESSEL>0', u'escape-51.1-1', 'EmptyParameter', "Synset('statistic.n.01')", u'into']]
|
76 |
``
|
77 |
-
* original sentence
|
78 |
``
|
79 |
The USS Voyager is running out of deuterium as a fuel and is forced to go into Gray mode.
|
80 |
``
|
81 |
-
* generalized sentence
|
82 |
``
|
83 |
the <VESSEL>0 is running out of Synset('atom.n.01') as a Synset('matter.n.03') and is forced to go into Synset('horse.n.01') Synset('statistic.n.01').
|
84 |
``
|
85 |
-
* a dictionary of numbered entities by tag within the
|
86 |
``
|
87 |
{'<ORGANIZATION>': ['seven of nine', 'silver blood'], '<LOCATION>': ['sickbay', 'astrometrics', 'paris', 'cavern', 'vorik', 'caves'], '<DATE>': ['an hour ago', 'now'], '<MISC>': ['selected works', 'demon class', 'electromagnetic', 'parises', 'mimetic'], '<DURATION>': ['less than a week', 'the past four years', 'thirty seconds', 'an hour', 'two hours'], '<NUMBER>': ['two', 'dozen', '14', '15'], '<ORDINAL>': ['first'], '<PERSON>': ['tom paris', 'harry kim', 'captain kathryn janeway', 'tuvok', 'chakotay', 'jirex', 'neelix', 'the doctor', 'seven', 'ensign kashimuro nozawa', 'green', 'lt jg elanna torres', 'ensign vorik'], '<VESSEL>': ['uss voyager', 'starfleet']}
|
88 |
``
|
@@ -91,6 +114,7 @@ Dataset is "eventified" and generalized (see LJ Martin, P Ammanabrolu, X Wang, W
|
|
91 |
* Contains unedited, unparsed original stories scraped from the respective Fandom wikis.
|
92 |
* Each line is a story with sentences space-separated. After each story, there is a <EOS> tag on a new line.
|
93 |
* There is one file for each of the 11 domains listed above.
|
|
|
94 |
---
|
95 |
## Additional Information
|
96 |
### Citation
|
|
|
26 |
## Table of Contents
|
27 |
- [Dataset Description](#dataset-description)
|
28 |
- [Format](#format)
|
29 |
+
- [Using the Dataset with Hugging Face](#call-scifi)
|
30 |
+
- [Original Dataset Structure](#dataset-structure)
|
31 |
- [Files in _OriginalStoriesSeparated_ Directory](#original-stories)
|
32 |
- [Additional Information](#additional-information)
|
33 |
- [Citation](#citation)
|
|
|
53 |
|
54 |
Dataset is "eventified" and generalized (see LJ Martin, P Ammanabrolu, X Wang, W Hancock, S Singh, B Harrison, and MO Riedl. Event Representations for Automated Story Generation with Deep Neural Nets, Thirty-Second AAAI Conference on Artificial Intelligence (AAAI), 2018. for details on these processes.) and split into train-test-validation sets—separated by story so that full stories will stay together—for converting events into full sentences.
|
55 |
|
56 |
+
---
|
57 |
+
### Format
|
58 |
| Dataset Split | Number of Stories in Split | Number of Sentences in Split |
|
59 |
| ------------- |--------------------------- |----------------------------- |
|
60 |
+
| Train | 1737 | 257,108 |
|
61 |
| Validation | 194 | 32,855 |
|
62 |
| Test | 450 | 30,938 |
|
63 |
|
64 |
+
#### Using the Dataset with Hugging Face
|
65 |
+
```
|
66 |
+
from datasets import load_dataset
|
67 |
+
|
68 |
+
#download and load the data
|
69 |
+
dataset = load_dataset('Scifi_TV_Shows')
|
70 |
+
#you can then get the individual splits
|
71 |
+
train = dataset['train']
|
72 |
+
test = dataset['test']
|
73 |
+
validation = dataset['validation']
|
74 |
+
```
|
75 |
+
Each split has 7 attributes (explained in more detail in the next section):
|
76 |
+
```
|
77 |
+
>>> print(train)
|
78 |
+
|
79 |
+
Dataset({
|
80 |
+
features: ['story_num', 'story_line', 'event', 'gen_event', 'sent', 'gen_sent', 'entities'],
|
81 |
+
num_rows: 257108
|
82 |
+
})
|
83 |
+
```
|
84 |
+
|
85 |
---
|
86 |
+
## Original Dataset Structure
|
87 |
* File names: scifi-val.txt, scifi-test.txt, & scifi-train.txt
|
88 |
* Each sentence of the stories are split into smaller sentences and the events are extracted.
|
89 |
* Each line of the file contains information about a single sentence, delimited by "|||". Each line contains, in order:
|
90 |
* The story number
|
91 |
* The line number (within the story)
|
92 |
+
* 5-tuple events in a list (subject, verb, direct object, modifier noun, preposition); e.g.,
|
93 |
``
|
94 |
[[u'Voyager', u'run', 'EmptyParameter', u'deuterium', u'out'], [u'Voyager', u'force', u'go', 'EmptyParameter', 'EmptyParameter'], [u'Voyager', u'go', 'EmptyParameter', u'mode', u'into']]
|
95 |
``
|
96 |
+
* generalized 5-tuple events in a list; events are generalized using WordNet and VerbNet; e.g.,
|
97 |
``
|
98 |
[['<VESSEL>0', 'function-105.2.1', 'EmptyParameter', "Synset('atom.n.01')", u'out'], ['<VESSEL>0', 'urge-58.1-1', u'escape-51.1-1', 'EmptyParameter', 'EmptyParameter'], ['<VESSEL>0', u'escape-51.1-1', 'EmptyParameter', "Synset('statistic.n.01')", u'into']]
|
99 |
``
|
100 |
+
* original sentence (These sentences are split to contain fewer events per sentence. For the full original sentence, see the OriginalStoriesSeparated directory.); e.g.,
|
101 |
``
|
102 |
The USS Voyager is running out of deuterium as a fuel and is forced to go into Gray mode.
|
103 |
``
|
104 |
+
* generalized sentence; only nouns are generalized (using WordNet); e.g.,
|
105 |
``
|
106 |
the <VESSEL>0 is running out of Synset('atom.n.01') as a Synset('matter.n.03') and is forced to go into Synset('horse.n.01') Synset('statistic.n.01').
|
107 |
``
|
108 |
+
* a dictionary of numbered entities by tag within the _entire story_ (e.g. the second entity in the "<ORGANIZATION>" list in the dictionary would be <ORGANIZATION>1 in the story above—index starts at 0); e.g.,
|
109 |
``
|
110 |
{'<ORGANIZATION>': ['seven of nine', 'silver blood'], '<LOCATION>': ['sickbay', 'astrometrics', 'paris', 'cavern', 'vorik', 'caves'], '<DATE>': ['an hour ago', 'now'], '<MISC>': ['selected works', 'demon class', 'electromagnetic', 'parises', 'mimetic'], '<DURATION>': ['less than a week', 'the past four years', 'thirty seconds', 'an hour', 'two hours'], '<NUMBER>': ['two', 'dozen', '14', '15'], '<ORDINAL>': ['first'], '<PERSON>': ['tom paris', 'harry kim', 'captain kathryn janeway', 'tuvok', 'chakotay', 'jirex', 'neelix', 'the doctor', 'seven', 'ensign kashimuro nozawa', 'green', 'lt jg elanna torres', 'ensign vorik'], '<VESSEL>': ['uss voyager', 'starfleet']}
|
111 |
``
|
|
|
114 |
* Contains unedited, unparsed original stories scraped from the respective Fandom wikis.
|
115 |
* Each line is a story with sentences space-separated. After each story, there is a <EOS> tag on a new line.
|
116 |
* There is one file for each of the 11 domains listed above.
|
117 |
+
* These are currently not set up to be called through the Hugging Face API and must be extracted from the zip directly.
|
118 |
---
|
119 |
## Additional Information
|
120 |
### Citation
|