Commit
·
2fa3d6f
1
Parent(s):
196184d
dont load the dtd
Browse files- argmicro.py +3 -4
argmicro.py
CHANGED
|
@@ -109,20 +109,19 @@ class ArgMicro(datasets.GeneratorBasedBuilder):
|
|
| 109 |
if not isdir(base_path):
|
| 110 |
base_path = os.path.join(dl_manager.extract(base_path), "arg-microtexts-master")
|
| 111 |
else:
|
| 112 |
-
# TODO: test this!
|
| 113 |
base_path = os.path.join(
|
| 114 |
dl_manager.download_and_extract(_URL), "arg-microtexts-master"
|
| 115 |
)
|
| 116 |
base_path = Path(base_path) / "corpus"
|
| 117 |
|
|
|
|
|
|
|
| 118 |
try:
|
| 119 |
from lxml import etree
|
| 120 |
|
| 121 |
-
dtd = etree.DTD(base_path / "arggraph.dtd")
|
| 122 |
except ModuleNotFoundError:
|
| 123 |
logger.warning("lxml not installed. Skipping DTD validation.")
|
| 124 |
-
dtd = None
|
| 125 |
-
etree = None
|
| 126 |
|
| 127 |
return [
|
| 128 |
datasets.SplitGenerator(
|
|
|
|
| 109 |
if not isdir(base_path):
|
| 110 |
base_path = os.path.join(dl_manager.extract(base_path), "arg-microtexts-master")
|
| 111 |
else:
|
|
|
|
| 112 |
base_path = os.path.join(
|
| 113 |
dl_manager.download_and_extract(_URL), "arg-microtexts-master"
|
| 114 |
)
|
| 115 |
base_path = Path(base_path) / "corpus"
|
| 116 |
|
| 117 |
+
dtd = None
|
| 118 |
+
etree = None
|
| 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 |
|
| 126 |
return [
|
| 127 |
datasets.SplitGenerator(
|