• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java SetKeywordMarkerFilter类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



SetKeywordMarkerFilter类属于org.apache.lucene.analysis.miscellaneous包,在下文中一共展示了SetKeywordMarkerFilter类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: testKeyword

import org.apache.lucene.analysis.miscellaneous.SetKeywordMarkerFilter; //导入依赖的package包/类
public void testKeyword() throws IOException {
  final CharArraySet exclusionSet = new CharArraySet(asSet("あり"), false);
  Analyzer a = new Analyzer() {
    @Override
    protected TokenStreamComponents createComponents(String fieldName, Reader reader) {
      Tokenizer source = new JapaneseTokenizer(newAttributeFactory(), reader, null, true, JapaneseTokenizer.DEFAULT_MODE);
      TokenStream sink = new SetKeywordMarkerFilter(source, exclusionSet);
      return new TokenStreamComponents(source, new JapaneseBaseFormFilter(sink));
    }
  };
  assertAnalyzesTo(a, "それはまだ実験段階にあります",
      new String[] { "それ", "は", "まだ", "実験", "段階", "に", "あり", "ます"  }
  );
}
 
开发者ID:europeana,项目名称:search,代码行数:15,代码来源:TestJapaneseBaseFormFilter.java


示例2: testKeyword

import org.apache.lucene.analysis.miscellaneous.SetKeywordMarkerFilter; //导入依赖的package包/类
public void testKeyword() throws IOException {
  final CharArraySet exclusionSet = new CharArraySet(asSet("コーヒー"), false);
  Analyzer a = new Analyzer() {
    @Override
    protected TokenStreamComponents createComponents(String fieldName, Reader reader) {
      Tokenizer source = new MockTokenizer(reader, MockTokenizer.WHITESPACE, false);
      TokenStream sink = new SetKeywordMarkerFilter(source, exclusionSet);
      return new TokenStreamComponents(source, new JapaneseKatakanaStemFilter(sink));
    }
  };
  checkOneTerm(a, "コーヒー", "コーヒー");
}
 
开发者ID:europeana,项目名称:search,代码行数:13,代码来源:TestJapaneseKatakanaStemFilter.java


示例3: testKeyword

import org.apache.lucene.analysis.miscellaneous.SetKeywordMarkerFilter; //导入依赖的package包/类
public void testKeyword() throws IOException {
  final CharArraySet exclusionSet = new CharArraySet( asSet("sängerinnen"), false);
  Analyzer a = new Analyzer() {
    @Override
    protected TokenStreamComponents createComponents(String fieldName, Reader reader) {
      Tokenizer source = new MockTokenizer(reader, MockTokenizer.WHITESPACE, false);
      TokenStream sink = new SetKeywordMarkerFilter(source, exclusionSet);
      return new TokenStreamComponents(source, new GermanStemFilter(sink));
    }
  };
  checkOneTerm(a, "sängerinnen", "sängerinnen");
}
 
开发者ID:europeana,项目名称:search,代码行数:13,代码来源:TestGermanStemFilter.java


示例4: testKeyword

import org.apache.lucene.analysis.miscellaneous.SetKeywordMarkerFilter; //导入依赖的package包/类
public void testKeyword() throws IOException {
  final CharArraySet exclusionSet = new CharArraySet( asSet("sängerinnen"), false);
  Analyzer a = new Analyzer() {
    @Override
    protected TokenStreamComponents createComponents(String fieldName, Reader reader) {
      Tokenizer source = new MockTokenizer(reader, MockTokenizer.WHITESPACE, false);
      TokenStream sink = new SetKeywordMarkerFilter(source, exclusionSet);
      return new TokenStreamComponents(source, new GermanMinimalStemFilter(sink));
    }
  };
  checkOneTerm(a, "sängerinnen", "sängerinnen");
}
 
开发者ID:europeana,项目名称:search,代码行数:13,代码来源:TestGermanMinimalStemFilter.java


示例5: testWithKeywordAttribute

import org.apache.lucene.analysis.miscellaneous.SetKeywordMarkerFilter; //导入依赖的package包/类
public void testWithKeywordAttribute() throws IOException {
  CharArraySet set = new CharArraySet( 1, true);
  set.add("fischen");
  GermanStemFilter filter = new GermanStemFilter(
      new SetKeywordMarkerFilter(new LowerCaseTokenizer(new StringReader(
          "Fischen Trinken")), set));
  assertTokenStreamContents(filter, new String[] { "fischen", "trink" });
}
 
