Classifier: more emphasis on words before/after

pull/191/head
M66B 4 years ago
parent e15a7f9d12
commit d59d6e37a4

@ -306,7 +306,7 @@ public class MessageClassifier {
int c = frequency.count;
Integer b = (before == null ? null : frequency.before.get(before));
Integer a = (after == null ? null : frequency.after.get(after));
double f = ((b == null ? 0 : b) + c + (a == null ? 0 : a)) / 3.0;
double f = ((b == null ? 0 : 2 * b) + c + (a == null ? 0 : 2 * a)) / 5.0;
stat.totalFrequency += f;
stat.matchedWords++;

Loading…
Cancel
Save