Datasets:
Tasks:
Text Generation
Sub-tasks:
dialogue-modeling
Languages:
Russian
Size:
1M<n<10M
Tags:
conversations
License:
Upload Conversations.py
Browse files- Conversations.py +11 -10
Conversations.py
CHANGED
|
@@ -11,7 +11,7 @@ _CITATION = """\
|
|
| 11 |
title = {Russian-Language Dialogues Dataset},
|
| 12 |
year = {2025},
|
| 13 |
publisher = {Hugging Face},
|
| 14 |
-
howpublished = {
|
| 15 |
}
|
| 16 |
"""
|
| 17 |
|
|
@@ -46,18 +46,19 @@ class Conversations(datasets.GeneratorBasedBuilder):
|
|
| 46 |
citation=_CITATION,
|
| 47 |
)
|
| 48 |
|
| 49 |
-
def _split_generators(self,
|
|
|
|
|
|
|
|
|
|
| 50 |
return [
|
| 51 |
datasets.SplitGenerator(
|
| 52 |
name=datasets.Split.TRAIN,
|
| 53 |
-
gen_kwargs={
|
| 54 |
-
|
| 55 |
-
}
|
| 56 |
-
),
|
| 57 |
]
|
| 58 |
|
| 59 |
-
def _generate_examples(self,
|
| 60 |
-
with gzip.open(
|
| 61 |
-
for iline, line in f:
|
| 62 |
-
yield json.loads(line)
|
| 63 |
|
|
|
|
| 11 |
title = {Russian-Language Dialogues Dataset},
|
| 12 |
year = {2025},
|
| 13 |
publisher = {Hugging Face},
|
| 14 |
+
howpublished = {\\url{https://huggingface.co/datasets/inkoziev/Conversations}},
|
| 15 |
}
|
| 16 |
"""
|
| 17 |
|
|
|
|
| 46 |
citation=_CITATION,
|
| 47 |
)
|
| 48 |
|
| 49 |
+
def _split_generators(self, dl_manager):
|
| 50 |
+
download_url = "https://huggingface.co/datasets/inkoziev/Conversations/resolve/main/conversations.jsonl.gz"
|
| 51 |
+
#download_url = "/home/inkoziev/github/Conversations/conversations.jsonl.gz"
|
| 52 |
+
path = dl_manager.download(download_url)
|
| 53 |
return [
|
| 54 |
datasets.SplitGenerator(
|
| 55 |
name=datasets.Split.TRAIN,
|
| 56 |
+
gen_kwargs={"datapath": path},
|
| 57 |
+
)
|
|
|
|
|
|
|
| 58 |
]
|
| 59 |
|
| 60 |
+
def _generate_examples(self, datapath):
|
| 61 |
+
with gzip.open(datapath, "rt", encoding="utf-8") as f:
|
| 62 |
+
for iline, line in enumerate(f):
|
| 63 |
+
yield iline, json.loads(line)
|
| 64 |
|