开发者ID:europeana,项目名称:search,代码行数:9,代码来源:TestGermanAnalyzer.java


示例6: testKeyword

import org.apache.lucene.analysis.miscellaneous.SetKeywordMarkerFilter; //导入依赖的package包/类
public void testKeyword() throws IOException {
  final CharArraySet exclusionSet = new CharArraySet( asSet("sängerinnen"), false);
  Analyzer a = new Analyzer() {
    @Override
    protected TokenStreamComponents createComponents(String fieldName, Reader reader) {
      Tokenizer source = new MockTokenizer(reader, MockTokenizer.WHITESPACE, false);
      TokenStream sink = new SetKeywordMarkerFilter(source, exclusionSet);
      return new TokenStreamComponents(source, new GermanLightStemFilter(sink));
    }
  };
  checkOneTerm(a, "sängerinnen", "sängerinnen");
}
 
开发者ID:europeana,项目名称:search,代码行数:13,代码来源:TestGermanLightStemFilter.java


示例7: testKeyword

import org.apache.lucene.analysis.miscellaneous.SetKeywordMarkerFilter; //导入依赖的package包/类
public void testKeyword() throws IOException {
  final CharArraySet exclusionSet = new CharArraySet( asSet("sekretæren"), false);
  Analyzer a = new Analyzer() {
    @Override
    protected TokenStreamComponents createComponents(String fieldName, Reader reader) {
      Tokenizer source = new MockTokenizer(reader, MockTokenizer.WHITESPACE, false);
      TokenStream sink = new SetKeywordMarkerFilter(source, exclusionSet);
      return new TokenStreamComponents(source, new NorwegianMinimalStemFilter(sink));
    }
  };
  checkOneTerm(a, "sekretæren", "sekretæren");
}
 
开发者ID:europeana,项目名称:search,代码行数:13,代码来源:TestNorwegianMinimalStemFilter.java


示例8: testKeyword

import org.apache.lucene.analysis.miscellaneous.SetKeywordMarkerFilter; //导入依赖的package包/类
public void testKeyword() throws IOException {
  final CharArraySet exclusionSet = new CharArraySet( asSet("sekretæren"), false);
  Analyzer a = new Analyzer() {
    @Override
    protected TokenStreamComponents createComponents(String fieldName, Reader reader) {
      Tokenizer source = new MockTokenizer(reader, MockTokenizer.WHITESPACE, false);
      TokenStream sink = new SetKeywordMarkerFilter(source, exclusionSet);
      return new TokenStreamComponents(source, new NorwegianLightStemFilter(sink));
    }
  };
  checkOneTerm(a, "sekretæren", "sekretæren");
}
 
开发者ID:europeana,项目名称:search,代码行数:13,代码来源:TestNorwegianLightStemFilter.java


示例9: testKeyword

import org.apache.lucene.analysis.miscellaneous.SetKeywordMarkerFilter; //导入依赖的package包/类
public void testKeyword() throws IOException {
  final CharArraySet exclusionSet = new CharArraySet( asSet("edeltäjistään"), false);
  Analyzer a = new Analyzer() {
    @Override
    protected TokenStreamComponents createComponents(String fieldName, Reader reader) {
      Tokenizer source = new MockTokenizer(reader, MockTokenizer.WHITESPACE, false);
      TokenStream sink = new SetKeywordMarkerFilter(source, exclusionSet);
      return new TokenStreamComponents(source, new FinnishLightStemFilter(sink));
    }
  };
  checkOneTerm(a, "edeltäjistään", "edeltäjistään");
}
 
开发者ID:europeana,项目名称:search,代码行数:13,代码来源:TestFinnishLightStemFilter.java


示例10: testWithKeywordAttribute

import org.apache.lucene.analysis.miscellaneous.SetKeywordMarkerFilter; //导入依赖的package包/类
public void testWithKeywordAttribute() throws IOException {
  CharArraySet set = new CharArraySet(1, true);
  set.add("ساهدهات");
  ArabicLetterTokenizer tokenStream  = new ArabicLetterTokenizer(TEST_VERSION_CURRENT, new StringReader("ساهدهات"));

  ArabicStemFilter filter = new ArabicStemFilter(new SetKeywordMarkerFilter(tokenStream, set));
  assertTokenStreamContents(filter, new String[]{"ساهدهات"});
}
 
