Matej Klemen commited on
Commit
884b744
2 Parent(s): 04a1a15 04536af

Merge branch 'main' of https://huggingface.co./datasets/matejklemen/vuamc into main

Browse files
Files changed (1) hide show
  1. README.md +157 -1
README.md CHANGED
@@ -1,3 +1,159 @@
1
  ---
2
- license: other
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ annotations_creators:
3
+ - expert-generated
4
+ language:
5
+ - en
6
+ language_creators:
7
+ - found
8
+ license:
9
+ - other
10
+ multilinguality:
11
+ - monolingual
12
+ pretty_name: VUA Metaphor Corpus
13
+ size_categories:
14
+ - 10K<n<100K
15
+ - 100K<n<1M
16
+ source_datasets: []
17
+ tags:
18
+ - metaphor-classification
19
+ - multiword-expression-detection
20
+ - vua20
21
+ - vua18
22
+ - mipvu
23
+ task_categories:
24
+ - text-classification
25
+ - token-classification
26
+ task_ids:
27
+ - multi-class-classification
28
  ---
29
+
30
+ # Dataset Card for VUA Metaphor Corpus
31
+
32
+ **Important note#1**: This is a slightly simplified but mostly complete parse of the corpus. What is missing are lemmas and some metadata that was not important at the time of writing the parser. See the section `Simplifications` for more information on this.
33
+
34
+ **Important note#2**: The dataset contains metadata - to ignore it and correctly remap the annotations, see the section `Discarding metadata`.
35
+
36
+ ### Dataset Summary
37
+
38
+ VUA Metaphor Corpus (VUAMC) contains a selection of excerpts from BNC-Baby files that have been annotated for metaphor. There are four registers, each comprising about 50 000 words: academic texts, news texts, fiction, and conversations.
39
+ Words have been separately labelled as participating in multi-word expressions (about 1.5%) or as discarded for metaphor analysis (0.02%). Main categories include words that are related to metaphor (MRW), words that signal metaphor (MFlag), and words that are not related to metaphor. For metaphor-related words, subdivisions have been made between clear cases of metaphor versus borderline cases (WIDLII, When In Doubt, Leave It In). Another parameter of metaphor-related words makes a distinction between direct metaphor, indirect metaphor, and implicit metaphor.
40
+
41
+ ### Supported Tasks and Leaderboards
42
+
43
+ Metaphor detection, metaphor type classification.
44
+
45
+ ### Languages
46
+
47
+ English.
48
+
49
+ ## Dataset Structure
50
+
51
+ ### Data Instances
52
+
53
+ A sample instance from the dataset:
54
+ ```
55
+ {
56
+ 'document_name': 'kcv-fragment42',
57
+ 'words': ['', 'I', 'think', 'we', 'should', 'have', 'different', 'holidays', '.'],
58
+ 'pos_tags': ['N/A', 'PNP', 'VVB', 'PNP', 'VM0', 'VHI', 'AJ0', 'NN2', 'PUN'],
59
+ 'met_type': [
60
+ {'type': 'mrw/met', 'word_indices': [5]}
61
+ ],
62
+ 'meta': ['vocal/laugh', 'N/A', 'N/A', 'N/A', 'N/A', 'N/A', 'N/A', 'N/A', 'N/A']
63
+ }
64
+ ```
65
+
66
+ ### Data Fields
67
+
68
+ The instances are ordered as they appear in the corpus.
69
+
70
+ - `document_name`: a string containing the name of the document in which the sentence appears;
71
+ - `words`: words in the sentence (`""` when the word represents metadata);
72
+ - `pos_tags`: POS tags of the words, encoded using the BNC basic tagset (`"N/A"` when the word does not have an associated POS tag);
73
+ - `met_type`: metaphors in the sentence, marked by their type and word indices;
74
+ - `meta`: selected metadata tags providing additional context to the sentence. Metadata may not correspond to a specific word. In this case, the metadata is represented with an empty string (`""`) in `words` and a `"N/A"` tag in `pos_tags`.
75
+
76
+ ## Dataset Creation
77
+
78
+ For detailed information on the corpus, please check out the references in the `Citation Information` section or contact the dataset authors.
79
+
80
+ ## Simplifications
81
+ The raw corpus is equipped with rich metadata and encoded in the TEI XML format. The textual part is fully parsed except for the lemmas, i.e. all the sentences in the raw corpus are present in the dataset.
82
+ However, parsing the metadata fully is unnecessarily tedious, so certain simplifications were made:
83
+ - paragraph information is not preserved as the dataset is parsed at sentence level;
84
+ - manual corrections (`<corr>`) of incorrectly written words are ignored, and the original, incorrect form of the words is used instead;
85
+ - `<ptr>` and `<anchor>` tags are ignored as I cannot figure out what they represent;
86
+ - the attributes `rendition` (in `<hi>` tags) and `new` (in `<shift>` tags) are not exposed.
87
+
88
+ ## Discarding metadata
89
+
90
+ The dataset contains rich metadata, which is stored in the `meta` attribute. To keep data aligned, empty words or `"N/A"`s are inserted into the other attributes. If you want to ignore the metadata and correct the metaphor type annotations, you can use code similar to the following snippet:
91
+ ```python3
92
+ data = datasets.load_dataset("matejklemen/vuamc")["train"]
93
+ data = data.to_pandas()
94
+
95
+ for idx_ex in range(data.shape[0]):
96
+ curr_ex = data.iloc[idx_ex]
97
+
98
+ idx_remap = {}
99
+ for idx_word, word in enumerate(curr_ex["words"]):
100
+ if len(word) != 0:
101
+ idx_remap[idx_word] = len(idx_remap)
102
+
103
+ # Note that lists are stored as np arrays by datasets, while we are storing new data in a list!
104
+ # (unhandled for simplicity)
105
+ words, pos_tags, met_type = curr_ex[["words", "pos_tags", "met_type"]].tolist()
106
+ if len(idx_remap) != len(curr_ex["words"]):
107
+ words = list(filter(lambda _word: len(_word) > 0, curr_ex["words"]))
108
+ pos_tags = list(filter(lambda _pos: _pos != "N/A", curr_ex["pos_tags"]))
109
+ met_type = []
110
+
111
+ for met_info in curr_ex["met_type"]:
112
+ met_type.append({
113
+ "type": met_info["type"],
114
+ "word_indices": list(map(lambda _i: idx_remap[_i], met_info["word_indices"]))
115
+ })
116
+ ```
117
+
118
+ ## Additional Information
119
+
120
+ ### Dataset Curators
121
+
122
+ Gerard Steen; et al. (please see http://hdl.handle.net/20.500.12024/2541 for the full list).
123
+
124
+ ### Licensing Information
125
+
126
+ Available for non-commercial use on condition that the terms of the [BNC Licence](http://www.natcorp.ox.ac.uk/docs/licence.html) are observed and that this header is included in its entirety with any copy distributed.
127
+
128
+ ### Citation Information
129
+
130
+ ```
131
+ @book{steen2010method,
132
+ title={A method for linguistic metaphor identification: From MIP to MIPVU},
133
+ author={Steen, Gerard and Dorst, Lettie and Herrmann, J. and Kaal, Anna and Krennmayr, Tina and Pasma, Trijntje},
134
+ volume={14},
135
+ year={2010},
136
+ publisher={John Benjamins Publishing}
137
+ }
138
+ ```
139
+
140
+ ```
141
+ @inproceedings{leong-etal-2020-report,
142
+ title = "A Report on the 2020 {VUA} and {TOEFL} Metaphor Detection Shared Task",
143
+ author = "Leong, Chee Wee (Ben) and
144
+ Beigman Klebanov, Beata and
145
+ Hamill, Chris and
146
+ Stemle, Egon and
147
+ Ubale, Rutuja and
148
+ Chen, Xianyang",
149
+ booktitle = "Proceedings of the Second Workshop on Figurative Language Processing",
150
+ year = "2020",
151
+ url = "https://aclanthology.org/2020.figlang-1.3",
152
+ doi = "10.18653/v1/2020.figlang-1.3",
153
+ pages = "18--29"
154
+ }
155
+ ```
156
+
157
+ ### Contributions
158
+
159
+ Thanks to [@matejklemen](https://github.com/matejklemen) for adding this dataset.