This is a version of the Primock-57 dataset converted to the sdialog Dialog JSON format.
It allows easy loading as dialog objects via Dialog.from_file() or Dialog.from_huggingface.
The dataset contains 57 simulated primary-care style consultations (doctor ↔ patient). Each dialog is stored as an individual JSON file and includes a sequence of turns labelled by speaker.
Dialog.from_huggingface())Simply use the Dialog.from_huggingface() as in the following example:
from sdialog import Dialog
primock57_dialogs = Dialog.from_huggingface("sdialog/Primock-57")
print("Number of dialogs:", len(primock57_dialogs))
Dialog.from_file())Alternatively, if you want to do it manually, you have to:
"Primock-57"):from huggingface_hub import snapshot_download
snapshot_download(
repo_id="sdialog/Primock-57",
repo_type="dataset",
local_dir="Primock-57",
)
Dialog objects:from sdialog import Dialog
primock57_dialogs = Dialog.from_file("Primock-57/")
print("Number of dialogs:", len(primock57_dialogs))
# Pretty-print the first dialog
primock57_dialogs[0].print()
You can also load an individual dialog by specifying its file path directly:
from sdialog import Dialog
consultation01_dialog = Dialog.from_file("Primock-57/day1_consultation01_conversation.json")
consultation01_dialog.print()
12 commits
This is a version of the Primock-57 dataset converted to the sdialog Dialog JSON format.
It allows easy loading as dialog objects via Dialog.from_file() or Dialog.from_huggingface.
The dataset contains 57 simulated primary-care style consultations (doctor ↔ patient). Each dialog is stored as an individual JSON file and includes a sequence of turns labelled by speaker.
Dialog.from_huggingface())Simply use the Dialog.from_huggingface() as in the following example:
from sdialog import Dialog
primock57_dialogs = Dialog.from_huggingface("sdialog/Primock-57")
print("Number of dialogs:", len(primock57_dialogs))
Dialog.from_file())Alternatively, if you want to do it manually, you have to:
"Primock-57"):from huggingface_hub import snapshot_download
snapshot_download(
repo_id="sdialog/Primock-57",
repo_type="dataset",
local_dir="Primock-57",
)
Dialog objects:from sdialog import Dialog
primock57_dialogs = Dialog.from_file("Primock-57/")
print("Number of dialogs:", len(primock57_dialogs))
# Pretty-print the first dialog
primock57_dialogs[0].print()
You can also load an individual dialog by specifying its file path directly:
from sdialog import Dialog
consultation01_dialog = Dialog.from_file("Primock-57/day1_consultation01_conversation.json")
consultation01_dialog.print()
12 commits