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

update docs

This commit is contained in:
uvafan
2020-05-20 12:31:04 -04:00
parent b6c0e740b0
commit 49bcce8101
26 changed files with 154 additions and 111 deletions

View File

@@ -5,12 +5,12 @@ from textattack.constraints import Constraint
class LanguageModelConstraint(Constraint):
"""
Determines if two sentences have a swapped word that has a similar
probability according to a language model.
Determines if two sentences have a swapped word that has a similar
probability according to a language model.
Args:
max_log_prob_diff (float): the maximum difference in log-probability
between x and x_adv
Args:
max_log_prob_diff (float): the maximum difference in log-probability
between x and x_adv
"""
def __init__(self, max_log_prob_diff=None):