PTR_ARRAY_FOREACH (chain->languages, i, elt) {
cand = g_hash_table_lookup (candidates, elt->elt->name);
prob = elt->prob;
+
+ if (prob < chain->mean) {
+ continue;
+ }
#ifdef NGRAMMS_DEBUG
msg_err ("gramm: %s, lang: %s, prob: %.3f", chain->utf,
elt->elt->name, log2 (elt->prob));
p2 = g_ptr_array_index (task->text_parts, 1);
/* First of all check parent object */
- if (p1->mime_part->parent_part &&
- p1->mime_part->parent_part == p2->mime_part->parent_part) {
+ if (p1->mime_part->parent_part) {
rspamd_ftok_t srch;
srch.begin = "alternative";