From a59ddba2d53a4749c58ed38b59e2541998da2950 Mon Sep 17 00:00:00 2001 From: M66B Date: Tue, 5 Jan 2021 19:31:35 +0100 Subject: [PATCH] Added logging --- .../main/java/eu/faircode/email/MessageClassifier.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/MessageClassifier.java b/app/src/main/java/eu/faircode/email/MessageClassifier.java index eaef81377b..cbdac0f31a 100644 --- a/app/src/main/java/eu/faircode/email/MessageClassifier.java +++ b/app/src/main/java/eu/faircode/email/MessageClassifier.java @@ -227,12 +227,16 @@ public class MessageClassifier { List chances = new ArrayList<>(); for (String clazz : classStats.keySet()) { Integer messages = classMessages.get(account).get(clazz); - if (messages == null || messages == 0) + if (messages == null || messages == 0) { + Log.w("Classifier no messages class=" + account + ":" + clazz); continue; + } EntityFolder folder = db.folder().getFolderByName(account, clazz); - if (folder == null) + if (folder == null) { + Log.w("Classifier no folder class=" + account + ":" + clazz); continue; + } Stat stat = classStats.get(clazz); double chance = (double) stat.totalFrequency / messages / maxMatchedWords;