mirror of
https://github.com/QData/TextAttack.git
synced 2021-10-13 00:05:06 +03:00
add LM constraint to args + formatting
This commit is contained in:
@@ -31,7 +31,7 @@ class LanguageModelConstraint(ABC, Constraint):
|
||||
def _check_constraint(self, transformed_text, current_text, original_text=None):
|
||||
if self.compare_against_original:
|
||||
current_text = original_text
|
||||
|
||||
|
||||
try:
|
||||
indices = transformed_text.attack_attrs["newly_modified_indices"]
|
||||
except KeyError:
|
||||
|
||||
Reference in New Issue
Block a user