Datasets:
update script
Browse files- dataset_infos.json +1 -0
- dummy/mmchat/1.0.0/dummy_data.zip +0 -0
- dummy/mmchat/1.0.0/dummy_data.zip.lock +0 -0
- dummy/mmchat_hf/1.0.0/dummy_data.zip +0 -0
- dummy/mmchat_hf/1.0.0/dummy_data.zip.lock +0 -0
- dummy/mmchat_lccc_filtered/1.0.0/dummy_data.zip +0 -0
- dummy/mmchat_lccc_filtered/1.0.0/dummy_data.zip.lock +0 -0
- dummy/mmchat_raw/1.0.0/dummy_data.zip +0 -0
- dummy/mmchat_raw/1.0.0/dummy_data.zip.lock +0 -0
- mmchat.py +9 -9
dataset_infos.json
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"mmchat": {"description": "MMChat is a large-scale dialogue dataset that contains image-grounded dialogues in Chinese.\nEach dialogue in MMChat is associated with one or more images (maximum 9 images per dialogue).\nWe design various strategies to ensure the quality of the dialogues in MMChat.\n", "citation": "@inproceedings{zheng2022MMChat,\nauthor = {Zheng, Yinhe and Chen, Guanyi and Liu, Xin and Sun, Jian},\ntitle = {MMChat: Multi-Modal Chat Dataset on Social Media},\nbooktitle = {Proceedings of The 13th Language Resources and Evaluation Conference},\nyear = {2022},\npublisher = {European Language Resources Association},\n}\n\n@inproceedings{wang2020chinese,\n title = {A Large-Scale Chinese Short-Text Conversation Dataset},\n author = {Wang, Yida and Ke, Pei and Zheng, Yinhe and Huang, Kaili and Jiang, Yong and Zhu, Xiaoyan and Huang, Minlie},\n booktitle = {NLPCC},\n year = {2020},\n url = {https://arxiv.org/abs/2008.03946}\n}\n", "homepage": "https://github.com/silverriver/MMChat", "license": "MIT", "features": {"dialog": [{"dtype": "string", "id": null, "_type": "Value"}], "weibo_content": {"dtype": "string", "id": null, "_type": "Value"}, "imgs": [{"dtype": "string", "id": null, "_type": "Value"}]}, "post_processed": null, "supervised_keys": null, "task_templates": null, "builder_name": "mmchat", "config_name": "mmchat", "version": {"version_str": "1.0.0", "description": null, "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 35036683, "num_examples": 115842, "dataset_name": "mmchat"}, "test": {"name": "test", "num_bytes": 1242236, "num_examples": 4000, "dataset_name": "mmchat"}, "validation": {"name": "validation", "num_bytes": 305657, "num_examples": 1000, "dataset_name": "mmchat"}}, "download_checksums": {"https://huggingface.co/datasets/silver/mmchat/resolve/main/mmchat/dialog_train.jsonl.gz": {"num_bytes": 4001249, "checksum": "7dd8948dbbd7d3865a69df7c737b3f2c530d57258ca378ab74aca1f4587d7fb5"}, "https://huggingface.co/datasets/silver/mmchat/resolve/main/mmchat/img_url_train.jsonl.gz": {"num_bytes": 5301433, "checksum": "9337c9e96497f0f8d6c01ee30afd7c1feaafd2f669661fe48052f41e3baf7aeb"}, "https://huggingface.co/datasets/silver/mmchat/resolve/main/mmchat/weibo_train.jsonl.gz": {"num_bytes": 3441, "checksum": "cbcc11ccea2d9dd75047c7fe80ecc3eceaddf555eb2136c5cae78725cb44ed54"}, "https://huggingface.co/datasets/silver/mmchat/resolve/main/mmchat/dialog_dev.jsonl.gz": {"num_bytes": 35976, "checksum": "bf241f920b088b8e1d1bfd3c62d41cca9e76d60f9d35dc0da71d4ca4ee2855b4"}, "https://huggingface.co/datasets/silver/mmchat/resolve/main/mmchat/img_url_dev.jsonl.gz": {"num_bytes": 46607, "checksum": "7322d42af425820fc4cdb570a9400bc2623f726d304131ab2494fc11779309eb"}, "https://huggingface.co/datasets/silver/mmchat/resolve/main/mmchat/weibo_dev.jsonl.gz": {"num_bytes": 101, "checksum": "7f6cef2b570a3aa187d823ab5330806e79f9dd66e4ade4cae78ef7815764d2ee"}, "https://huggingface.co/datasets/silver/mmchat/resolve/main/mmchat/dialog_test.jsonl.gz": {"num_bytes": 141556, "checksum": "f285407f893abc385588160a674c6ad846bce93f0a821acf093bcd8a8d40e685"}, "https://huggingface.co/datasets/silver/mmchat/resolve/main/mmchat/img_url_test.jsonl.gz": {"num_bytes": 188377, "checksum": "9db4713683a665764085e7480165a7f7c038b2c6239d1c744976298363a5579e"}, "https://huggingface.co/datasets/silver/mmchat/resolve/main/mmchat/weibo_test.jsonl.gz": {"num_bytes": 189, "checksum": "3eaabda17b2e4df3985f6f302f2581ed818a03ae04cc7112f7feb1fcddc4c47b"}}, "download_size": 9718929, "post_processing_size": null, "dataset_size": 36584576, "size_in_bytes": 46303505}, "mmchat_hf": {"description": "MMChat is a large-scale dialogue dataset that contains image-grounded dialogues in Chinese.\nEach dialogue in MMChat is associated with one or more images (maximum 9 images per dialogue).\nWe design various strategies to ensure the quality of the dialogues in MMChat.\n", "citation": "@inproceedings{zheng2022MMChat,\nauthor = {Zheng, Yinhe and Chen, Guanyi and Liu, Xin and Sun, Jian},\ntitle = {MMChat: Multi-Modal Chat Dataset on Social Media},\nbooktitle = {Proceedings of The 13th Language Resources and Evaluation Conference},\nyear = {2022},\npublisher = {European Language Resources Association},\n}\n\n@inproceedings{wang2020chinese,\n title = {A Large-Scale Chinese Short-Text Conversation Dataset},\n author = {Wang, Yida and Ke, Pei and Zheng, Yinhe and Huang, Kaili and Jiang, Yong and Zhu, Xiaoyan and Huang, Minlie},\n booktitle = {NLPCC},\n year = {2020},\n url = {https://arxiv.org/abs/2008.03946}\n}\n", "homepage": "https://github.com/silverriver/MMChat", "license": "MIT", "features": {"dialog": [{"dtype": "string", "id": null, "_type": "Value"}], "weibo_content": {"dtype": "string", "id": null, "_type": "Value"}, "imgs": [{"dtype": "string", "id": null, "_type": "Value"}], "labels": {"image_qualified": {"dtype": "bool", "id": null, "_type": "Value"}, "dialog_qualified": {"dtype": "bool", "id": null, "_type": "Value"}, "dialog_image_related": {"dtype": "bool", "id": null, "_type": "Value"}}}, "post_processed": null, "supervised_keys": null, "task_templates": null, "builder_name": "mmchat", "config_name": "mmchat_hf", "version": {"version_str": "1.0.0", "description": null, "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 47268457, "num_examples": 100011, "dataset_name": "mmchat"}}, "download_checksums": {"https://huggingface.co/datasets/silver/mmchat/resolve/main/mmchat_hf/dialog.jsonl.gz": {"num_bytes": 6826130, "checksum": "15fcf7756ec5ca39398a4ab9d68d14c403b1f4273781130f90dacb55a862c58a"}, "https://huggingface.co/datasets/silver/mmchat/resolve/main/mmchat_hf/weibo_img_expanded_url.jsonl.gz": {"num_bytes": 7781846, "checksum": "58fccfe34603c92dcb435dde7f7f77f7468dba2df369a412a927d65041f18724"}, "https://huggingface.co/datasets/silver/mmchat/resolve/main/mmchat_hf/weibo.jsonl.gz": {"num_bytes": 7084046, "checksum": "4031029e1abbdca3fa71755796a52f8f6788ae77390f2b7107822b8eb792bcb0"}, "https://huggingface.co/datasets/silver/mmchat/resolve/main/mmchat_hf/human_annotation.jsonl.gz": {"num_bytes": 358333, "checksum": "6d34e113027e86f44af220c2c9ce09f909aaff045cd94fd5886b79a972b6e0b4"}}, "download_size": 22050355, "post_processing_size": null, "dataset_size": 47268457, "size_in_bytes": 69318812}, "mmchat_raw": {"description": "MMChat is a large-scale dialogue dataset that contains image-grounded dialogues in Chinese.\nEach dialogue in MMChat is associated with one or more images (maximum 9 images per dialogue).\nWe design various strategies to ensure the quality of the dialogues in MMChat.\n", "citation": "@inproceedings{zheng2022MMChat,\nauthor = {Zheng, Yinhe and Chen, Guanyi and Liu, Xin and Sun, Jian},\ntitle = {MMChat: Multi-Modal Chat Dataset on Social Media},\nbooktitle = {Proceedings of The 13th Language Resources and Evaluation Conference},\nyear = {2022},\npublisher = {European Language Resources Association},\n}\n\n@inproceedings{wang2020chinese,\n title = {A Large-Scale Chinese Short-Text Conversation Dataset},\n author = {Wang, Yida and Ke, Pei and Zheng, Yinhe and Huang, Kaili and Jiang, Yong and Zhu, Xiaoyan and Huang, Minlie},\n booktitle = {NLPCC},\n year = {2020},\n url = {https://arxiv.org/abs/2008.03946}\n}\n", "homepage": "https://github.com/silverriver/MMChat", "license": "MIT", "features": {"dialog": [{"dtype": "string", "id": null, "_type": "Value"}], "weibo_content": {"dtype": "string", "id": null, "_type": "Value"}, "imgs": [{"dtype": "string", "id": null, "_type": "Value"}]}, "post_processed": null, "supervised_keys": null, "task_templates": null, "builder_name": "mmchat", "config_name": "mmchat_raw", "version": {"version_str": "1.0.0", "description": null, "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 2012399665, "num_examples": 4256871, "dataset_name": "mmchat"}}, "download_checksums": {"https://huggingface.co/datasets/silver/mmchat/resolve/main/mmchat_raw/dialog_raw.jsonl.gz": {"num_bytes": 389104370, "checksum": "8d36cd302c42eee9a9d39032ff0e1d05975bd5aa2030eecd595e2e2964f6cadf"}, "https://huggingface.co/datasets/silver/mmchat/resolve/main/mmchat_raw/weibo_img_expanded_url_raw.jsonl.gz": {"num_bytes": 268962111, "checksum": "d0deae3fe9b2bced80ba424fa9110a4e52b583f5823723832ac628e943e0a228"}, "https://huggingface.co/datasets/silver/mmchat/resolve/main/mmchat_raw/weibo_raw.jsonl.gz": {"num_bytes": 329066732, "checksum": "d2616195f89040a0cb81d16261293f9ff002d2eb7981eebde2f631069f202521"}}, "download_size": 987133213, "post_processing_size": null, "dataset_size": 2012399665, "size_in_bytes": 2999532878}, "mmchat_lccc_filtered": {"description": "MMChat is a large-scale dialogue dataset that contains image-grounded dialogues in Chinese.\nEach dialogue in MMChat is associated with one or more images (maximum 9 images per dialogue).\nWe design various strategies to ensure the quality of the dialogues in MMChat.\n", "citation": "@inproceedings{zheng2022MMChat,\nauthor = {Zheng, Yinhe and Chen, Guanyi and Liu, Xin and Sun, Jian},\ntitle = {MMChat: Multi-Modal Chat Dataset on Social Media},\nbooktitle = {Proceedings of The 13th Language Resources and Evaluation Conference},\nyear = {2022},\npublisher = {European Language Resources Association},\n}\n\n@inproceedings{wang2020chinese,\n title = {A Large-Scale Chinese Short-Text Conversation Dataset},\n author = {Wang, Yida and Ke, Pei and Zheng, Yinhe and Huang, Kaili and Jiang, Yong and Zhu, Xiaoyan and Huang, Minlie},\n booktitle = {NLPCC},\n year = {2020},\n url = {https://arxiv.org/abs/2008.03946}\n}\n", "homepage": "https://github.com/silverriver/MMChat", "license": "MIT", "features": {"dialog": [{"dtype": "string", "id": null, "_type": "Value"}], "weibo_content": {"dtype": "string", "id": null, "_type": "Value"}, "imgs": [{"dtype": "string", "id": null, "_type": "Value"}]}, "post_processed": null, "supervised_keys": null, "task_templates": null, "builder_name": "mmchat", "config_name": "mmchat_lccc_filtered", "version": {"version_str": "1.0.0", "description": null, "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 232681680, "num_examples": 492611, "dataset_name": "mmchat"}}, "download_checksums": {"https://huggingface.co/datasets/silver/mmchat/resolve/main/mmchat_lccc_filtered/dialog_lccc_flt.jsonl.gz": {"num_bytes": 33623526, "checksum": "54ad76f67269f1adf3a974acfb71f79299283b1bdefbdb5e2928b8d52b53a64d"}, "https://huggingface.co/datasets/silver/mmchat/resolve/main/mmchat_lccc_filtered/weibo_img_expanded_url_lccc_flt.jsonl.gz": {"num_bytes": 38226987, "checksum": "6ffd6c8420ef37e6b5a2e88f054f0d5ae849617dea501c3342a512e63ba12a59"}, "https://huggingface.co/datasets/silver/mmchat/resolve/main/mmchat_lccc_filtered/weibo_lccc_flt.jsonl.gz": {"num_bytes": 34990489, "checksum": "d4900fd5f711fdcc752a60e84edcb6e16fcb9f2100f8b900ccf88af9a780816a"}}, "download_size": 106841002, "post_processing_size": null, "dataset_size": 232681680, "size_in_bytes": 339522682}}
|
dummy/mmchat/1.0.0/dummy_data.zip
ADDED
Binary file (3.34 kB). View file
|
|
dummy/mmchat/1.0.0/dummy_data.zip.lock
ADDED
File without changes
|
dummy/mmchat_hf/1.0.0/dummy_data.zip
ADDED
Binary file (2.58 kB). View file
|
|
dummy/mmchat_hf/1.0.0/dummy_data.zip.lock
ADDED
File without changes
|
dummy/mmchat_lccc_filtered/1.0.0/dummy_data.zip
ADDED
Binary file (2.26 kB). View file
|
|
dummy/mmchat_lccc_filtered/1.0.0/dummy_data.zip.lock
ADDED
File without changes
|
dummy/mmchat_raw/1.0.0/dummy_data.zip
ADDED
Binary file (2.42 kB). View file
|
|
dummy/mmchat_raw/1.0.0/dummy_data.zip.lock
ADDED
File without changes
|
mmchat.py
CHANGED
@@ -18,6 +18,7 @@ We design various strategies to ensure the quality of the dialogues in MMChat.
|
|
18 |
"""
|
19 |
|
20 |
import json
|
|
|
21 |
import datasets
|
22 |
|
23 |
|
@@ -50,22 +51,22 @@ _HOMEPAGE = "https://github.com/silverriver/MMChat"
|
|
50 |
_LICENSE = "MIT"
|
51 |
|
52 |
_URLS = {
|
53 |
-
"mmchat": {
|
54 |
-
"train": [
|
55 |
"https://huggingface.co/datasets/silver/mmchat/resolve/main/mmchat/dialog_train.jsonl.gz",
|
56 |
"https://huggingface.co/datasets/silver/mmchat/resolve/main/mmchat/img_url_train.jsonl.gz",
|
57 |
"https://huggingface.co/datasets/silver/mmchat/resolve/main/mmchat/weibo_train.jsonl.gz",
|
58 |
],
|
59 |
-
"dev": [
|
60 |
"https://huggingface.co/datasets/silver/mmchat/resolve/main/mmchat/dialog_dev.jsonl.gz",
|
61 |
"https://huggingface.co/datasets/silver/mmchat/resolve/main/mmchat/img_url_dev.jsonl.gz",
|
62 |
"https://huggingface.co/datasets/silver/mmchat/resolve/main/mmchat/weibo_dev.jsonl.gz",
|
63 |
],
|
64 |
-
"test": [
|
65 |
"https://huggingface.co/datasets/silver/mmchat/resolve/main/mmchat/dialog_test.jsonl.gz",
|
66 |
"https://huggingface.co/datasets/silver/mmchat/resolve/main/mmchat/img_url_test.jsonl.gz",
|
67 |
"https://huggingface.co/datasets/silver/mmchat/resolve/main/mmchat/weibo_test.jsonl.gz",
|
68 |
-
]
|
69 |
},
|
70 |
"mmchat_hf": [
|
71 |
"https://huggingface.co/datasets/silver/mmchat/resolve/main/mmchat_hf/dialog.jsonl.gz",
|
@@ -190,7 +191,8 @@ class MMChat(datasets.GeneratorBasedBuilder):
|
|
190 |
label_f = open(label_file, encoding="utf-8")
|
191 |
|
192 |
with open(dialog_file, encoding="utf-8") as dialog_f, open(weibo_file, encoding="utf-8") as weibo_f, open(
|
193 |
-
img_file, encoding="utf-8"
|
|
|
194 |
while True:
|
195 |
try:
|
196 |
dialog_line = dialog_f.readline().strip()
|
@@ -213,9 +215,7 @@ class MMChat(datasets.GeneratorBasedBuilder):
|
|
213 |
"labels": {
|
214 |
"image_qualified": True if label["image_quality"] == "1" else False,
|
215 |
"dialog_qualified": True if label["dialog_quality"] == "1" else False,
|
216 |
-
"dialog_image_related": True
|
217 |
-
if label["dialog_image_relativeness"] == "1"
|
218 |
-
else False,
|
219 |
},
|
220 |
}
|
221 |
else:
|
|
|
18 |
"""
|
19 |
|
20 |
import json
|
21 |
+
|
22 |
import datasets
|
23 |
|
24 |
|
|
|
51 |
_LICENSE = "MIT"
|
52 |
|
53 |
_URLS = {
|
54 |
+
"mmchat": {
|
55 |
+
"train": [
|
56 |
"https://huggingface.co/datasets/silver/mmchat/resolve/main/mmchat/dialog_train.jsonl.gz",
|
57 |
"https://huggingface.co/datasets/silver/mmchat/resolve/main/mmchat/img_url_train.jsonl.gz",
|
58 |
"https://huggingface.co/datasets/silver/mmchat/resolve/main/mmchat/weibo_train.jsonl.gz",
|
59 |
],
|
60 |
+
"dev": [
|
61 |
"https://huggingface.co/datasets/silver/mmchat/resolve/main/mmchat/dialog_dev.jsonl.gz",
|
62 |
"https://huggingface.co/datasets/silver/mmchat/resolve/main/mmchat/img_url_dev.jsonl.gz",
|
63 |
"https://huggingface.co/datasets/silver/mmchat/resolve/main/mmchat/weibo_dev.jsonl.gz",
|
64 |
],
|
65 |
+
"test": [
|
66 |
"https://huggingface.co/datasets/silver/mmchat/resolve/main/mmchat/dialog_test.jsonl.gz",
|
67 |
"https://huggingface.co/datasets/silver/mmchat/resolve/main/mmchat/img_url_test.jsonl.gz",
|
68 |
"https://huggingface.co/datasets/silver/mmchat/resolve/main/mmchat/weibo_test.jsonl.gz",
|
69 |
+
],
|
70 |
},
|
71 |
"mmchat_hf": [
|
72 |
"https://huggingface.co/datasets/silver/mmchat/resolve/main/mmchat_hf/dialog.jsonl.gz",
|
|
|
191 |
label_f = open(label_file, encoding="utf-8")
|
192 |
|
193 |
with open(dialog_file, encoding="utf-8") as dialog_f, open(weibo_file, encoding="utf-8") as weibo_f, open(
|
194 |
+
img_file, encoding="utf-8"
|
195 |
+
) as img_f:
|
196 |
while True:
|
197 |
try:
|
198 |
dialog_line = dialog_f.readline().strip()
|
|
|
215 |
"labels": {
|
216 |
"image_qualified": True if label["image_quality"] == "1" else False,
|
217 |
"dialog_qualified": True if label["dialog_quality"] == "1" else False,
|
218 |
+
"dialog_image_related": True if label["dialog_image_relativeness"] == "1" else False,
|
|
|
|
|
219 |
},
|
220 |
}
|
221 |
else:
|