Datasets:
Update guiacat.py
Browse files- guiacat.py +10 -10
guiacat.py
CHANGED
@@ -13,10 +13,10 @@ logger = datasets.logging.get_logger(__name__)
|
|
13 |
_CITATION = """ """
|
14 |
|
15 |
|
16 |
-
_DESCRIPTION = """
|
17 |
|
18 |
|
19 |
-
_HOMEPAGE = """ """
|
20 |
|
21 |
|
22 |
|
@@ -26,7 +26,7 @@ _DEV_FILE = "dev.csv"
|
|
26 |
_TEST_FILE = "test.csv"
|
27 |
|
28 |
|
29 |
-
class
|
30 |
""" Builder config for the reviews_finder dataset """
|
31 |
|
32 |
def __init__(self, **kwargs):
|
@@ -34,18 +34,18 @@ class GuiacatConfig(datasets.BuilderConfig):
|
|
34 |
Args:
|
35 |
**kwargs: keyword arguments forwarded to super.
|
36 |
"""
|
37 |
-
super(
|
38 |
|
39 |
|
40 |
-
class
|
41 |
-
"""
|
42 |
|
43 |
|
44 |
BUILDER_CONFIGS = [
|
45 |
-
|
46 |
-
name="
|
47 |
version=datasets.Version("1.0.0"),
|
48 |
-
description="
|
49 |
),
|
50 |
]
|
51 |
|
@@ -95,7 +95,7 @@ class Guiacat(datasets.GeneratorBasedBuilder):
|
|
95 |
with open(filepath) as f:
|
96 |
read = csv.reader(f)
|
97 |
data = [item for item in read]
|
98 |
-
for id_, article in enumerate(data):
|
99 |
text = article[5]
|
100 |
label = article[6]
|
101 |
yield id_, {
|
|
|
13 |
_CITATION = """ """
|
14 |
|
15 |
|
16 |
+
_DESCRIPTION = """ GuiaCat is a dataset consisting of 5.750 restaurant reviews in Catalan, with 5 associated scores and a label of sentiment. The data was provided by GuiaCat and curated by the BSC. """
|
17 |
|
18 |
|
19 |
+
_HOMEPAGE = """ https://huggingface.co/datasets/projecte-aina/Parafraseja/ """
|
20 |
|
21 |
|
22 |
|
|
|
26 |
_TEST_FILE = "test.csv"
|
27 |
|
28 |
|
29 |
+
class GuiaCatConfig(datasets.BuilderConfig):
|
30 |
""" Builder config for the reviews_finder dataset """
|
31 |
|
32 |
def __init__(self, **kwargs):
|
|
|
34 |
Args:
|
35 |
**kwargs: keyword arguments forwarded to super.
|
36 |
"""
|
37 |
+
super(GuiaCatConfig, self).__init__(**kwargs)
|
38 |
|
39 |
|
40 |
+
class GuiaCat(datasets.GeneratorBasedBuilder):
|
41 |
+
""" GuiaCat Dataset """
|
42 |
|
43 |
|
44 |
BUILDER_CONFIGS = [
|
45 |
+
GuiaCatConfig(
|
46 |
+
name="GuiaCat",
|
47 |
version=datasets.Version("1.0.0"),
|
48 |
+
description="GuiaCat dataset",
|
49 |
),
|
50 |
]
|
51 |
|
|
|
95 |
with open(filepath) as f:
|
96 |
read = csv.reader(f)
|
97 |
data = [item for item in read]
|
98 |
+
for id_, article in enumerate(data):
|
99 |
text = article[5]
|
100 |
label = article[6]
|
101 |
yield id_, {
|