Update DEFT2021.py
Browse files- DEFT2021.py +2 -1
DEFT2021.py
CHANGED
@@ -7,6 +7,7 @@ from pathlib import Path
|
|
7 |
from itertools import product
|
8 |
from dataclasses import dataclass
|
9 |
from typing import Dict, List, Tuple
|
|
|
10 |
|
11 |
import datasets
|
12 |
import numpy as np
|
@@ -72,7 +73,7 @@ class StringIndex:
|
|
72 |
|
73 |
return "is_not_oov" if t in self.vocab_struct[key] else "is_oov"
|
74 |
|
75 |
-
_VOCAB = StringIndex(vocab=
|
76 |
|
77 |
class DEFT2021(datasets.GeneratorBasedBuilder):
|
78 |
|
|
|
7 |
from itertools import product
|
8 |
from dataclasses import dataclass
|
9 |
from typing import Dict, List, Tuple
|
10 |
+
import requests
|
11 |
|
12 |
import datasets
|
13 |
import numpy as np
|
|
|
73 |
|
74 |
return "is_not_oov" if t in self.vocab_struct[key] else "is_oov"
|
75 |
|
76 |
+
_VOCAB = StringIndex(vocab=requests.get("https://huggingface.co/datasets/BioMedTok/vocabulary_nachos_lowercased/resolve/main/vocabulary_nachos_lowercased.txt").text.split("\n"))
|
77 |
|
78 |
class DEFT2021(datasets.GeneratorBasedBuilder):
|
79 |
|