Package org.deri.grefine.reconcile.model

Examples of org.deri.grefine.reconcile.model.ReconciliationCandidate


          moreThanOneMatch = true;
        }else{
          match = true;
        }
      }
      ReconciliationCandidate candidate = new ReconciliationCandidate(entity.getURI(), scoredLabel.label, new String[] {}, scoredLabel.score,match);
     
      candidates.add(candidate);
    }
    if(moreThanOneMatch){
      //set all candidates as match =false
      for(ReconciliationCandidate candidate:candidates){
        candidate.setMatch(false);
      }
    }
    //sort according to score
    Collections.sort(candidates, new Comparator<ReconciliationCandidate>() {
View Full Code Here


  public List<ReconciliationCandidate> wrapResultset(ResultSet resultSet,String queryString, double matchThreshold){
    List<ReconciliationCandidate> candidates = new ArrayList<ReconciliationCandidate>();
    while(resultSet.hasNext()){
      QuerySolution solution = resultSet.nextSolution();
      Resource entity = solution.getResource("entity");
      ReconciliationCandidate candidate = new ReconciliationCandidate(entity.getURI(), queryString, new String[] {}, 1.0d,true);
     
      candidates.add(candidate);
    }
    if(candidates.size() > 1 || matchThreshold > 1 ){
      //set all match =false
      for(ReconciliationCandidate candidate : candidates){
        candidate.setMatch(false);
      }
    }
    return candidates;
  }
View Full Code Here

          moreThanOneMatchFound = true;
        }else{
          match = true;
        }
      }
      candidates.add(new ReconciliationCandidate(entityUri, label, new String[] {}, score, match));
     
      if(candidates.size()==limit){
        //we got enough
        break;
      }
View Full Code Here

TOP

Related Classes of org.deri.grefine.reconcile.model.ReconciliationCandidate

Copyright © 2018 www.massapicom. 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.