Package org.apache.lucene.util.fst

Examples of org.apache.lucene.util.fst.IntSequenceOutputs


      CharsetDecoder decoder = getJavaEncoding(encoding);
      aff2 = new BufferedInputStream(new FileInputStream(aff));
      readAffixFile(aff2, decoder);
     
      // read dictionary entries
      IntSequenceOutputs o = IntSequenceOutputs.getSingleton();
      Builder<IntsRef> b = new Builder<>(FST.INPUT_TYPE.BYTE4, o);
      readDictionaryFiles(dictionaries, decoder, b);
      words = b.finish();
      aliases = null; // no longer needed
    } finally {
View Full Code Here


    assert currentIndex == seenStrips.size();
    stripOffsets[currentIndex] = currentOffset;
  }
 
  private FST<IntsRef> affixFST(TreeMap<String,List<Character>> affixes) throws IOException {
    IntSequenceOutputs outputs = IntSequenceOutputs.getSingleton();
    Builder<IntsRef> builder = new Builder<>(FST.INPUT_TYPE.BYTE4, outputs);
   
    IntsRef scratch = new IntsRef();
    for (Map.Entry<String,List<Character>> entry : affixes.entrySet()) {
      Util.toUTF32(entry.getKey(), scratch);
View Full Code Here

      CharsetDecoder decoder = getJavaEncoding(encoding);
      aff2 = new BufferedInputStream(new FileInputStream(aff));
      readAffixFile(aff2, decoder);
     
      // read dictionary entries
      IntSequenceOutputs o = IntSequenceOutputs.getSingleton();
      Builder<IntsRef> b = new Builder<>(FST.INPUT_TYPE.BYTE4, o);
      readDictionaryFiles(dictionaries, decoder, b);
      words = b.finish();
      aliases = null; // no longer needed
    } finally {
View Full Code Here

    assert currentIndex == seenStrips.size();
    stripOffsets[currentIndex] = currentOffset;
  }
 
  private FST<IntsRef> affixFST(TreeMap<String,List<Character>> affixes) throws IOException {
    IntSequenceOutputs outputs = IntSequenceOutputs.getSingleton();
    Builder<IntsRef> builder = new Builder<>(FST.INPUT_TYPE.BYTE4, outputs);
   
    IntsRef scratch = new IntsRef();
    for (Map.Entry<String,List<Character>> entry : affixes.entrySet()) {
      Util.toUTF32(entry.getKey(), scratch);
View Full Code Here

TOP

Related Classes of org.apache.lucene.util.fst.IntSequenceOutputs

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.