import just what's needed
This commit is contained in:
parent
e141f2c7b0
commit
ef91b2fca7
@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user