1
0
mirror of https://github.com/QData/TextAttack.git synced 2021-10-13 00:05:06 +03:00

make requested fixes

This commit is contained in:
uvafan
2020-05-18 18:30:23 -04:00
parent 0794f6ed38
commit 8c265fe23f
20 changed files with 113 additions and 176 deletions

View File

@@ -28,7 +28,7 @@ class LanguageModelConstraint(Constraint):
try:
indices = x_adv.attack_attrs['newly_modified_indices']
except KeyError:
raise KeyError('Cannot apply part-of-speech constraint without `newly_modified_indices`')
raise KeyError('Cannot apply language model constraint without `newly_modified_indices`')
for i in indices:
probs = self.get_log_probs_at_index((x, x_adv), i)