org.apache.lucene.util.automaton.Automata.makeStringUnion()方法的使用及代码示例

x33g5p2x  于2022-01-17 转载在 其他  
字(3.7k)|赞(0)|评价(0)|浏览(102)

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

Automata.makeStringUnion介绍

[英]Returns a new (deterministic and minimal) automaton that accepts the union of the given collection of BytesRefs representing UTF-8 encoded strings.
[中]返回一个新的(确定性和最小)自动机,该自动机接受表示UTF-8编码字符串的给定字节引用集合的并集。

代码示例

代码示例来源:origin: org.elasticsearch/elasticsearch

private Automaton toAutomaton() {
  Automaton a = null;
  if (include != null) {
    a = include.toAutomaton();
  } else if (includeValues != null) {
    a = Automata.makeStringUnion(includeValues);
  } else {
    a = Automata.makeAnyString();
  }
  if (exclude != null) {
    a = Operations.minus(a, exclude.toAutomaton(), Operations.DEFAULT_MAX_DETERMINIZED_STATES);
  } else if (excludeValues != null) {
    a = Operations.minus(a, Automata.makeStringUnion(excludeValues), Operations.DEFAULT_MAX_DETERMINIZED_STATES);
  }
  return a;
}

代码示例来源:origin: wikimedia/search-highlighter

private Automaton buildTermsAutomata() {
  // Sort the terms in UTF-8 order.
  CollectionUtil.timSort(terms);
  return Automata.makeStringUnion(terms);
}

代码示例来源:origin: harbby/presto-connectors

private Automaton toAutomaton() {
  Automaton a = null;
  if (include != null) {
    a = include.toAutomaton();
  } else if (includeValues != null) {
    a = Automata.makeStringUnion(includeValues);
  } else {
    a = Automata.makeAnyString();
  }
  if (exclude != null) {
    a = Operations.minus(a, exclude.toAutomaton(), Operations.DEFAULT_MAX_DETERMINIZED_STATES);
  } else if (excludeValues != null) {
    a = Operations.minus(a, Automata.makeStringUnion(excludeValues), Operations.DEFAULT_MAX_DETERMINIZED_STATES);
  }
  return a;
}

代码示例来源:origin: apache/servicemix-bundles

private Automaton toAutomaton() {
  Automaton a = null;
  if (include != null) {
    a = include.toAutomaton();
  } else if (includeValues != null) {
    a = Automata.makeStringUnion(includeValues);
  } else {
    a = Automata.makeAnyString();
  }
  if (exclude != null) {
    a = Operations.minus(a, exclude.toAutomaton(), Operations.DEFAULT_MAX_DETERMINIZED_STATES);
  } else if (excludeValues != null) {
    a = Operations.minus(a, Automata.makeStringUnion(excludeValues), Operations.DEFAULT_MAX_DETERMINIZED_STATES);
  }
  return a;
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.elasticsearch

private Automaton toAutomaton() {
  Automaton a = null;
  if (include != null) {
    a = include.toAutomaton();
  } else if (includeValues != null) {
    a = Automata.makeStringUnion(includeValues);
  } else {
    a = Automata.makeAnyString();
  }
  if (exclude != null) {
    a = Operations.minus(a, exclude.toAutomaton(), Operations.DEFAULT_MAX_DETERMINIZED_STATES);
  } else if (excludeValues != null) {
    a = Operations.minus(a, Automata.makeStringUnion(excludeValues), Operations.DEFAULT_MAX_DETERMINIZED_STATES);
  }
  return a;
}

代码示例来源:origin: org.codelibs/elasticsearch-querybuilders

private Automaton toAutomaton() {
  Automaton a = null;
  if (include != null) {
    a = include.toAutomaton();
  } else if (includeValues != null) {
    a = Automata.makeStringUnion(includeValues);
  } else {
    a = Automata.makeAnyString();
  }
  if (exclude != null) {
    a = Operations.minus(a, exclude.toAutomaton(), Operations.DEFAULT_MAX_DETERMINIZED_STATES);
  } else if (excludeValues != null) {
    a = Operations.minus(a, Automata.makeStringUnion(excludeValues), Operations.DEFAULT_MAX_DETERMINIZED_STATES);
  }
  return a;
}

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

private Automaton toAutomaton() {
  Automaton a = null;
  if (include != null) {
    a = include.toAutomaton();
  } else if (includeValues != null) {
    a = Automata.makeStringUnion(includeValues);
  } else {
    a = Automata.makeAnyString();
  }
  if (exclude != null) {
    a = Operations.minus(a, exclude.toAutomaton(), Operations.DEFAULT_MAX_DETERMINIZED_STATES);
  } else if (excludeValues != null) {
    a = Operations.minus(a, Automata.makeStringUnion(excludeValues), Operations.DEFAULT_MAX_DETERMINIZED_STATES);
  }
  return a;
}

相关文章