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

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

本文整理了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

  1. private FST<IntsRef> affixFST(TreeMap<String,List<Integer>> affixes) throws IOException {
  2. IntSequenceOutputs outputs = IntSequenceOutputs.getSingleton();
  3. Builder<IntsRef> builder = new Builder<>(FST.INPUT_TYPE.BYTE4, outputs);
  4. IntsRefBuilder scratch = new IntsRefBuilder();
  5. for (Map.Entry<String,List<Integer>> entry : affixes.entrySet()) {
  6. Util.toUTF32(entry.getKey(), scratch);
  7. List<Integer> entries = entry.getValue();
  8. IntsRef output = new IntsRef(entries.size());
  9. for (Integer c : entries) {
  10. output.ints[output.length++] = c;
  11. }
  12. builder.add(scratch.get(), output);
  13. }
  14. return builder.finish();
  15. }

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

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

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

  1. Util.toUTF32(currentEntry, scratchInts);
  2. words.add(scratchInts.get(), currentOrds.get());
  3. Util.toUTF32(currentEntry, scratchInts);
  4. words.add(scratchInts.get(), currentOrds.get());
  5. success2 = true;

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

  1. private FST<IntsRef> affixFST(TreeMap<String,List<Integer>> affixes) throws IOException {
  2. IntSequenceOutputs outputs = IntSequenceOutputs.getSingleton();
  3. Builder<IntsRef> builder = new Builder<>(FST.INPUT_TYPE.BYTE4, outputs);
  4. IntsRefBuilder scratch = new IntsRefBuilder();
  5. for (Map.Entry<String,List<Integer>> entry : affixes.entrySet()) {
  6. Util.toUTF32(entry.getKey(), scratch);
  7. List<Integer> entries = entry.getValue();
  8. IntsRef output = new IntsRef(entries.size());
  9. for (Integer c : entries) {
  10. output.ints[output.length++] = c;
  11. }
  12. builder.add(scratch.get(), output);
  13. }
  14. return builder.finish();
  15. }

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

  1. private FST<IntsRef> affixFST(TreeMap<String,List<Integer>> affixes) throws IOException {
  2. IntSequenceOutputs outputs = IntSequenceOutputs.getSingleton();
  3. Builder<IntsRef> builder = new Builder<>(FST.INPUT_TYPE.BYTE4, outputs);
  4. IntsRefBuilder scratch = new IntsRefBuilder();
  5. for (Map.Entry<String,List<Integer>> entry : affixes.entrySet()) {
  6. Util.toUTF32(entry.getKey(), scratch);
  7. List<Integer> entries = entry.getValue();
  8. IntsRef output = new IntsRef(entries.size());
  9. for (Integer c : entries) {
  10. output.ints[output.length++] = c;
  11. }
  12. builder.add(scratch.get(), output);
  13. }
  14. return builder.finish();
  15. }

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

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

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

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

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

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

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

  1. Util.toUTF32(currentEntry, scratchInts);
  2. words.add(scratchInts.get(), currentOrds.get());
  3. Util.toUTF32(currentEntry, scratchInts);
  4. words.add(scratchInts.get(), currentOrds.get());
  5. success2 = true;

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

  1. Util.toUTF32(currentEntry, scratchInts);
  2. words.add(scratchInts.get(), currentOrds.get());
  3. Util.toUTF32(currentEntry, scratchInts);
  4. words.add(scratchInts.get(), currentOrds.get());
  5. success2 = true;

相关文章