Skip to content

Commit

Permalink
Fixed bug where definitions.json would not open properly on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
othmanalikhan committed Nov 21, 2023
1 parent 1213013 commit 6b415b6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions text_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def string_tokenizer(text):
def similarity(a, b): return difflib.SequenceMatcher(None, a, b).ratio() * 100

def get_regexes():
with open('definitions.json') as json_file:
with open('definitions.json', "r", encoding='utf-8') as json_file:
_rules = json.load(json_file)
return _rules

Expand Down Expand Up @@ -133,4 +133,4 @@ def keywords_classify_pii(rules, intelligible_text_list):
) > 80: scores[key] += 1

return scores


0 comments on commit 6b415b6

Please sign in to comment.