Fix type hint
Browse files- spl_adr_200db.py +2 -2
spl_adr_200db.py
CHANGED
|
@@ -57,7 +57,7 @@ https://bionlp.nlm.nih.gov/tac2017adversereactions/
|
|
| 57 |
import xml.etree.ElementTree as ET
|
| 58 |
from collections import defaultdict
|
| 59 |
from itertools import accumulate
|
| 60 |
-
from typing import Dict, List, Tuple
|
| 61 |
|
| 62 |
import datasets
|
| 63 |
|
|
@@ -378,7 +378,7 @@ class SplAdr200DBDataset(datasets.GeneratorBasedBuilder):
|
|
| 378 |
"coreferences": [],
|
| 379 |
}
|
| 380 |
|
| 381 |
-
def _generate_examples(self, filepaths: Tuple[
|
| 382 |
"""Yields examples as (key, example) tuples."""
|
| 383 |
|
| 384 |
for file_index, (drug_filename, drug_file) in enumerate(filepaths):
|
|
|
|
| 57 |
import xml.etree.ElementTree as ET
|
| 58 |
from collections import defaultdict
|
| 59 |
from itertools import accumulate
|
| 60 |
+
from typing import BinaryIO, Dict, Iterable, List, Tuple
|
| 61 |
|
| 62 |
import datasets
|
| 63 |
|
|
|
|
| 378 |
"coreferences": [],
|
| 379 |
}
|
| 380 |
|
| 381 |
+
def _generate_examples(self, filepaths: Iterable[Tuple[str, BinaryIO]]) -> Tuple[int, Dict]:
|
| 382 |
"""Yields examples as (key, example) tuples."""
|
| 383 |
|
| 384 |
for file_index, (drug_filename, drug_file) in enumerate(filepaths):
|