Package org.apache.lucene.analysis.snowball

Examples of org.apache.lucene.analysis.snowball.SnowballAnalyzer.tokenStream()


      TokenStream ts ;
      TermAttribute termAtt;
     
      // Query data
      doc = (Document)ir.document(testDocId);
      ts = analyzer.tokenStream("audience", new StringReader(doc.get("audience")));
      termAtt = ts.addAttribute(TermAttribute.class)
      while (ts.incrementToken())
      {
        rAudience.add(termAtt.term());
      }
View Full Code Here


      while (ts.incrementToken())
      {
        rAudience.add(termAtt.term());
      }
     
      ts = analyzer.tokenStream("subject", new StringReader(doc.get("subject")));
      termAtt = ts.addAttribute(TermAttribute.class)
      while (ts.incrementToken())
      {
        rSubject.add(termAtt.term());
      }
View Full Code Here

      while (ts.incrementToken())
      {
        rSubject.add(termAtt.term());
      }
     
      ts = analyzer.tokenStream("educationLevel", new StringReader(doc.get("educationLevel")));
      termAtt = ts.addAttribute(TermAttribute.class)
      while (ts.incrementToken())
      {
        rEduLevel.add(termAtt.term());
      }
View Full Code Here

      for (int i = 0 ; i < K  ; i++)
      {
        int docId = (Integer)kArray[i];
        doc = (Document)ir.document(docId);
       
        ts = analyzer.tokenStream("audience", new StringReader(doc.get("audience")));
        termAtt = ts.addAttribute(TermAttribute.class)
       
       
        while(ts.incrementToken())
        {
View Full Code Here

            aPrecision++;
            break;
          }
        }
       
        ts = analyzer.tokenStream("subject", new StringReader(doc.get("subject")));
        termAtt = ts.addAttribute(TermAttribute.class)
       
        while(ts.incrementToken())
        {
          tempToken = termAtt.term();
View Full Code Here

            sPrecision++;
            break;
          }
        }
       
        ts = analyzer.tokenStream("educationLevel", new StringReader(doc.get("educationLevel")));
        termAtt = ts.addAttribute(TermAttribute.class)
        while(ts.incrementToken())
        {
          tempToken = termAtt.term();
          if (tempToken.length() > 2 && rEduLevel.contains(tempToken))
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.