Upload PAIR.py
Browse files
PAIR.py
CHANGED
|
@@ -14,7 +14,7 @@
|
|
| 14 |
|
| 15 |
|
| 16 |
import json
|
| 17 |
-
|
| 18 |
import datasets
|
| 19 |
|
| 20 |
# TODO: Add BibTeX citation
|
|
@@ -117,7 +117,7 @@ class PAIRDataset(datasets.GeneratorBasedBuilder):
|
|
| 117 |
"annotation_type": annotation_type,
|
| 118 |
"sequence": elem["seq"],
|
| 119 |
"pid": elem["pid"],
|
| 120 |
-
"annotation": elem["content"][0],
|
| 121 |
}
|
| 122 |
counter += 1
|
| 123 |
|
|
|
|
| 14 |
|
| 15 |
|
| 16 |
import json
|
| 17 |
+
from ast import literal_eval
|
| 18 |
import datasets
|
| 19 |
|
| 20 |
# TODO: Add BibTeX citation
|
|
|
|
| 117 |
"annotation_type": annotation_type,
|
| 118 |
"sequence": elem["seq"],
|
| 119 |
"pid": elem["pid"],
|
| 120 |
+
"annotation": literal_eval(elem["content"][0]),
|
| 121 |
}
|
| 122 |
counter += 1
|
| 123 |
|