make missing n-grams have greater overall impact
This commit is contained in:
parent
981fc419bd
commit
ac3a130c92
@ -122,7 +122,7 @@ class da_detector:
|
|||||||
if len(probabilities) == 0:
|
if len(probabilities) == 0:
|
||||||
raise ValueError("empty list, bailing")
|
raise ValueError("empty list, bailing")
|
||||||
# a pretty good bogus probability is a one close™ reasonably to zero
|
# a pretty good bogus probability is a one close™ reasonably to zero
|
||||||
return [0.000000123 if n is None else n for n in probabilities]
|
return [0.000000001 if n is None else n for n in probabilities]
|
||||||
|
|
||||||
# return proper probabilities for multiple languages
|
# return proper probabilities for multiple languages
|
||||||
def gimme_probabs_multi_lang(
|
def gimme_probabs_multi_lang(
|
||||||
|
Reference in New Issue
Block a user