diff --git a/check.py b/check.py index 3d435b1..7e7c2cf 100644 --- a/check.py +++ b/check.py @@ -86,7 +86,7 @@ def suggestCorrectionsFromCustomDic(self, typo, distance_limit=3): min_dist = distance_limit + 1 suggested_word = None - for knownWord in self.dict: + for knownWord in self.custom_dict: dist = distance(typo, knownWord, score_cutoff=distance_limit) # Levenshtein.distance returns -1 when the true distance exceeds score_cutoff. # Ignore such values instead of treating -1 as a better (smaller) distance. @@ -102,7 +102,7 @@ def isIssueValid(self, issue): issue.offsetInContext : issue.offsetInContext + issue.errorLength ] - if context in self.dict: + if context in self.custom_dict: return False else: return True @@ -195,7 +195,7 @@ def main(): language=args.language, check_source=config["checkSourceString"], check_translation=config["checkTranslationString"], - dict=config["customDictionary"], + custom_dict=config["customDictionary"], disabled_rules=config["disabledRules"], verbose=args.verbose, )