Esempio n. 1
0
 /** Returns the features for the highest-score current parse(s). */
 public HashVector getFeats() {
   HashVector result = new HashVector();
   // result.reset(theta.size(),0.0);
   for (ParseResult p : bestParses) p.getFeats(result);
   if (bestParses.size() > 1) result.divideBy(bestParses.size());
   return result;
 }
Esempio n. 2
0
 /** Returns the features for the highest-score current parse with semantics that equal sem. */
 public HashVector getFeats(Exp sem) {
   HashVector result = new HashVector();
   List<ParseResult> pr = findBestParses(allParses, sem);
   for (ParseResult p : pr) {
     p.getFeats(result);
   }
   if (pr.size() > 1) result.divideBy(pr.size());
   return result;
 }