@Override
    protected void paramTest(String w, Classificacio[] m) {
        
        if (this.frequency || !(calculat.containsKey(w))) {
        
            calculat.put(w,true);
            
            double resdict = (dict.getWord(w)>5)?1:0;
            double resngram = ngrams.wordProb(w)*(1+w.length());
            double resultat = 0.0;

            for (int i = 0; i < lambdas.length; ++i) {
                
                
                // calculem el resultat ponderat
                resultat = resdict + this.lambdas[i] * resngram;
               // normalitzem la probabilitat dels ngrames
                resultat = resultat / (1 + this.lambdas[i]);


                m[i].add(w,resultat);
            }
          
            m[lambdas.length]=m[lambdas.length].add(w,resdict);
            m[lambdas.length+1]=m[lambdas.length+1].add(w,resngram);
            
        }
    }