Package org.dbpedia.spotlight.model

Examples of org.dbpedia.spotlight.model.CandidateSearcher


    public static void main(String[] args) throws IOException, SearchException, ItemNotFoundException {
        //String dir = "/home/pablo/workspace/spotlight/output/candidateIndexTitRedDis";
        String dir = "/home/pablo/workspace/spotlight/index/output/candidateIndexTitRedDis";
        LuceneManager luceneManager = new LuceneManager.CaseSensitiveSurfaceForms(FSDirectory.open(new File(dir)));
        CandidateSearcher searcher = new LuceneCandidateSearcher(luceneManager, true);
        System.out.println(searcher.getCandidates(new SurfaceForm("berlin")));
        System.out.println(searcher.getCandidates(new SurfaceForm("Berlin")));
        System.out.println(searcher.getCandidates(new SurfaceForm("sdaf")));
    }
View Full Code Here

TOP

Related Classes of org.dbpedia.spotlight.model.CandidateSearcher

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.