Datasets:

Languages:
English
ArXiv:
License:
dfki-nlp commited on
Commit
4bbc35b
1 Parent(s): 38c47e3

updated docu

Browse files
Files changed (1) hide show
  1. tacred.py +10 -3
tacred.py CHANGED
@@ -15,7 +15,6 @@
15
 
16
  """The TACRED dataset for English Relation Classification"""
17
 
18
-
19
  import json
20
  import os
21
 
@@ -67,6 +66,12 @@ TACRED is a large-scale relation extraction dataset with 106,264 examples built
67
  Note: There is currently a label-corrected version of the TACRED dataset, which you should consider using instead of
68
  the original version released in 2017. For more details on this new version, see the TACRED Revisited paper
69
  published at ACL 2020.
 
 
 
 
 
 
70
  """
71
 
72
  _HOMEPAGE = "https://nlp.stanford.edu/projects/tacred/"
@@ -82,6 +87,8 @@ _PATCH_URLs = {
82
  "test": "https://raw.githubusercontent.com/DFKI-NLP/tacrev/master/patch/test_patch.json",
83
  }
84
 
 
 
85
  _CLASS_LABELS = [
86
  "no_relation",
87
  "org:alternate_names",
@@ -146,11 +153,11 @@ class Tacred(datasets.GeneratorBasedBuilder):
146
 
147
  BUILDER_CONFIGS = [
148
  datasets.BuilderConfig(
149
- name="original", version=datasets.Version("1.0.0"), description="The original TACRED."
150
  ),
151
  datasets.BuilderConfig(
152
  name="revised",
153
- version=datasets.Version("1.0.0"),
154
  description="The revised TACRED (corrected labels in dev and test split).",
155
  ),
156
  ]
 
15
 
16
  """The TACRED dataset for English Relation Classification"""
17
 
 
18
  import json
19
  import os
20
 
 
66
  Note: There is currently a label-corrected version of the TACRED dataset, which you should consider using instead of
67
  the original version released in 2017. For more details on this new version, see the TACRED Revisited paper
68
  published at ACL 2020.
69
+
70
+ Note 2: This Datasetreader changes the offsets of the following fields, to conform with standard Python usage (see
71
+ #_generate_examples()):
72
+ - subj_end to subj_end + 1 (make end offset exclusive)
73
+ - oj_end to oj_end + 1 (make end offset exclusive)
74
+ - stanford_head to stanford_head - 1 (make head offsets 0-based)
75
  """
76
 
77
  _HOMEPAGE = "https://nlp.stanford.edu/projects/tacred/"
 
87
  "test": "https://raw.githubusercontent.com/DFKI-NLP/tacrev/master/patch/test_patch.json",
88
  }
89
 
90
+ _VERSION = datasets.Version("1.0.0")
91
+
92
  _CLASS_LABELS = [
93
  "no_relation",
94
  "org:alternate_names",
 
153
 
154
  BUILDER_CONFIGS = [
155
  datasets.BuilderConfig(
156
+ name="original", version=_VERSION, description="The original TACRED."
157
  ),
158
  datasets.BuilderConfig(
159
  name="revised",
160
+ version=_VERSION,
161
  description="The revised TACRED (corrected labels in dev and test split).",
162
  ),
163
  ]