package backend;

import models.Word;

import java.util.Map;

/**
 * Created by hlib on 03.10.15.
 */
public class UnknownWordsAnalyzer {
    public static Map<String, Double> getFeaturesForUser() {
        return Word.getWordStatistics();
    }
}

@@ -49,19 +49,17 @@
 va.util.
-Map
+*
 ;%0A%0A/**%0A 
@@ -190,16 +190,16 @@
 ser() %7B%0A
-
         
@@ -236,11 +236,655 @@
 );%0A    %7D
+%0A%0A    public static void updateWordsStatistics(List%3CString%3E encounteredWords, List%3CString%3E unknownWords) %7B%0A        Set%3CString%3E encounteredWordsSet = new HashSet%3C%3E(encounteredWords);%0A        Set%3CString%3E unknownWordsSet = new HashSet%3C%3E(unknownWords);%0A        encounteredWordsSet.stream().forEach(w -%3E %7B%0A            Word word = Word.findByValue(w);%0A            word.setShowedCount(word.getShowedCount() + 1);%0A            word.update();%0A        %7D);%0A        unknownWordsSet.stream().forEach(w -%3E %7B%0A            Word word = Word.findByValue(w);%0A            word.setUnknownCount(word.getUnknownCount() + 1);%0A            word.update();%0A        %7D);%0A    %7D
 %0A%7D%0A

add method for updated words statistics