Package org.apache.stanbol.enhancer.engines.entitylinking.impl

Examples of org.apache.stanbol.enhancer.engines.entitylinking.impl.EntityLinker.process()


        EntityLinkerConfig config = new EntityLinkerConfig();
        config.setMinFoundTokens(2);//this is assumed by this test
        config.setRedirectProcessingMode(RedirectProcessingMode.FOLLOW);
        EntityLinker linker = new EntityLinker(TEST_ANALYSED_TEXT,"en",
            tpc, searcher, config, labelTokenizer);
        linker.process();
        Map<String,List<String>> expectedResults = new HashMap<String,List<String>>();
        expectedResults.put("Patrick Marshall", new ArrayList<String>(
                Arrays.asList("urn:test:PatrickMarshall")));
        expectedResults.put("geologist", new ArrayList<String>(
                Arrays.asList("urn:test:redirect:Geologist"))); //the redirected entity
View Full Code Here


        EntityLinkerConfig config = new EntityLinkerConfig();
        config.setMinFoundTokens(2);//this is assumed by this test
        config.setRedirectProcessingMode(RedirectProcessingMode.FOLLOW);
        EntityLinker linker = new EntityLinker(TEST_ANALYSED_TEXT_WO,"en",
            tpc, searcher, config, labelTokenizer);
        linker.process();
        Map<String,List<String>> expectedResults = new HashMap<String,List<String>>();
        expectedResults.put("Marshall Patrick", new ArrayList<String>(
                Arrays.asList("urn:test:PatrickMarshall")));
        expectedResults.put("geologist", new ArrayList<String>(
                Arrays.asList("urn:test:redirect:Geologist"))); //the redirected entity
View Full Code Here

        EntityLinkerConfig config = new EntityLinkerConfig();
        config.setMinFoundTokens(2);//this is assumed by this test
        config.setRedirectProcessingMode(RedirectProcessingMode.FOLLOW);
        EntityLinker linker = new EntityLinker(TEST_ANALYSED_TEXT,"en",
            tpc, searcher, config, labelTokenizer);
        linker.process();
        Map<String,List<String>> expectedResults = new HashMap<String,List<String>>();
        expectedResults.put("Patrick Marshall", new ArrayList<String>(
                Arrays.asList("urn:test:PatrickMarshall")));
        //Geologist is a common noun and MUST NOT be found
        //expectedResults.put("geologist", new ArrayList<String>(
View Full Code Here

        }
        EntityLinker entityLinker = new EntityLinker(at,language,
            languageConfig, entitySearcher, linkerConfig, labelTokenizer);
        //process
        try {
            entityLinker.process();
        } catch (EntitySearcherException e) {
            log.error("Unable to link Entities with "+entityLinker,e);
            throw new EngineException(this, ci, "Unable to link Entities with "+entityLinker, e);
        }
        if(log.isInfoEnabled()){
View Full Code Here

        }
        EntityLinker entityLinker = new EntityLinker(at,language,
            languageConfig, entityMentionIndex, linkerConfig, labelTokenizer,entityMentionIndex);
        //process
        try {
            entityLinker.process();
        } catch (EntitySearcherException e) {
            log.error("Unable to link Entities with "+entityLinker,e);
            throw new EngineException(this, ci, "Unable to link Entities with "+entityLinker, e);
        }
        //TODO: write results
View Full Code Here

        }
        EntityLinker entityLinker = new EntityLinker(at,language,
            languageConfig, entitySearcher, linkerConfig, labelTokenizer);
        //process
        try {
            entityLinker.process();
        } catch (EntitySearcherException e) {
            log.error("Unable to link Entities with "+entityLinker,e);
            throw new EngineException(this, ci, "Unable to link Entities with "+entityLinker, e);
        }
        //write results (requires a write lock)
View Full Code Here

        EntityLinkerConfig config = new EntityLinkerConfig();
        config.setMinFoundTokens(2);//this is assumed by this test
        config.setRedirectProcessingMode(RedirectProcessingMode.FOLLOW);
        EntityLinker linker = new EntityLinker(TEST_ANALYSED_TEXT,"en",
            tpc, searcher, config, labelTokenizer);
        linker.process();
        Map<String,List<String>> expectedResults = new HashMap<String,List<String>>();
        expectedResults.put("Patrick Marshall", new ArrayList<String>(
                Arrays.asList("urn:test:PatrickMarshall")));
        expectedResults.put("geologist", new ArrayList<String>(
                Arrays.asList("urn:test:redirect:Geologist"))); //the redirected entity
View Full Code Here

        EntityLinkerConfig config = new EntityLinkerConfig();
        config.setMinFoundTokens(2);//this is assumed by this test
        config.setRedirectProcessingMode(RedirectProcessingMode.FOLLOW);
        EntityLinker linker = new EntityLinker(TEST_ANALYSED_TEXT,"en",
            tpc, searcher, config, labelTokenizer);
        linker.process();
        Map<String,List<String>> expectedResults = new HashMap<String,List<String>>();
        expectedResults.put("Patrick Marshall", new ArrayList<String>(
                Arrays.asList("urn:test:PatrickMarshall")));
        //Geologist is a common noun and MUST NOT be found
        //expectedResults.put("geologist", new ArrayList<String>(
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.