Datasets:
Update README.md
Browse files
README.md
CHANGED
|
@@ -87,15 +87,15 @@ import json
|
|
| 87 |
|
| 88 |
path = <path to committee_full_sentences.jsonl> #or any other sentences jsonl file
|
| 89 |
with open(path, encoding="utf-8") as file:
|
| 90 |
-
|
| 91 |
-
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
|
| 95 |
-
|
| 96 |
-
|
| 97 |
-
|
| 98 |
-
|
| 99 |
```
|
| 100 |
|
| 101 |
## Subsets
|
|
|
|
| 87 |
|
| 88 |
path = <path to committee_full_sentences.jsonl> #or any other sentences jsonl file
|
| 89 |
with open(path, encoding="utf-8") as file:
|
| 90 |
+
for line in file:
|
| 91 |
+
try:
|
| 92 |
+
sent = json.loads(line)
|
| 93 |
+
except Exception as e:
|
| 94 |
+
print(f'couldnt load json line. error:{e}.')
|
| 95 |
+
sent_id = sent["sentence_id"]
|
| 96 |
+
sent_text = sent["sentence_text"]
|
| 97 |
+
speaker_name = sent["speaker_name"]
|
| 98 |
+
print(f"ID: {sent_id}, speaker name: {speaker_name}, text: {sent_text")
|
| 99 |
```
|
| 100 |
|
| 101 |
## Subsets
|