Datasets:

Modalities:
Text
Formats:
json
Languages:
English
Size:
< 1K
Libraries:
Datasets
Dask
License:
sergioburdisso commited on
Commit
cccfa19
·
verified ·
1 Parent(s): f5b3952

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +17 -0
README.md CHANGED
@@ -4,4 +4,21 @@ license: cc-by-4.0
4
 
5
  A version of the [Primock-57](https://github.com/babylonhealth/primock57) dataset converted to [sdialog](https://github.com/idiap/sdialog) `Dialog` json format, so they can be loaded as dialog objects with `Dialog.from_file(path/to/dialog.json)`.
6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7
  **License:** [Creative Commons Attribution 4.0 International](https://github.com/babylonhealth/primock57?tab=License-1-ov-file#readme)
 
4
 
5
  A version of the [Primock-57](https://github.com/babylonhealth/primock57) dataset converted to [sdialog](https://github.com/idiap/sdialog) `Dialog` json format, so they can be loaded as dialog objects with `Dialog.from_file(path/to/dialog.json)`.
6
 
7
+ Example usage:
8
+ ```python
9
+ from sdialog import Dialog
10
+ from huggingface_hub import snapshot_download
11
+
12
+ # Download the Primock-57 dataset from Hugging Face Hub to a local "datasets" directory
13
+ snapshot_download(repo_id="sdialog/Primock-57", repo_type="dataset",
14
+ local_dir="datasets")
15
+
16
+ # Load the Primock-57 dataset as Dialog object
17
+ primock57_dialogs = Dialog.from_file("datasets/Primock-57/")
18
+ print("Number of dialogs:", len(primock57_dialogs))
19
+
20
+ # Let's pretty-print the first dialog
21
+ primock57_dialogs[0].print()
22
+ ```
23
+
24
  **License:** [Creative Commons Attribution 4.0 International](https://github.com/babylonhealth/primock57?tab=License-1-ov-file#readme)