mirror of
https://github.com/M66B/FairEmail.git
synced 2024-12-27 10:17:18 +00:00
Optimization
This commit is contained in:
parent
4d6e8c740b
commit
9d709ccb69
1 changed files with 5 additions and 3 deletions
|
@ -249,15 +249,17 @@ public class MessageClassifier {
|
|||
|
||||
JSONArray jwords = new JSONArray();
|
||||
for (Long account : classMessages.keySet())
|
||||
for (String word : wordClassFrequency.get(account).keySet())
|
||||
for (String clazz : wordClassFrequency.get(account).get(word).keySet()) {
|
||||
for (String word : wordClassFrequency.get(account).keySet()) {
|
||||
Map<String, Integer> classFrequency = wordClassFrequency.get(account).get(word);
|
||||
for (String clazz : classFrequency.keySet()) {
|
||||
JSONObject jword = new JSONObject();
|
||||
jword.put("account", account);
|
||||
jword.put("word", word);
|
||||
jword.put("class", clazz);
|
||||
jword.put("frequency", wordClassFrequency.get(account).get(word).get(clazz));
|
||||
jword.put("frequency", classFrequency.get(clazz));
|
||||
jwords.put(jword);
|
||||
}
|
||||
}
|
||||
|
||||
JSONObject jroot = new JSONObject();
|
||||
jroot.put("messages", jmessages);
|
||||
|
|
Loading…
Reference in a new issue