当前位置: 首页>>代码示例>>Java>>正文


Java CharArraySet.unmodifiableSet方法代码示例

本文整理汇总了Java中org.apache.lucene.analysis.CharArraySet.unmodifiableSet方法的典型用法代码示例。如果您正苦于以下问题:Java CharArraySet.unmodifiableSet方法的具体用法?Java CharArraySet.unmodifiableSet怎么用?Java CharArraySet.unmodifiableSet使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.lucene.analysis.CharArraySet的用法示例。


在下文中一共展示了CharArraySet.unmodifiableSet方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getStopWordList

import org.apache.lucene.analysis.CharArraySet; //导入方法依赖的package包/类
public static CharArraySet getStopWordList(Version luceneVersion, String stopwordList, boolean ignoreCase) {
    String[] terms = stopwordList.split(",");
    CharArraySet stopwordSet = new CharArraySet(luceneVersion, terms.length, ignoreCase);
    for (String term : terms) {
        stopwordSet.add(term);
    }
    return CharArraySet.unmodifiableSet(stopwordSet);
}
 
开发者ID:asimihsan,项目名称:handytrowel,代码行数:9,代码来源:StopwordAnnotator.java

示例2: AnsjIndexAnalyzer

import org.apache.lucene.analysis.CharArraySet; //导入方法依赖的package包/类
public AnsjIndexAnalyzer(final Version matchVersion, final Set<?> stopwords) {
	super();
	this.matchVersion = matchVersion;
	// analyzers should use char array set for stopwords!
    this.stopwords = stopwords == null ? CharArraySet.EMPTY_SET : CharArraySet
        .unmodifiableSet(CharArraySet.copy(matchVersion, stopwords));
}
 
开发者ID:flash0729,项目名称:ansj-seg-for-lucene3,代码行数:8,代码来源:AnsjIndexAnalyzer.java

示例3: AnsjAnalyzer

import org.apache.lucene.analysis.CharArraySet; //导入方法依赖的package包/类
/**
    * @param analysis 
    *            搜索时用精准分词,索引时用面向索引的分词,默认值为面向索引的分词
    */
public AnsjAnalyzer(final Version matchVersion, Class<? extends Analysis> analysis, final Set<?> stopwords) {
	this.matchVersion = matchVersion;
	this.analysis = analysis == null ? IndexAnalysis.class : analysis;
	// analyzers should use char array set for stopwords!
    this.stopwords = stopwords == null ? CharArraySet.EMPTY_SET : CharArraySet
        .unmodifiableSet(CharArraySet.copy(matchVersion, stopwords));
}
 
开发者ID:flash0729,项目名称:ansj-seg-for-lucene3,代码行数:12,代码来源:AnsjAnalyzer.java

示例4: AnsjSearchAnalyzer

import org.apache.lucene.analysis.CharArraySet; //导入方法依赖的package包/类
public AnsjSearchAnalyzer(final Version matchVersion, final Set<?> stopwords) {
	super();
	this.matchVersion = matchVersion;
	// analyzers should use char array set for stopwords!
    this.stopwords = stopwords == null ? CharArraySet.EMPTY_SET : CharArraySet
        .unmodifiableSet(CharArraySet.copy(matchVersion, stopwords));
}
 
开发者ID:flash0729,项目名称:ansj-seg-for-lucene3,代码行数:8,代码来源:AnsjSearchAnalyzer.java

示例5: SnowballAnalyzer

import org.apache.lucene.analysis.CharArraySet; //导入方法依赖的package包/类
/** Builds the named analyzer with the given stop words. */
public SnowballAnalyzer(String name, CharArraySet stopWords) {
  this(name);
  stopSet = CharArraySet.unmodifiableSet(CharArraySet.copy(stopWords));
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:6,代码来源:SnowballAnalyzer.java


注:本文中的org.apache.lucene.analysis.CharArraySet.unmodifiableSet方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。