Spaces:
Running
Running
togokah
commited on
Commit
·
b36f3a9
1
Parent(s):
2c2f1df
Update esp_sentence_bert.py
Browse files
utilities_language_bert/esp_sentence_bert.py
CHANGED
@@ -214,6 +214,10 @@ class TASK:
|
|
214 |
def inflect_distractors(self):
|
215 |
inflected_distractors = []
|
216 |
for distractor_lemma in self.distractors:
|
|
|
|
|
|
|
|
|
217 |
if distractor_lemma.count('_') > 1:
|
218 |
if distractor_lemma.startswith('haber_'):
|
219 |
distractor_lemma = distractor_lemma.split('_')[-2]
|
|
|
214 |
def inflect_distractors(self):
|
215 |
inflected_distractors = []
|
216 |
for distractor_lemma in self.distractors:
|
217 |
+
if distractor_lemma is None:
|
218 |
+
self.bad_target_word = True
|
219 |
+
self.inflected_distractors = None
|
220 |
+
continue
|
221 |
if distractor_lemma.count('_') > 1:
|
222 |
if distractor_lemma.startswith('haber_'):
|
223 |
distractor_lemma = distractor_lemma.split('_')[-2]
|