Datasets:
Tasks:
Text Classification
Modalities:
Text
Sub-tasks:
sentiment-classification
Languages:
Chinese
Size:
100K - 1M
Tags:
stock
License:
kuroneko5943
commited on
Commit
•
0315de4
1
Parent(s):
17f2898
Update stock11.py
Browse files- stock11.py +7 -9
stock11.py
CHANGED
@@ -49,7 +49,7 @@ class STOCK11(datasets.GeneratorBasedBuilder):
|
|
49 |
label_column='label',
|
50 |
citation="",
|
51 |
data_dir= "",
|
52 |
-
data_url = r"https://huggingface.co/datasets/kuroneko3578/stock11/resolve/main/
|
53 |
url='https://github.com/ws719547997/LNB-DA')
|
54 |
for domain_name in domain_list
|
55 |
]
|
@@ -69,25 +69,23 @@ class STOCK11(datasets.GeneratorBasedBuilder):
|
|
69 |
)
|
70 |
|
71 |
def _split_generators(self, dl_manager):
|
72 |
-
downloaded_file = dl_manager.download_and_extract(self.config.data_url)
|
73 |
-
print(downloaded_file)
|
74 |
|
75 |
-
test_file = rf'{
|
76 |
-
dev_file = rf'{
|
77 |
-
train_file = rf'{
|
78 |
return [datasets.SplitGenerator(name=datasets.Split.TEST,
|
79 |
gen_kwargs={
|
80 |
-
"data_file": test_file,
|
81 |
"split": "test",
|
82 |
},),
|
83 |
datasets.SplitGenerator(name=datasets.Split.VALIDATION,
|
84 |
gen_kwargs={
|
85 |
-
"data_file": dev_file,
|
86 |
"split": "dev",
|
87 |
},),
|
88 |
datasets.SplitGenerator(name=datasets.Split.TRAIN,
|
89 |
gen_kwargs={
|
90 |
-
"data_file": train_file,
|
91 |
"split": "train",
|
92 |
},)]
|
93 |
|
|
|
49 |
label_column='label',
|
50 |
citation="",
|
51 |
data_dir= "",
|
52 |
+
data_url = r"https://huggingface.co/datasets/kuroneko3578/stock11/resolve/main/",
|
53 |
url='https://github.com/ws719547997/LNB-DA')
|
54 |
for domain_name in domain_list
|
55 |
]
|
|
|
69 |
)
|
70 |
|
71 |
def _split_generators(self, dl_manager):
|
|
|
|
|
72 |
|
73 |
+
test_file = rf'{self.config.data_url}test/{self.config.name}.txt'
|
74 |
+
dev_file = rf'{self.config.data_url}dev/{self.config.name}.txt'
|
75 |
+
train_file = rf'{self.config.data_url}train/{self.config.name}.txt'
|
76 |
return [datasets.SplitGenerator(name=datasets.Split.TEST,
|
77 |
gen_kwargs={
|
78 |
+
"data_file": dl_manager.download(test_file),
|
79 |
"split": "test",
|
80 |
},),
|
81 |
datasets.SplitGenerator(name=datasets.Split.VALIDATION,
|
82 |
gen_kwargs={
|
83 |
+
"data_file": dl_manager.download(dev_file),
|
84 |
"split": "dev",
|
85 |
},),
|
86 |
datasets.SplitGenerator(name=datasets.Split.TRAIN,
|
87 |
gen_kwargs={
|
88 |
+
"data_file": dl_manager.download(train_file),
|
89 |
"split": "train",
|
90 |
},)]
|
91 |
|