Registry /
utility / lucene-analyzers-common
Install & Compatibility
Where this runs
No compatibility data collected yet for this library.
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
StandardAnalyzer
✓ org.apache.lucene.analysis.standard.StandardAnalyzer
Tokenizes text using Lucene's StandardAnalyzer.
import org.apache.lucene.analysis.standard.StandardAnalyzer;
import org.apache.lucene.analysis.TokenStream;
import org.apache.lucene.analysis.tokenattributes.CharTermAttribute;
import java.io.StringReader;
public class Quickstart {
public static void main(String[] args) throws Exception {
StandardAnalyzer analyzer = new StandardAnalyzer();
TokenStream stream = analyzer.tokenStream("field", new StringReader("Hello World"));
CharTermAttribute term = stream.addAttribute(CharTermAttribute.class);
stream.reset();
while (stream.incrementToken()) {
System.out.println(term.toString());
}
stream.close();
analyzer.close();
}
}
Debug
Known issues
No known issues recorded.
Audit
Dependencies
No dependency data recorded yet.