Package edu.illinois.lis.document

Examples of edu.illinois.lis.document.FeatureVector.pruneToSize()


        fb.setOriginalQuery(query);
        fb.setRes(results);
        fb.build(stopper);
       
        FeatureVector fbVector = fb.asFeatureVector();
        fbVector.pruneToSize(fbTerms);
        fbVector.normalizeToOne();
        fbVector = FeatureVector.interpolate(query.getFeatureVector(), fbVector, ORIG_QUERY_WEIGHT);
   
        System.err.println(fbVector);
       
View Full Code Here


public class LuceneQuery {
  public static String gQueryToLucene(GQuery gQuery, int k) {
    FeatureVector mainVector = new FeatureVector(gQuery.getText(), null);
    mainVector.normalizeToOne();
    FeatureVector fbVector = gQuery.getFeatureVector();
    fbVector.pruneToSize(k);
    fbVector.normalizeToOne();
    FeatureVector finalVector = FeatureVector.interpolate(mainVector, fbVector, 0.5);
    StringBuilder b = new StringBuilder();
    Iterator<String> terms = finalVector.iterator();
    while(terms.hasNext()) {
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.