Package org.tartarus.snowball.ext

Examples of org.tartarus.snowball.ext.PorterStemmer


  /**
   * @param args
   */
  public static void main(String[] args) throws Exception {
    Stemmer stemmer = new Stemmer(new PorterStemmer());
   
    List<File> files = FileTools.getFilesFromDirectoryByName(new File("/home/ptc24/newows/reactnewpubmed"), "scrapbook.xml");

    List<Event> events = new ArrayList<Event>();
   
View Full Code Here


    //System.out.println(System.currentTimeMillis() - time);
  }
 
  public void run(List<File> files) throws Exception {
   
    Stemmer st = new Stemmer(new PorterStemmer());
   
    long time = System.currentTimeMillis();
    for(File f : files) {
      ProcessingDocument procDoc = ProcessingDocumentFactory.getInstance().makeTokenisedDocument(new Builder().build(f), false, false, false);
      Set<Integer> tokSet = new HashSet<Integer>();
View Full Code Here

   * @param args
   */
  public static void main(String[] args) throws Exception {   
    Map<String,ClassificationEvaluator> evals = new HashMap<String,ClassificationEvaluator>();
   
    Stemmer st = new Stemmer(new PorterStemmer());
   
    //String docNo = "b600383d";

    //File acDir = new File("/home/ptc24/annot_challenges/subtypes_for_lrec_crb/");
    //File acDir = new File("/home/ptc24/annot_challenges/reacttypes_crb_28082008_easy/");
View Full Code Here

/**
* Wrapper for the default stemmer used by this project.
*/
public class Stemmer {
  public String stem(String input) {
    PorterStemmer state = new PorterStemmer();
    state.setCurrent(input);
    state.stem();
    return state.getCurrent();
  }
View Full Code Here

    /**
     * {@inheritDoc}
     */
    public String stem(String token) {
        porterStemmer stemmer = new porterStemmer();
        stemmer.setCurrent(token);
        stemmer.stem();
        return stemmer.getCurrent();
    }
View Full Code Here

TOP

Related Classes of org.tartarus.snowball.ext.PorterStemmer

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.