reorder fields
Browse files- wikipedia_citations.py +3 -3
wikipedia_citations.py
CHANGED
@@ -437,9 +437,9 @@ class WikipediaCitations(datasets.GeneratorBasedBuilder):
|
|
437 |
"title": datasets.Value("string"),
|
438 |
"url": datasets.Value("string"),
|
439 |
"domain": datasets.Value("string"),
|
|
|
440 |
"format": datasets.Value("string"),
|
441 |
"publisher": datasets.Value("string"),
|
442 |
-
"archiveurl": datasets.Value("string"),
|
443 |
"work": datasets.Value("string"),
|
444 |
"isbn": datasets.Value("string"),
|
445 |
"journal": datasets.Value("string"),
|
@@ -576,7 +576,7 @@ class WikipediaCitations(datasets.GeneratorBasedBuilder):
|
|
576 |
# remove params
|
577 |
prefix = url.split("?")[0]
|
578 |
suffix = prefix.split("/")[-1]
|
579 |
-
f = suffix.split(".")[-1] if "." in suffix else
|
580 |
return f
|
581 |
|
582 |
def _parse_obj(self, obj, language):
|
@@ -613,10 +613,10 @@ class WikipediaCitations(datasets.GeneratorBasedBuilder):
|
|
613 |
"template": str(template),
|
614 |
"title": params.get("title"),
|
615 |
"url": params.get("url"),
|
|
|
616 |
"domain": self._get_domain(params.get("url")),
|
617 |
"format": self._get_format(params.get("url")),
|
618 |
"publisher": params.get("publisher"),
|
619 |
-
"archiveurl": params.get("archiveurl"),
|
620 |
"work": params.get("work"),
|
621 |
"isbn": params.get("isbn"),
|
622 |
"journal": params.get("journal"),
|
|
|
437 |
"title": datasets.Value("string"),
|
438 |
"url": datasets.Value("string"),
|
439 |
"domain": datasets.Value("string"),
|
440 |
+
"archiveurl": datasets.Value("string"),
|
441 |
"format": datasets.Value("string"),
|
442 |
"publisher": datasets.Value("string"),
|
|
|
443 |
"work": datasets.Value("string"),
|
444 |
"isbn": datasets.Value("string"),
|
445 |
"journal": datasets.Value("string"),
|
|
|
576 |
# remove params
|
577 |
prefix = url.split("?")[0]
|
578 |
suffix = prefix.split("/")[-1]
|
579 |
+
f = suffix.split(".")[-1] if "." in suffix else None
|
580 |
return f
|
581 |
|
582 |
def _parse_obj(self, obj, language):
|
|
|
613 |
"template": str(template),
|
614 |
"title": params.get("title"),
|
615 |
"url": params.get("url"),
|
616 |
+
"archiveurl": params.get("archiveurl"),
|
617 |
"domain": self._get_domain(params.get("url")),
|
618 |
"format": self._get_format(params.get("url")),
|
619 |
"publisher": params.get("publisher"),
|
|
|
620 |
"work": params.get("work"),
|
621 |
"isbn": params.get("isbn"),
|
622 |
"journal": params.get("journal"),
|