Java 类org.apache.lucene.analysis.WhitespaceTokenizer 实例源码

项目:DrakkarKeel    文件:StopStemAnalyzerCaseSensitive.java   
/**
 *
 * @param fieldName
 * @param reader
 * @return
 * @throws IOException
 */
@Override
public TokenStream reusableTokenStream(String fieldName, Reader reader) throws
        IOException {
    SavedStreams streams = (SavedStreams) getPreviousTokenStream();
    if (streams == null) {
        streams = new SavedStreams();
        streams.source = new WhitespaceTokenizer(reader);
        streams.result = new StopFilter(true, streams.source, stopwords, true);
        streams.result = new PorterStemFilter(streams.source);

        setPreviousTokenStream(streams);
    } else {
        streams.source.reset(reader);
    }
    return streams.result;
}
项目:DrakkarKeel    文件:DefaultCaseSensitiveAnalyzer.java   
/**
     *
     * @param fieldName
     * @param reader
     * @return
     * @throws IOException
     */
    @Override
    public TokenStream reusableTokenStream(String fieldName, Reader reader) throws
            IOException {
        SavedStreams streams = (SavedStreams) getPreviousTokenStream();
        if (streams == null) {
            streams = new SavedStreams();
            streams.source = new WhitespaceTokenizer(reader);
            streams.result = new StopFilter(true, streams.source, stopWords, true);
//            streams.result = new PorterStemFilter(streams.source);

            setPreviousTokenStream(streams);
        } else {
            streams.source.reset(reader);
        }
        return streams.result;
    }
项目:Tank    文件:TankAnalyzer.java   
@Override
protected TokenStreamComponents createComponents(final String fieldName,
        final Reader reader) {
    final Tokenizer src = new WhitespaceTokenizer(matchVersion, reader);
    TokenStream tok = new LowerCaseFilter(matchVersion, src);
    return new TokenStreamComponents(src, tok);
}
项目:bisis-v4    文件:BisisAnalyzer.java   
public TokenStream tokenStream(String fieldname, Reader reader) {
  return new LatCyrFilter(
      new LowerCaseFilter(
          new WhitespaceTokenizer(reader)));
          //new StandardTokenizer(reader)));
}
项目:community-edition-old    文件:DateTokenFilter.java   
public DateTokenFilter(Reader in)
{
    super(in);
    baseTokeniser = new WhitespaceTokenizer(in);
}
项目:community-edition-old    文件:FloatTokenFilter.java   
public FloatTokenFilter(Reader in)
{
    super(in);
    baseTokeniser = new WhitespaceTokenizer(in);
}
项目:community-edition-old    文件:DateTimeTokenFilter.java   
public DateTimeTokenFilter(Reader in)
{
    super(in);
    baseTokeniser = new WhitespaceTokenizer(in);
}
项目:community-edition-old    文件:IntegerTokenFilter.java   
public IntegerTokenFilter(Reader in)
{
    super(in);
    baseTokeniser = new WhitespaceTokenizer(in);
}
项目:community-edition-old    文件:DoubleTokenFilter.java   
public DoubleTokenFilter(Reader in)
{
    super(in);
    baseTokeniser = new WhitespaceTokenizer(in);
}
项目:community-edition-old    文件:LongTokenFilter.java   
public LongTokenFilter(Reader in)
{
    super(in);
    baseTokeniser = new WhitespaceTokenizer(in);
}
项目:neo4j-mobile-android    文件:LuceneDataSource.java   
@Override
public TokenStream tokenStream( String fieldName, Reader reader )
{
    return new LowerCaseFilter( LUCENE_VERSION, new WhitespaceTokenizer( LUCENE_VERSION, reader ) );
}
项目:neo4j-mobile-android    文件:LuceneDataSource.java   
@Override
public TokenStream tokenStream( String fieldName, Reader reader )
{
    return new WhitespaceTokenizer( LUCENE_VERSION, reader );
}