Package edu.gslis.textrepresentation

Examples of edu.gslis.textrepresentation.FeatureVector


    String queryText = query.getText();
    queryText = queryText.replaceAll("[,'\\.\\?]", " ");
    queryText = queryText.replaceAll("  ", " ").trim();
   
    // need to lowercase the query vector
    FeatureVector temp = new FeatureVector(null);
    Iterator<String> qTerms = query.getFeatureVector().iterator();
    while(qTerms.hasNext()) {
      String term = qTerms.next();
      temp.addTerm(term.toLowerCase(), query.getFeatureVector().getFeatureWeight(term));
    }
    temp.normalize();;
    query.setFeatureVector(temp);
   
    System.err.println(query.getTitle()+": "+queryText);
   
    // perform search
View Full Code Here

TOP

Related Classes of edu.gslis.textrepresentation.FeatureVector

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.