本文整理汇总了Java中org.apache.lucene.analysis.WhitespaceTokenizer类的典型用法代码示例。如果您正苦于以下问题:Java WhitespaceTokenizer类的具体用法?Java WhitespaceTokenizer怎么用?Java WhitespaceTokenizer使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
WhitespaceTokenizer类属于org.apache.lucene.analysis包,在下文中一共展示了WhitespaceTokenizer类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: reusableTokenStream
import org.apache.lucene.analysis.WhitespaceTokenizer; //导入依赖的package包/类
/**
*
* @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;
}
开发者ID:jcrcano,项目名称:DrakkarKeel,代码行数:24,代码来源:StopStemAnalyzerCaseSensitive.java
示例2: reusableTokenStream
import org.apache.lucene.analysis.WhitespaceTokenizer; //导入依赖的package包/类
/**
*
* @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;
}
开发者ID:jcrcano,项目名称:DrakkarKeel,代码行数:24,代码来源:DefaultCaseSensitiveAnalyzer.java
示例3: createComponents
import org.apache.lucene.analysis.WhitespaceTokenizer; //导入依赖的package包/类
@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);
}
开发者ID:intuit,项目名称:Tank,代码行数:8,代码来源:TankAnalyzer.java
示例4: tokenStream
import org.apache.lucene.analysis.WhitespaceTokenizer; //导入依赖的package包/类
public TokenStream tokenStream(String fieldname, Reader reader) {
return new LatCyrFilter(
new LowerCaseFilter(
new WhitespaceTokenizer(reader)));
//new StandardTokenizer(reader)));
}
开发者ID:unsftn,项目名称:bisis-v4,代码行数:7,代码来源:BisisAnalyzer.java
示例5: DateTokenFilter
import org.apache.lucene.analysis.WhitespaceTokenizer; //导入依赖的package包/类
public DateTokenFilter(Reader in)
{
super(in);
baseTokeniser = new WhitespaceTokenizer(in);
}
开发者ID:Alfresco,项目名称:community-edition-old,代码行数:6,代码来源:DateTokenFilter.java
示例6: FloatTokenFilter
import org.apache.lucene.analysis.WhitespaceTokenizer; //导入依赖的package包/类
public FloatTokenFilter(Reader in)
{
super(in);
baseTokeniser = new WhitespaceTokenizer(in);
}
开发者ID:Alfresco,项目名称:community-edition-old,代码行数:6,代码来源:FloatTokenFilter.java
示例7: DateTimeTokenFilter
import org.apache.lucene.analysis.WhitespaceTokenizer; //导入依赖的package包/类
public DateTimeTokenFilter(Reader in)
{
super(in);
baseTokeniser = new WhitespaceTokenizer(in);
}
开发者ID:Alfresco,项目名称:community-edition-old,代码行数:6,代码来源:DateTimeTokenFilter.java
示例8: IntegerTokenFilter
import org.apache.lucene.analysis.WhitespaceTokenizer; //导入依赖的package包/类
public IntegerTokenFilter(Reader in)
{
super(in);
baseTokeniser = new WhitespaceTokenizer(in);
}
开发者ID:Alfresco,项目名称:community-edition-old,代码行数:6,代码来源:IntegerTokenFilter.java
示例9: DoubleTokenFilter
import org.apache.lucene.analysis.WhitespaceTokenizer; //导入依赖的package包/类
public DoubleTokenFilter(Reader in)
{
super(in);
baseTokeniser = new WhitespaceTokenizer(in);
}
开发者ID:Alfresco,项目名称:community-edition-old,代码行数:6,代码来源:DoubleTokenFilter.java
示例10: LongTokenFilter
import org.apache.lucene.analysis.WhitespaceTokenizer; //导入依赖的package包/类
public LongTokenFilter(Reader in)
{
super(in);
baseTokeniser = new WhitespaceTokenizer(in);
}
开发者ID:Alfresco,项目名称:community-edition-old,代码行数:6,代码来源:LongTokenFilter.java
示例11: tokenStream
import org.apache.lucene.analysis.WhitespaceTokenizer; //导入依赖的package包/类
@Override
public TokenStream tokenStream( String fieldName, Reader reader )
{
return new LowerCaseFilter( LUCENE_VERSION, new WhitespaceTokenizer( LUCENE_VERSION, reader ) );
}
开发者ID:neo4j-contrib,项目名称:neo4j-mobile-android,代码行数:6,代码来源:LuceneDataSource.java
注:本文中的org.apache.lucene.analysis.WhitespaceTokenizer类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论