code: public final double[] eval(String[] context, double[] outsums) {
        int[] activeOutcomes;
        double[] activeParameters;
          for (int oid=0; oid<numOutcomes; oid++) {
              outsums[oid] = iprob;
              numfeats[oid] = 0;
          }
          for (int i=0; i<context.length; i++) {
              int contextIndex = pmap.get(context[i]);
              if (contextIndex >= 0) {
                  Context predParams = params[contextIndex];
                  activeOutcomes = predParams.getOutcomes();
                  activeParameters = predParams.getParameters();
                  for (int j=0; j<activeOutcomes.length; j++) {
  	                int oid = activeOutcomes[j];
  	                numfeats[oid]++;
  	                outsums[oid] += activeParameters[j];
                  }
              }
          }
  
          double normal = 0.0;
          for (int oid=0; oid<numOutcomes; oid++) {
              outsums[oid] = Math.exp((outsums[oid]*fval)
                                      + ((1.0 -(numfeats[oid]/correctionConstant))
                                         * correctionParam));
              normal += outsums[oid];
          }
  
          for (int oid=0; oid<numOutcomes; oid++)
              outsums[oid] /= normal;
  
          return outsums;
      }
docs: Use this model to evaluate a context and return an array of the
  likelihood of each outcome given that context.
  
  @param context The names of the predicates which have been observed at
  the present decision point.
  @param outsums This is where the distribution is stored.
  @return        The normalized probabilities for the outcomes given the
  context. The indexes of the double[] are the outcome
  ids, and the actual string representation of the
  outcomes can be obtained from the method
  getOutcome(int i).