Package org.apache.stanbol.entityhub.indexing.core.EntityIterator

Examples of org.apache.stanbol.entityhub.indexing.core.EntityIterator.EntityScore


        assertTrue(dataProvider.needsInitialisation());//there are test data to load
        dataProvider.initialise();
        assertEquals(dataProvider.getClass(), RdfIndexingSource.class);
        long count = 0;
        while(entityIdIterator.hasNext()){
            EntityScore entityScore = entityIdIterator.next();
            assertNotNull(entityScore);
            assertNotNull(entityScore.id);
            validateRepresentation(dataProvider.getEntityData(entityScore.id),
                entityScore.id);
            count++;
View Full Code Here


        assertTrue(dataProvider.needsInitialisation());//there are test data to load
        dataProvider.initialise();
        assertEquals(dataProvider.getClass(), RdfIndexingSource.class);
        long count = 0;
        while(entityIdIterator.hasNext()){
            EntityScore entityScore = entityIdIterator.next();
            assertNotNull(entityScore);
            assertNotNull(entityScore.id);
            validateRepresentation(dataProvider.getEntityData(entityScore.id),
                entityScore.id);
            count++;
View Full Code Here

            entityIterator.initialise();
        }
        //initialise this instace
        Map<String,Float> entityScoreMap = new HashMap<String,Float>();
        while(entityIterator.hasNext()){
            EntityScore entityScore = entityIterator.next();
            entityScoreMap.put(entityScore.id, entityScore.score);
        }
        //close the source because it is no longer needed!
        entityIterator.close();
        provider = new MapEntityScoreProvider(entityScoreMap);
View Full Code Here

        assertTrue(dataProvider.needsInitialisation());//there are test data to load
        dataProvider.initialise();
        assertEquals(dataProvider.getClass(), RdfIndexingSource.class);
        long count = 0;
        while(entityIdIterator.hasNext()){
            EntityScore entityScore = entityIdIterator.next();
            assertNotNull(entityScore);
            assertNotNull(entityScore.id);
            validateRepresentation(dataProvider.getEntityData(entityScore.id),
                entityScore.id);
            count++;
View Full Code Here

        assertTrue(dataProvider.needsInitialisation());//there are test data to load
        dataProvider.initialise();
        assertEquals(dataProvider.getClass(), RdfIndexingSource.class);
        long count = 0;
        while(entityIdIterator.hasNext()){
            EntityScore entityScore = entityIdIterator.next();
            assertNotNull(entityScore);
            assertNotNull(entityScore.id);
            validateRepresentation(dataProvider.getEntityData(entityScore.id),
                entityScore.id);
            count++;
View Full Code Here

    @Override
    public void run() {
        while(entityIdIterator.hasNext()){
            Long start = Long.valueOf(System.currentTimeMillis());
            EntityScore entityScore = entityIdIterator.next();
            Float score;
            if(normaliser != null){
                score = normaliser.normalise(entityScore.score);
            } else {
                score = entityScore.score;
View Full Code Here

            entityIterator.initialise();
        }
        //initialise this instace
        Map<String,Float> entityScoreMap = new HashMap<String,Float>();
        while(entityIterator.hasNext()){
            EntityScore entityScore = entityIterator.next();
            entityScoreMap.put(entityScore.id, entityScore.score);
        }
        //close the source because it is no longer needed!
        entityIterator.close();
        provider = new MapEntityScoreProvider(entityScoreMap);
View Full Code Here

            iterator.initialise();
        }
        float lastScore = Float.MAX_VALUE;
        float lastNormalisedScore = 1f;
        while(iterator.hasNext()){
            EntityScore entity = iterator.next();
            assertNotNull(entity);
            assertNotNull(entity.id);
            assertNotNull(entity.score);
            //log.info("Entity: {}",entity);
            assertTrue(entity.id.startsWith("http://dbpedia.org/resource/"));
View Full Code Here

        assertTrue(dataProvider.needsInitialisation());//there are test data to load
        dataProvider.initialise();
        assertEquals(dataProvider.getClass(), RdfIndexingSource.class);
        long count = 0;
        while(entityIdIterator.hasNext()){
            EntityScore entityScore = entityIdIterator.next();
            assertNotNull(entityScore);
            assertNotNull(entityScore.id);
            validateRepresentation(dataProvider.getEntityData(entityScore.id),
                entityScore.id);
            count++;
View Full Code Here

        assertTrue(dataProvider.needsInitialisation());//there are test data to load
        dataProvider.initialise();
        assertEquals(dataProvider.getClass(), RdfIndexingSource.class);
        long count = 0;
        while(entityIdIterator.hasNext()){
            EntityScore entityScore = entityIdIterator.next();
            assertNotNull(entityScore);
            assertNotNull(entityScore.id);
            validateRepresentation(dataProvider.getEntityData(entityScore.id),
                entityScore.id);
            count++;
View Full Code Here

TOP

Related Classes of org.apache.stanbol.entityhub.indexing.core.EntityIterator.EntityScore

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.