mirror of
https://github.com/M66B/FairEmail.git
synced 2025-02-24 07:01:05 +00:00
Require minimum words for each class
This commit is contained in:
parent
206a7dd0f2
commit
6ccf708e95
1 changed files with 2 additions and 3 deletions
|
@ -250,14 +250,13 @@ public class MessageClassifier {
|
|||
EntityLog.log(context, "Classifier " + c +
|
||||
" frequency=" + stat.totalFrequency + "/" + messages +
|
||||
" matched=" + stat.matchedWords + "/" + maxMatchedWords);
|
||||
chances.add(c);
|
||||
if (stat.matchedWords >= MIN_MATCHED_WORDS)
|
||||
chances.add(c);
|
||||
}
|
||||
|
||||
if (BuildConfig.DEBUG)
|
||||
Log.i("Classifier words=" + TextUtils.join(", ", words));
|
||||
|
||||
if (maxMatchedWords < MIN_MATCHED_WORDS)
|
||||
return null;
|
||||
if (chances.size() <= 1)
|
||||
return null;
|
||||
|
||||
|
|
Loading…
Reference in a new issue