Datasets:

Size:
n<1K
License:
ArneBinder commited on
Commit
da81c3c
·
1 Parent(s): 86b7185

sort edus, adus, and edges by id

Browse files
Files changed (1) hide show
  1. argmicro.py +4 -4
argmicro.py CHANGED
@@ -119,7 +119,7 @@ class ArgMicro(datasets.GeneratorBasedBuilder):
119
  try:
120
  from lxml import etree
121
 
122
- #dtd = etree.DTD(base_path / "arggraph.dtd")
123
  except ModuleNotFoundError:
124
  logger.warning("lxml not installed. Skipping DTD validation.")
125
 
@@ -185,9 +185,9 @@ class ArgMicro(datasets.GeneratorBasedBuilder):
185
  "topic_id": annotations.attrib.get("topic_id", "UNDEFINED"),
186
  "stance": annotations.attrib.get("stance", "UNDEFINED"),
187
  "text": text,
188
- "edus": edus,
189
- "adus": adus,
190
- "edges": edges,
191
  }
192
  _id += 1
193
 
 
119
  try:
120
  from lxml import etree
121
 
122
+ dtd = etree.DTD(base_path / "arggraph.dtd")
123
  except ModuleNotFoundError:
124
  logger.warning("lxml not installed. Skipping DTD validation.")
125
 
 
185
  "topic_id": annotations.attrib.get("topic_id", "UNDEFINED"),
186
  "stance": annotations.attrib.get("stance", "UNDEFINED"),
187
  "text": text,
188
+ "edus": sorted(edus, key=lambda x: x["id"]),
189
+ "adus": sorted(adus, key=lambda x: x["id"]),
190
+ "edges": sorted(edges, key=lambda x: x["id"]),
191
  }
192
  _id += 1
193