Examples of PairOfFloats


Examples of edu.umd.cloud9.io.pair.PairOfFloats

        // future work = binary feature if there is same multi-digit number on both sides (e.g. 4-digit for years)
        getNumberRatio(fTokens, eTokens);
        if (featSet > 3) {
          // uppercase token matching features : find uppercased tokens that exactly appear on both sides
          // lack of this evidence does not imply anything, but its existence might indicate parallel
          PairOfFloats pair = getUppercaseRatio(fTokens, eTokens);
          features.add("uppercaseratio=" + Math.max(pair.getLeftElement(), pair.getRightElement()));
        }
      }
    }

    return features.toArray(new String[features.size()]);
View Full Code Here

Examples of edu.umd.cloud9.io.pair.PairOfFloats

          cntUpperMatch++;         
          //          System.out.println("DEBUG["+uppercase+"]["+uppercase2+"]");
        }
      }
    }
    PairOfFloats pair = new PairOfFloats(
        upperCaseMap1.isEmpty() ? 0f : cntUpperMatch / upperCaseMap1.size(),
            upperCaseMap2.isEmpty() ? 0f : cntUpperMatch / upperCaseMap2.size());
    return pair;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.