gpt4 book ai didi

org.apache.lucene.analysis.miscellaneous.WordDelimiterGraphFilter.()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-22 06:45:05 27 4
gpt4 key购买 nike

本文整理了Java中org.apache.lucene.analysis.miscellaneous.WordDelimiterGraphFilter.<init>()方法的一些代码示例,展示了WordDelimiterGraphFilter.<init>()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WordDelimiterGraphFilter.<init>()方法的具体详情如下:
包路径:org.apache.lucene.analysis.miscellaneous.WordDelimiterGraphFilter
类名称:WordDelimiterGraphFilter
方法名:<init>

WordDelimiterGraphFilter.<init>介绍

[英]Creates a new WordDelimiterGraphFilter using WordDelimiterIterator#DEFAULT_WORD_DELIM_TABLEas its charTypeTable
[中]使用WordDelimiterIterator#DEFAULT_WORD_DELIM_Table作为其ChartTypeTable创建新的WordDelimiterGraphFilter

代码示例

代码示例来源:origin: jeremylong/DependencyCheck

/**
 * Creates a the TokenStreamComponents used to analyze the stream.
 *
 * @param fieldName the field that this lucene analyzer will process
 * @return the token stream filter chain
 */
@Override
protected TokenStreamComponents createComponents(String fieldName) {
  //final Tokenizer source = new AlphaNumericTokenizer();
  final Tokenizer source = new WhitespaceTokenizer();
  TokenStream stream = source;
  stream = new UrlTokenizingFilter(stream);
  stream = new AlphaNumericFilter(stream);
  stream = new WordDelimiterGraphFilter(stream,
      WordDelimiterGraphFilter.GENERATE_WORD_PARTS
      | WordDelimiterGraphFilter.GENERATE_NUMBER_PARTS
      | WordDelimiterGraphFilter.PRESERVE_ORIGINAL
      | WordDelimiterGraphFilter.SPLIT_ON_CASE_CHANGE
      | WordDelimiterGraphFilter.SPLIT_ON_NUMERICS
      | WordDelimiterGraphFilter.STEM_ENGLISH_POSSESSIVE, null);
  stream = new LowerCaseFilter(stream);
  stream = new StopFilter(stream, stopWords);
  concatenatingFilter = new TokenPairConcatenatingFilter(stream);
  return new TokenStreamComponents(source, concatenatingFilter);
}

代码示例来源:origin: org.apache.lucene/lucene-analyzers-common

@Override
public TokenFilter create(TokenStream input) {
 return new WordDelimiterGraphFilter(input, typeTable == null ? WordDelimiterIterator.DEFAULT_WORD_DELIM_TABLE : typeTable,
                   flags, protectedWords);
}

代码示例来源:origin: com.qwazr/qwazr-search

public static TokenStream queryWordDelimiter(TokenStream src) {
  return new WordDelimiterGraphFilter(src,
      WordDelimiterGraphFilter.GENERATE_WORD_PARTS | WordDelimiterGraphFilter.GENERATE_NUMBER_PARTS |
          WordDelimiterGraphFilter.SPLIT_ON_NUMERICS | WordDelimiterGraphFilter.SPLIT_ON_CASE_CHANGE,
      CharArraySet.EMPTY_SET);
}

代码示例来源:origin: com.strapdata.elasticsearch/elasticsearch

@Override
public TokenStream create(TokenStream tokenStream) {
  return new WordDelimiterGraphFilter(tokenStream, charTypeTable, flags, protoWords);
}

代码示例来源:origin: org.codelibs.elasticsearch.module/analysis-common

@Override
public TokenStream create(TokenStream tokenStream) {
  return new WordDelimiterGraphFilter(tokenStream, charTypeTable, flags, protoWords);
}

代码示例来源:origin: com.strapdata.elasticsearch/elasticsearch

@Override
  public TokenStream create(TokenStream tokenStream, Version version) {
    return new WordDelimiterGraphFilter(tokenStream,
      WordDelimiterGraphFilter.GENERATE_WORD_PARTS |
        WordDelimiterGraphFilter.GENERATE_NUMBER_PARTS |
        WordDelimiterGraphFilter.SPLIT_ON_CASE_CHANGE |
        WordDelimiterGraphFilter.SPLIT_ON_NUMERICS |
        WordDelimiterGraphFilter.STEM_ENGLISH_POSSESSIVE, null);
  }
},

代码示例来源:origin: com.qwazr/qwazr-search

static public TokenStream indexWordDelimiter(TokenStream src) {
  return new WordDelimiterGraphFilter(src,
      WordDelimiterGraphFilter.GENERATE_WORD_PARTS | WordDelimiterGraphFilter.GENERATE_NUMBER_PARTS |
          WordDelimiterGraphFilter.SPLIT_ON_NUMERICS | WordDelimiterGraphFilter.SPLIT_ON_CASE_CHANGE |
          WordDelimiterGraphFilter.CATENATE_ALL | WordDelimiterGraphFilter.CATENATE_NUMBERS |
          WordDelimiterGraphFilter.CATENATE_WORDS | WordDelimiterGraphFilter.PRESERVE_ORIGINAL,
      CharArraySet.EMPTY_SET);
}

代码示例来源:origin: com.scireum/sirius-nlp-main

@Override
  protected TokenStreamComponents createComponents(String fieldName) {
    final Tokenizer source = new WhitespaceTokenizer();
    TokenStream result = new InchFilter(source);
    result = new PatternReplaceFilter(result, Pattern.compile("^\\p{Punct}*(.*?)\\p{Punct}*$"), "$1", true);
    result = new WordDelimiterGraphFilter(result, GermanSearchAnalyzer.DELIMITER_CONFIG_FLAGS, null);
    result = new LowerCaseFilter(result);
    return new TokenStreamComponents(source, result);
  }
};

代码示例来源:origin: org.codelibs.elasticsearch.module/analysis-common

| WordDelimiterFilter.STEM_ENGLISH_POSSESSIVE, null)));
filters.add(PreConfiguredTokenFilter.singleton("word_delimiter_graph", false, input ->
    new WordDelimiterGraphFilter(input,
        WordDelimiterGraphFilter.GENERATE_WORD_PARTS
       | WordDelimiterGraphFilter.GENERATE_NUMBER_PARTS

代码示例来源:origin: org.owasp/dependency-check-core

/**
 * Creates a the TokenStreamComponents used to analyze the stream.
 *
 * @param fieldName the field that this lucene analyzer will process
 * @return the token stream filter chain
 */
@Override
protected TokenStreamComponents createComponents(String fieldName) {
  //final Tokenizer source = new AlphaNumericTokenizer();
  final Tokenizer source = new WhitespaceTokenizer();
  TokenStream stream = source;
  stream = new UrlTokenizingFilter(stream);
  stream = new AlphaNumericFilter(stream);
  stream = new WordDelimiterGraphFilter(stream,
      WordDelimiterGraphFilter.GENERATE_WORD_PARTS
      | WordDelimiterGraphFilter.GENERATE_NUMBER_PARTS
      | WordDelimiterGraphFilter.PRESERVE_ORIGINAL
      | WordDelimiterGraphFilter.SPLIT_ON_CASE_CHANGE
      | WordDelimiterGraphFilter.SPLIT_ON_NUMERICS
      | WordDelimiterGraphFilter.STEM_ENGLISH_POSSESSIVE, null);
  stream = new LowerCaseFilter(stream);
  stream = new StopFilter(stream, stopWords);
  concatenatingFilter = new TokenPairConcatenatingFilter(stream);
  return new TokenStreamComponents(source, concatenatingFilter);
}

代码示例来源:origin: com.scireum/sirius-nlp-main

result = new WordDelimiterGraphFilter(result, DELIMITER_CONFIG_FLAGS, null);

代码示例来源:origin: com.scireum/sirius-nlp-main

result = new WordDelimiterGraphFilter(result, GermanSearchAnalyzer.DELIMITER_CONFIG_FLAGS, null);

代码示例来源:origin: com.scireum/sirius-nlp-main

result = new WordDelimiterGraphFilter(result, DELIMITER_CONFIG_FLAGS, null);

代码示例来源:origin: com.scireum/sirius-nlp-main

result = new WordDelimiterGraphFilter(result, GermanSearchAnalyzer.DELIMITER_CONFIG_FLAGS, null);

代码示例来源:origin: com.scireum/sirius-nlp-main

result = new WordDelimiterGraphFilter(result, configFlag, null);

代码示例来源:origin: lumongo/lumongo

tok = new WordDelimiterGraphFilter(lastTok, CATENATE_ALL, null);

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com