Package org.dbpedia.spotlight.lucene.search

Examples of org.dbpedia.spotlight.lucene.search.CandidateResourceQuery


        BooleanQuery orQuery = new BooleanQuery();

        orQuery.add(new BooleanClause(sfQuery, BooleanClause.Occur.MUST)); //TODO do we need this?
        for (Term sfTerm: sfTerms) { //FIXME this is not correct in the context of the ICF similarity. better to pass the full set downstream and let they handle it there. but for now, we have only one term..
            for (Term t: ctxTerms) {
                orQuery.add(new CandidateResourceQuery(sfTerm, t), BooleanClause.Occur.SHOULD);
            }
        }
        return orQuery;
    }
View Full Code Here


        // Now create CandidateResourceQueries that associate the surface form to each context term
        BooleanQuery orQuery = new BooleanQuery();
        for (Term sfTerm: sfTerms) { //FIXME this is not correct in the context of the ICF similarity. better to pass the full set downstream and let they handle it there. but for now, we have only one term..
            for (Term t: ctxTerms) {
                orQuery.add(new CandidateResourceQuery(sfTerm, t), BooleanClause.Occur.SHOULD);
            }
        }
        // Apply fuzzy surface forms filter to the orQuery
        FilteredQuery filteredQuery = new FilteredQuery(orQuery, new CachingWrapperFilter(new QueryWrapperFilter(sfQuery)));
        return filteredQuery;
View Full Code Here

TOP

Related Classes of org.dbpedia.spotlight.lucene.search.CandidateResourceQuery

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.