Package com.google.refine.org.deri.reconcile.model

Examples of com.google.refine.org.deri.reconcile.model.ReconciliationRequest


  QueryEndpoint mockEndpoint;
 
  @BeforeMethod
  public void setUp() throws Exception{
    jsonUtil = new GRefineJsonUtilitiesImpl();
    request = new ReconciliationRequest(query, limit);
    urlPairs = new LinkedHashSet<String[]>();
    urlPairs.add(new String[] {"http://doc1.result.url","http://doc1.sindice.cache.url"} );
    urlPairs.add(new String[] {"http://doc2.result.url","http://doc2.sindice.cache.url"} );

    /*
 
View Full Code Here


    endpoint = new PlainSparqlQueryEndpoint(factory, executor);
  }
 
  @Test
  public void executeSimpleReconciliationQuery(){
    ReconciliationRequest request = new ReconciliationRequest(queryString, limit);
    List<ReconciliationCandidate> candidates = endpoint.reconcileEntities(request, searchPropertyUris, 1.0);
    assertResultInOrder(null,candidates,"http://data.linkedmdb.org/resource/film/930","http://data.linkedmdb.org/resource/film/329",
      "http://data.linkedmdb.org/resource/film_series/261");
  }
View Full Code Here

      "http://data.linkedmdb.org/resource/film_series/261");
  }
 
  @Test
  public void executeSimpleReconciliationQueryWithType(){
    ReconciliationRequest request = new ReconciliationRequest(queryString, limit);
    request.setTypes(new String[] {"http://data.linkedmdb.org/resource/movie/film"});
    List<ReconciliationCandidate> candidates = endpoint.reconcileEntities(request, searchPropertyUris, 1.0);
    assertResultInOrder("http://data.linkedmdb.org/resource/film_series/261",candidates,"http://data.linkedmdb.org/resource/film/930","http://data.linkedmdb.org/resource/film/329");
  }
View Full Code Here

    assertResultInOrder("http://data.linkedmdb.org/resource/film_series/261",candidates,"http://data.linkedmdb.org/resource/film/930","http://data.linkedmdb.org/resource/film/329");
  }
 
  @Test
  public void executeExactMatchReconciliationQueryWithType(){
    ReconciliationRequest request = new ReconciliationRequest(exactMatchQueryString, limit);
    request.setTypes(new String[] {"http://data.linkedmdb.org/resource/movie/film"});
    List<ReconciliationCandidate> candidates = endpoint.reconcileEntities(request, searchPropertyUris, 1.0);
    assertTrue(candidates.size()>0);
    asserrtResultContainsWithScoreOne(candidates,"http://data.linkedmdb.org/resource/film/930");
  }
View Full Code Here

    asserrtResultContainsWithScoreOne(candidates,"http://data.linkedmdb.org/resource/film/930");
  }
 
  @Test
  public void executeExactMatchReconciliationQuery(){
    ReconciliationRequest request = new ReconciliationRequest(exactMatchQueryString, limit);
    List<ReconciliationCandidate> candidates = endpoint.reconcileEntities(request, searchPropertyUris, 1.0);
    asserrtResultContainsWithScoreOne(candidates,"http://data.linkedmdb.org/resource/film/930");
  }
View Full Code Here

    asserrtResultContainsWithScoreOne(candidates,"http://data.linkedmdb.org/resource/film/930");
  }
 
  @Test
  public void noMoreThanOneMatch(){
    ReconciliationRequest request = new ReconciliationRequest("Anjali", limit);
    request.setTypes(new String[] {"http://data.linkedmdb.org/resource/movie/film"});
    List<ReconciliationCandidate> candidates = endpoint.reconcileEntities(request, searchPropertyUris, 1.0);
    assertResultContainsWithScoreOneButNoMatch(candidates,"http://data.linkedmdb.org/resource/film/2410","http://data.linkedmdb.org/resource/film/test/2410");
  }
View Full Code Here

    endpoint = new QueryEndpointImpl(factory, executor);
  }
 
  @Test
  public void executeSimpleReconciliationQuery(){
    ReconciliationRequest request = new ReconciliationRequest(queryString, 6);
    List<ReconciliationCandidate> candidates = endpoint.reconcileEntities(request, searchPropertyUris, 0.8);
    assertTrue(candidates.size()<=6);
    assertResultInOrder(null,candidates,"http://data.linkedmdb.org/resource/film/930","http://data.linkedmdb.org/resource/film/329",
      "http://data.linkedmdb.org/resource/film_series/261");
  }
View Full Code Here

      "http://data.linkedmdb.org/resource/film_series/261");
  }
 
  @Test
  public void noMoreThanOneMatch(){
    ReconciliationRequest request = new ReconciliationRequest("Anjali", limit);
    request.setTypes(new String[] {"http://data.linkedmdb.org/resource/movie/film"});
    List<ReconciliationCandidate> candidates = endpoint.reconcileEntities(request, searchPropertyUris, 0.6);
    assertTrue(candidates.size()<=limit);
    assertResultMoreThanThresholdButNoMatch(candidates,0.6,"http://data.linkedmdb.org/resource/film/2410","http://data.linkedmdb.org/resource/film/test/2410");
  }
View Full Code Here

    factory = new LarqSparqlQueryFactory();
  }
 
  @Test
  public void executeSimpleReconciliationQuery(){
    ReconciliationRequest request = new ReconciliationRequest(queryString, limit);
    String sparql = factory.getReconciliationSparqlQuery(request, searchPropertyUris);
    ResultSet resultset = executor.sparql(sparql);
    assertResult(null,resultset,"http://data.linkedmdb.org/resource/film/930","http://data.linkedmdb.org/resource/film/329",
    "http://data.linkedmdb.org/resource/film_series/261");
  }
View Full Code Here

    "http://data.linkedmdb.org/resource/film_series/261");
  }
 
  @Test
  public void executeReconciliationQueryWithType(){
    ReconciliationRequest request = new ReconciliationRequest(queryString, limit);
    request.setTypes(new String[] {"http://data.linkedmdb.org/resource/movie/film"});
    String sparql = factory.getReconciliationSparqlQuery(request, searchPropertyUris);
    ResultSet resultset = executor.sparql(sparql);
    assertResult("http://data.linkedmdb.org/resource/film_series/261", resultset,"http://data.linkedmdb.org/resource/film/930","http://data.linkedmdb.org/resource/film/329");
  }
View Full Code Here

TOP

Related Classes of com.google.refine.org.deri.reconcile.model.ReconciliationRequest

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.