开发者ID:europeana,项目名称:search,代码行数:9,代码来源:TestArabicStemFilter.java


示例11: testKeyword

import org.apache.lucene.analysis.miscellaneous.SetKeywordMarkerFilter; //导入依赖的package包/类
public void testKeyword() throws IOException {
  final CharArraySet exclusionSet = new CharArraySet( asSet("энергии"), false);
  Analyzer a = new Analyzer() {
    @Override
    protected TokenStreamComponents createComponents(String fieldName, Reader reader) {
      Tokenizer source = new MockTokenizer(reader, MockTokenizer.WHITESPACE, false);
      TokenStream sink = new SetKeywordMarkerFilter(source, exclusionSet);
      return new TokenStreamComponents(source, new RussianLightStemFilter(sink));
    }
  };
  checkOneTerm(a, "энергии", "энергии");
}
 
开发者ID:europeana,项目名称:search,代码行数:13,代码来源:TestRussianLightStemFilter.java


示例12: testKeyword

import org.apache.lucene.analysis.miscellaneous.SetKeywordMarkerFilter; //导入依赖的package包/类
public void testKeyword() throws IOException {
  final CharArraySet exclusionSet = new CharArraySet( asSet("jaktkarlens"), false);
  Analyzer a = new Analyzer() {
    @Override
    protected TokenStreamComponents createComponents(String fieldName, Reader reader) {
      Tokenizer source = new MockTokenizer(reader, MockTokenizer.WHITESPACE, false);
      TokenStream sink = new SetKeywordMarkerFilter(source, exclusionSet);
      return new TokenStreamComponents(source, new SwedishLightStemFilter(sink));
    }
  };
  checkOneTerm(a, "jaktkarlens", "jaktkarlens");
}
 
开发者ID:europeana,项目名称:search,代码行数:13,代码来源:TestSwedishLightStemFilter.java


示例13: testKeyword

import org.apache.lucene.analysis.miscellaneous.SetKeywordMarkerFilter; //导入依赖的package包/类
public void testKeyword() throws IOException {
  final CharArraySet exclusionSet = new CharArraySet( asSet("babakocsi"), false);
  Analyzer a = new Analyzer() {
    @Override
    protected TokenStreamComponents createComponents(String fieldName, Reader reader) {
      Tokenizer source = new MockTokenizer(reader, MockTokenizer.WHITESPACE, false);
      TokenStream sink = new SetKeywordMarkerFilter(source, exclusionSet);
      return new TokenStreamComponents(source, new HungarianLightStemFilter(sink));
    }
  };
  checkOneTerm(a, "babakocsi", "babakocsi");
}
 
开发者ID:europeana,项目名称:search,代码行数:13,代码来源:TestHungarianLightStemFilter.java


示例14: testWithKeywordAttribute

import org.apache.lucene.analysis.miscellaneous.SetKeywordMarkerFilter; //导入依赖的package包/类
public void testWithKeywordAttribute() throws IOException {
  CharArraySet set = new CharArraySet(1, true);
  set.add("строеве");
  MockTokenizer tokenStream = new MockTokenizer(new StringReader("строевете строеве"), MockTokenizer.WHITESPACE, false);

  BulgarianStemFilter filter = new BulgarianStemFilter(
      new SetKeywordMarkerFilter(tokenStream, set));
  assertTokenStreamContents(filter, new String[] { "строй", "строеве" });
}
 
开发者ID:europeana,项目名称:search,代码行数:10,代码来源:TestBulgarianStemmer.java


示例15: testKeyword

import org.apache.lucene.analysis.miscellaneous.SetKeywordMarkerFilter; //导入依赖的package包/类
public void testKeyword() throws IOException {
  final CharArraySet exclusionSet = new CharArraySet( asSet("elefantes"), false);
  Analyzer a = new Analyzer() {
    @Override
    protected TokenStreamComponents createComponents(String fieldName, Reader reader) {
      Tokenizer source = new MockTokenizer(reader, MockTokenizer.WHITESPACE, false);
      TokenStream sink = new SetKeywordMarkerFilter(source, exclusionSet);
      return new TokenStreamComponents(source, new GalicianMinimalStemFilter(sink));
    }
  };
  checkOneTerm(a, "elefantes", "elefantes");
}
 
