chore: add fields with defaults
This commit is contained in:
parent
21a87bbfec
commit
981fc419bd
@ -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
|
||||||
|
Reference in New Issue
Block a user