org.apache.lucene.util.fst.Util.toUTF32()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(3.5k)|赞(0)|评价(0)|浏览(153)

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

Util.toUTF32介绍

[英]Decodes the Unicode codepoints from the provided CharSequence and places them in the provided scratch IntsRef, which must not be null, returning it.
[中]

代码示例

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

private FST<IntsRef> affixFST(TreeMap<String,List<Integer>> affixes) throws IOException {
 IntSequenceOutputs outputs = IntSequenceOutputs.getSingleton();
 Builder<IntsRef> builder = new Builder<>(FST.INPUT_TYPE.BYTE4, outputs);
 IntsRefBuilder scratch = new IntsRefBuilder();
 for (Map.Entry<String,List<Integer>> entry : affixes.entrySet()) {
  Util.toUTF32(entry.getKey(), scratch);
  List<Integer> entries = entry.getValue();
  IntsRef output = new IntsRef(entries.size());
  for (Integer c : entries) {
   output.ints[output.length++] = c;
  }
  builder.add(scratch.get(), output);
 }
 return builder.finish();
}

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

builder.add(Util.toUTF32(input, scratchIntsRef), scratch.toBytesRef());

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

Util.toUTF32(currentEntry, scratchInts);
   words.add(scratchInts.get(), currentOrds.get());
Util.toUTF32(currentEntry, scratchInts);
words.add(scratchInts.get(), currentOrds.get());
success2 = true;

代码示例来源:origin: org.infinispan/infinispan-embedded-query

private FST<IntsRef> affixFST(TreeMap<String,List<Integer>> affixes) throws IOException {
 IntSequenceOutputs outputs = IntSequenceOutputs.getSingleton();
 Builder<IntsRef> builder = new Builder<>(FST.INPUT_TYPE.BYTE4, outputs);
 IntsRefBuilder scratch = new IntsRefBuilder();
 for (Map.Entry<String,List<Integer>> entry : affixes.entrySet()) {
  Util.toUTF32(entry.getKey(), scratch);
  List<Integer> entries = entry.getValue();
  IntsRef output = new IntsRef(entries.size());
  for (Integer c : entries) {
   output.ints[output.length++] = c;
  }
  builder.add(scratch.get(), output);
 }
 return builder.finish();
}

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

private FST<IntsRef> affixFST(TreeMap<String,List<Integer>> affixes) throws IOException {
 IntSequenceOutputs outputs = IntSequenceOutputs.getSingleton();
 Builder<IntsRef> builder = new Builder<>(FST.INPUT_TYPE.BYTE4, outputs);
 IntsRefBuilder scratch = new IntsRefBuilder();
 for (Map.Entry<String,List<Integer>> entry : affixes.entrySet()) {
  Util.toUTF32(entry.getKey(), scratch);
  List<Integer> entries = entry.getValue();
  IntsRef output = new IntsRef(entries.size());
  for (Integer c : entries) {
   output.ints[output.length++] = c;
  }
  builder.add(scratch.get(), output);
 }
 return builder.finish();
}

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

builder.add(Util.toUTF32(input, scratchIntsRef), BytesRef.deepCopyOf(scratch));

代码示例来源:origin: org.infinispan/infinispan-embedded-query

builder.add(Util.toUTF32(input, scratchIntsRef), scratch.toBytesRef());

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

builder.add(Util.toUTF32(input, scratchIntsRef), scratch.toBytesRef());

代码示例来源:origin: org.infinispan/infinispan-embedded-query

Util.toUTF32(currentEntry, scratchInts);
   words.add(scratchInts.get(), currentOrds.get());
Util.toUTF32(currentEntry, scratchInts);
words.add(scratchInts.get(), currentOrds.get());
success2 = true;

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

Util.toUTF32(currentEntry, scratchInts);
   words.add(scratchInts.get(), currentOrds.get());
Util.toUTF32(currentEntry, scratchInts);
words.add(scratchInts.get(), currentOrds.get());
success2 = true;

相关文章