开发者ID:europeana,项目名称:search,代码行数:13,代码来源:TestGalicianMinimalStemFilter.java


示例16: testWithKeywordAttribute

import org.apache.lucene.analysis.miscellaneous.SetKeywordMarkerFilter; //导入依赖的package包/类
public void testWithKeywordAttribute() throws IOException {
  CharArraySet set = new CharArraySet(1, true);
  set.add("Brasília");
  BrazilianStemFilter filter = new BrazilianStemFilter(
      new SetKeywordMarkerFilter(new LowerCaseTokenizer(new StringReader(
          "Brasília Brasilia")), set));
  assertTokenStreamContents(filter, new String[] { "brasília", "brasil" });
}
 
开发者ID:europeana,项目名称:search,代码行数:9,代码来源:TestBrazilianStemmer.java


示例17: testKeyword

import org.apache.lucene.analysis.miscellaneous.SetKeywordMarkerFilter; //导入依赖的package包/类
public void testKeyword() throws IOException {
  final CharArraySet exclusionSet = new CharArraySet( asSet("chevaux"), false);
  Analyzer a = new Analyzer() {
    @Override
    protected TokenStreamComponents createComponents(String fieldName, Reader reader) {
      Tokenizer source = new MockTokenizer(reader, MockTokenizer.WHITESPACE, false);
      TokenStream sink = new SetKeywordMarkerFilter(source, exclusionSet);
      return new TokenStreamComponents(source, new FrenchLightStemFilter(sink));
    }
  };
  checkOneTerm(a, "chevaux", "chevaux");
}
 
开发者ID:europeana,项目名称:search,代码行数:13,代码来源:TestFrenchLightStemFilter.java


示例18: testKeyword

import org.apache.lucene.analysis.miscellaneous.SetKeywordMarkerFilter; //导入依赖的package包/类
public void testKeyword() throws IOException {
  final CharArraySet exclusionSet = new CharArraySet( asSet("chevaux"), false);
  Analyzer a = new Analyzer() {
    @Override
    protected TokenStreamComponents createComponents(String fieldName, Reader reader) {
      Tokenizer source = new MockTokenizer(reader, MockTokenizer.WHITESPACE, false);
      TokenStream sink = new SetKeywordMarkerFilter(source, exclusionSet);
      return new TokenStreamComponents(source, new FrenchMinimalStemFilter(sink));
    }
  };
  checkOneTerm(a, "chevaux", "chevaux");
}
 
开发者ID:europeana,项目名称:search,代码行数:13,代码来源:TestFrenchMinimalStemFilter.java


示例19: testWithKeywordAttribute

import org.apache.lucene.analysis.miscellaneous.SetKeywordMarkerFilter; //导入依赖的package包/类
public void testWithKeywordAttribute() throws IOException {
  CharArraySet set = new CharArraySet( 1, true);
  set.add("yourselves");
  Tokenizer tokenizer = new MockTokenizer(new StringReader("yourselves yours"), MockTokenizer.WHITESPACE, false);
  TokenStream filter = new PorterStemFilter(new SetKeywordMarkerFilter(tokenizer, set));   
  assertTokenStreamContents(filter, new String[] {"yourselves", "your"});
}
 
开发者ID:europeana,项目名称:search,代码行数:8,代码来源:TestPorterStemFilter.java


示例20: testKeyword

import org.apache.lucene.analysis.miscellaneous.SetKeywordMarkerFilter; //导入依赖的package包/类
public void testKeyword() throws IOException {
  final CharArraySet exclusionSet = new CharArraySet( asSet("quilométricas"), false);
  Analyzer a = new Analyzer() {
    @Override
    protected TokenStreamComponents createComponents(String fieldName, Reader reader) {
      Tokenizer source = new MockTokenizer(reader, MockTokenizer.WHITESPACE, false);
      TokenStream sink = new SetKeywordMarkerFilter(source, exclusionSet);
      return new TokenStreamComponents(source, new PortugueseLightStemFilter(sink));
    }
  };
  checkOneTerm(a, "quilométricas", "quilométricas");
}
 
开发者ID:europeana,项目名称:search,代码行数:13,代码来源:TestPortugueseLightStemFilter.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java ILinkDiscoveryListener类代码示例发布时间:2022-05-21
下一篇:
Java WeightedRandomLoot类代码示例发布时间:2022-05-21
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap