Datasets:
Upload folder using huggingface_hub
Browse files- .gitattributes +2 -0
- __pycache__/medqa_corpus_en.cpython-310.pyc +0 -0
- medqa_corpus_en.py +11 -2
- textbooks/en/Anatomy_Gray.jsonl +0 -0
- textbooks/en/Biochemistry_Lippincott.jsonl +0 -0
- textbooks/en/Cell_Biology_Alberts.jsonl +0 -0
- textbooks/en/First_Aid_Step1.jsonl +0 -0
- textbooks/en/First_Aid_Step2.jsonl +0 -0
- textbooks/en/Gynecology_Novak.jsonl +0 -0
- textbooks/en/Histology_Ross.jsonl +0 -0
- textbooks/en/Immunology_Janeway.jsonl +0 -0
- textbooks/en/InternalMed_Harrison.jsonl +3 -0
- textbooks/en/Neurology_Adams.jsonl +0 -0
- textbooks/en/Obstentrics_Williams.jsonl +0 -0
- textbooks/en/Pathology_Robbins.jsonl +0 -0
- textbooks/en/Pathoma_Husain.jsonl +0 -0
- textbooks/en/Pediatrics_Nelson.jsonl +0 -0
- textbooks/en/Pharmacology_Katzung.jsonl +0 -0
- textbooks/en/Physiology_Levy.jsonl +0 -0
- textbooks/en/Psichiatry_DSM-5.jsonl +0 -0
- textbooks/en/Surgery_Schwartz.jsonl +3 -0
.gitattributes
CHANGED
@@ -53,3 +53,5 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
53 |
*.jpg filter=lfs diff=lfs merge=lfs -text
|
54 |
*.jpeg filter=lfs diff=lfs merge=lfs -text
|
55 |
*.webp filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
53 |
*.jpg filter=lfs diff=lfs merge=lfs -text
|
54 |
*.jpeg filter=lfs diff=lfs merge=lfs -text
|
55 |
*.webp filter=lfs diff=lfs merge=lfs -text
|
56 |
+
textbooks/en/InternalMed_Harrison.jsonl filter=lfs diff=lfs merge=lfs -text
|
57 |
+
textbooks/en/Surgery_Schwartz.jsonl filter=lfs diff=lfs merge=lfs -text
|
__pycache__/medqa_corpus_en.cpython-310.pyc
ADDED
Binary file (5.42 kB). View file
|
|
medqa_corpus_en.py
CHANGED
@@ -117,7 +117,6 @@ def get_med_qa_textbooks(location, subset_name):
|
|
117 |
yield json.loads(line)
|
118 |
|
119 |
|
120 |
-
# TODO: Name of the dataset usually matches the script name with CamelCase instead of snake_case
|
121 |
class MedQACorpus(datasets.GeneratorBasedBuilder):
|
122 |
"""MedQA Textbook (English) with emphasis on domain of Clinical Medicine and other subsets."""
|
123 |
|
@@ -150,12 +149,22 @@ class MedQACorpus(datasets.GeneratorBasedBuilder):
|
|
150 |
def _split_generators(self, dl_manager):
|
151 |
urls = _URLS[0]
|
152 |
data_dir = Path(dl_manager.download_and_extract(urls))
|
153 |
-
self.base_dir = data_dir / "
|
154 |
|
155 |
return [
|
156 |
datasets.SplitGenerator(name=datasets.Split.TRAIN)
|
157 |
]
|
158 |
|
159 |
def _generate_examples(self):
|
|
|
160 |
for key, record in enumerate(get_med_qa_textbooks(self.base_dir, self.config.name)):
|
161 |
yield key, record
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
117 |
yield json.loads(line)
|
118 |
|
119 |
|
|
|
120 |
class MedQACorpus(datasets.GeneratorBasedBuilder):
|
121 |
"""MedQA Textbook (English) with emphasis on domain of Clinical Medicine and other subsets."""
|
122 |
|
|
|
149 |
def _split_generators(self, dl_manager):
|
150 |
urls = _URLS[0]
|
151 |
data_dir = Path(dl_manager.download_and_extract(urls))
|
152 |
+
self.base_dir = data_dir / "textbooks" / "en"
|
153 |
|
154 |
return [
|
155 |
datasets.SplitGenerator(name=datasets.Split.TRAIN)
|
156 |
]
|
157 |
|
158 |
def _generate_examples(self):
|
159 |
+
print(f"Generating examples in {self.base_dir} under {self.config.name}")
|
160 |
for key, record in enumerate(get_med_qa_textbooks(self.base_dir, self.config.name)):
|
161 |
yield key, record
|
162 |
+
|
163 |
+
# if __name__ == '__main__':
|
164 |
+
# c = MedQACorpus()
|
165 |
+
# c.base_dir = Path('/home/chimezie/Projects/Oori/medical_llm/MedQACorpus/textbooks/en')
|
166 |
+
# c.config.name = "basic_biology"
|
167 |
+
# for k, r in c._generate_examples():
|
168 |
+
# print(k, r)
|
169 |
+
# break
|
170 |
+
#
|
textbooks/en/Anatomy_Gray.jsonl
ADDED
The diff for this file is too large to render.
See raw diff
|
|
textbooks/en/Biochemistry_Lippincott.jsonl
ADDED
The diff for this file is too large to render.
See raw diff
|
|
textbooks/en/Cell_Biology_Alberts.jsonl
ADDED
The diff for this file is too large to render.
See raw diff
|
|
textbooks/en/First_Aid_Step1.jsonl
ADDED
The diff for this file is too large to render.
See raw diff
|
|
textbooks/en/First_Aid_Step2.jsonl
ADDED
The diff for this file is too large to render.
See raw diff
|
|
textbooks/en/Gynecology_Novak.jsonl
ADDED
The diff for this file is too large to render.
See raw diff
|
|
textbooks/en/Histology_Ross.jsonl
ADDED
The diff for this file is too large to render.
See raw diff
|
|
textbooks/en/Immunology_Janeway.jsonl
ADDED
The diff for this file is too large to render.
See raw diff
|
|
textbooks/en/InternalMed_Harrison.jsonl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:9a4eb18276b36e916300cc8095a52f08529c5f22405a2595539e465593a656ce
|
3 |
+
size 23687472
|
textbooks/en/Neurology_Adams.jsonl
ADDED
The diff for this file is too large to render.
See raw diff
|
|
textbooks/en/Obstentrics_Williams.jsonl
ADDED
The diff for this file is too large to render.
See raw diff
|
|
textbooks/en/Pathology_Robbins.jsonl
ADDED
The diff for this file is too large to render.
See raw diff
|
|
textbooks/en/Pathoma_Husain.jsonl
ADDED
The diff for this file is too large to render.
See raw diff
|
|
textbooks/en/Pediatrics_Nelson.jsonl
ADDED
The diff for this file is too large to render.
See raw diff
|
|
textbooks/en/Pharmacology_Katzung.jsonl
ADDED
The diff for this file is too large to render.
See raw diff
|
|
textbooks/en/Physiology_Levy.jsonl
ADDED
The diff for this file is too large to render.
See raw diff
|
|
textbooks/en/Psichiatry_DSM-5.jsonl
ADDED
The diff for this file is too large to render.
See raw diff
|
|
textbooks/en/Surgery_Schwartz.jsonl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:8a75e5c2a1c6ab533c9e06c6eb6153e2c08f9f41b1e3c443056a91b07e07575f
|
3 |
+
size 12089605
|