@Override
    public Double getScalarValue(Word word) {
        for (Word word1:wordList) {
            if (word1.getKeyWord().equals(word.getKeyWord())){
                if(word1.getSpamLabel().equals(word.getSubkey())){
                    return word1.getSpamCount();
                }else  if(word1.getGenuineLabel().equals(word.getSubkey())) {
                    return word1.getGeuineCount();
                }
                return word1.getProb();
            }
        }
        return 0.0;
    }