chore: add fields with defaults

This commit is contained in:
surtur 2021-12-20 03:58:45 +01:00
parent 21a87bbfec
commit 981fc419bd
Signed by: wanderer
GPG Key ID: 19CE1EC1D9E0486D

@ -10,11 +10,14 @@ class da_detector:
# langs to check # langs to check
# to be picked from ["cz", "sk", "de", "en", "fr"] # to be picked from ["cz", "sk", "de", "en", "fr"]
self.da_ngrams = [] self.da_ngrams = []
self.what_grams = 3
self.how_many = 30
if not isinstance(langs_to_check, list): if not isinstance(langs_to_check, list):
raise TypeError("not a list, bailing") raise TypeError("not a list, bailing")
if (len(langs_to_check) < 2): if (len(langs_to_check) < 2):
raise ValueError("too few languages specified") raise ValueError("too few languages specified")
self.langs_to_check = ["sk", "en"]
def rm_interpunction(data): def rm_interpunction(data):
from string import punctuation from string import punctuation