import just what's needed

This commit is contained in:
surtur 2021-12-16 03:13:46 +01:00
parent e141f2c7b0
commit ef91b2fca7
Signed by: wanderer
GPG Key ID: 19CE1EC1D9E0486D

@ -10,10 +10,10 @@ class da_detector:
self.langs_to_check = ["cz", "sk", "de", "en", "fr"]
def rm_interpunction(data):
import string
from string import punctuation
for ngram in data:
try:
ngram = ngram.translate(str.maketrans('', '', string.punctuation))
ngram = ngram.translate(str.maketrans('', '', punctuation))
except Exception as e:
raise e