Skip to content

Commit 7dbe1c6

Browse files
committed
change gibberish modle path
1 parent b824c1a commit 7dbe1c6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pii/utils/emails_ip_addresses_detection.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
from gibberish_detector import detector
2525

2626
# Regexes for PII detection
27+
GIBBERISH_MODEL_PATH = './gibberish_data/big.model'
2728

2829
year_patterns = [
2930
regex.compile(
@@ -149,7 +150,7 @@ def is_gibberish(matched_str):
149150
# pip install gibberish-detector
150151
# download the training corpora from https://raw.githubusercontent.com/domanchi/gibberish-detector/master/examples/big.txt
151152
# run gibberish-detector train big.txt > big.model to generate the model (it takes 3 seconds)
152-
Detector = detector.create_from_model('gibberish_data/big.model')
153+
Detector = detector.create_from_model(GIBBERISH_MODEL_PATH)
153154
return Detector.is_gibberish(matched_str.lower())
154155

155156

0 commit comments

Comments
 (0)