Examples of PseudoJudgments


Examples of ivory.ptc.data.PseudoJudgments

* @author Nima Asadi
*/
public class WholeJudgmentExtractor implements PseudoJudgmentExtractor {
  @Override
  public PseudoJudgments getPseudoJudgments(ArrayListWritable<AnchorTextTarget> anchorTextTargets) {
    PseudoJudgments judgments = new PseudoJudgments();
    for(AnchorTextTarget a :  anchorTextTargets) {
      judgments.add(a.getTarget(), a.getWeight());
   
    return judgments;
  }
View Full Code Here

Examples of ivory.ptc.data.PseudoJudgments

public class TopNJudgmentExtractor implements PseudoJudgmentExtractor {
  private static int n = 10;

  @Override
  public PseudoJudgments getPseudoJudgments(ArrayListWritable<AnchorTextTarget> anchorTextTargets) {
    PseudoJudgments judgments = new PseudoJudgments();
    int i = 0;
    for(AnchorTextTarget a :  anchorTextTargets) {
      if(i == n) {
        break;
      }
      judgments.add(a.getTarget(), a.getWeight());
      i++;
    }
    return judgments;
  }
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.