mirror of https://github.com/apache/lucene.git
LUCENE-3140: move fst to .. on trunk
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1128871 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
bcfd0f0beb
commit
150d8b3089
|
@ -434,6 +434,12 @@ Bug fixes
|
|||
|
||||
======================= Lucene 3.x (not yet released) ================
|
||||
|
||||
Changes in backwards compatibility policy
|
||||
|
||||
* LUCENE-3140: IndexOutput.copyBytes now takes a DataInput (superclass
|
||||
of IndexInput) as its first argument. (Robert Muir, Dawid Weiss,
|
||||
Mike McCandless)
|
||||
|
||||
Changes in runtime behavior
|
||||
|
||||
* LUCENE-2834: the hash used to compute the lock file name when the
|
||||
|
@ -441,6 +447,11 @@ Changes in runtime behavior
|
|||
will see a different lucene-XXX-write.lock in your lock directory.
|
||||
(Robert Muir, Uwe Schindler, Mike McCandless)
|
||||
|
||||
New Features
|
||||
|
||||
* LUCENE-3140: Added experimental FST implementation to Lucene.
|
||||
(Robert Muir, Dawid Weiss, Mike McCandless)
|
||||
|
||||
======================= Lucene 3.2.0 =======================
|
||||
|
||||
Changes in backwards compatibility policy
|
||||
|
|
|
@ -33,11 +33,11 @@ import org.apache.lucene.store.Directory;
|
|||
import org.apache.lucene.store.IndexInput;
|
||||
import org.apache.lucene.util.BytesRef;
|
||||
import org.apache.lucene.util.CodecUtil;
|
||||
import org.apache.lucene.util.automaton.fst.Builder;
|
||||
import org.apache.lucene.util.automaton.fst.BytesRefFSTEnum;
|
||||
import org.apache.lucene.util.automaton.fst.FST;
|
||||
import org.apache.lucene.util.automaton.fst.PositiveIntOutputs;
|
||||
import org.apache.lucene.util.automaton.fst.Util; // for toDot
|
||||
import org.apache.lucene.util.fst.Builder;
|
||||
import org.apache.lucene.util.fst.BytesRefFSTEnum;
|
||||
import org.apache.lucene.util.fst.FST;
|
||||
import org.apache.lucene.util.fst.PositiveIntOutputs;
|
||||
import org.apache.lucene.util.fst.Util; // for toDot
|
||||
|
||||
/** See {@link VariableGapTermsIndexWriter}
|
||||
*
|
||||
|
|
|
@ -29,9 +29,9 @@ import org.apache.lucene.store.IndexOutput;
|
|||
import org.apache.lucene.util.BytesRef;
|
||||
import org.apache.lucene.util.CodecUtil;
|
||||
import org.apache.lucene.util.IOUtils;
|
||||
import org.apache.lucene.util.automaton.fst.Builder;
|
||||
import org.apache.lucene.util.automaton.fst.FST;
|
||||
import org.apache.lucene.util.automaton.fst.PositiveIntOutputs;
|
||||
import org.apache.lucene.util.fst.Builder;
|
||||
import org.apache.lucene.util.fst.FST;
|
||||
import org.apache.lucene.util.fst.PositiveIntOutputs;
|
||||
|
||||
/**
|
||||
* Selects index terms according to provided pluggable
|
||||
|
|
|
@ -32,11 +32,11 @@ import org.apache.lucene.util.Bits;
|
|||
import org.apache.lucene.util.CharsRef;
|
||||
import org.apache.lucene.util.StringHelper;
|
||||
import org.apache.lucene.util.UnicodeUtil;
|
||||
import org.apache.lucene.util.automaton.fst.Builder;
|
||||
import org.apache.lucene.util.automaton.fst.BytesRefFSTEnum;
|
||||
import org.apache.lucene.util.automaton.fst.FST;
|
||||
import org.apache.lucene.util.automaton.fst.PositiveIntOutputs;
|
||||
import org.apache.lucene.util.automaton.fst.PairOutputs;
|
||||
import org.apache.lucene.util.fst.Builder;
|
||||
import org.apache.lucene.util.fst.BytesRefFSTEnum;
|
||||
import org.apache.lucene.util.fst.FST;
|
||||
import org.apache.lucene.util.fst.PositiveIntOutputs;
|
||||
import org.apache.lucene.util.fst.PairOutputs;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Comparator;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package org.apache.lucene.util.automaton.fst;
|
||||
package org.apache.lucene.util.fst;
|
||||
|
||||
/**
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
@ -1,4 +1,4 @@
|
|||
package org.apache.lucene.util.automaton.fst;
|
||||
package org.apache.lucene.util.fst;
|
||||
|
||||
/**
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
|
@ -25,6 +25,7 @@ import org.apache.lucene.util.BytesRef;
|
|||
|
||||
/**
|
||||
* Output is a sequence of bytes, for each input term.
|
||||
*
|
||||
* @lucene.experimental
|
||||
*/
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.apache.lucene.util.automaton.fst;
|
||||
package org.apache.lucene.util.fst;
|
||||
|
||||
/**
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
|
@ -22,6 +22,7 @@ import java.io.IOException;
|
|||
import org.apache.lucene.util.BytesRef;
|
||||
|
||||
/** Can next() and advance() through the terms in an FST
|
||||
*
|
||||
* @lucene.experimental
|
||||
*/
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.apache.lucene.util.automaton.fst;
|
||||
package org.apache.lucene.util.fst;
|
||||
|
||||
/**
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
|
@ -23,7 +23,7 @@ import org.apache.lucene.store.DataInput;
|
|||
import org.apache.lucene.store.DataOutput;
|
||||
import org.apache.lucene.util.ArrayUtil;
|
||||
import org.apache.lucene.util.CodecUtil;
|
||||
import org.apache.lucene.util.automaton.fst.Builder.UnCompiledNode;
|
||||
import org.apache.lucene.util.fst.Builder.UnCompiledNode;
|
||||
|
||||
// NOTE: while the FST is able to represent a non-final
|
||||
// dead-end state (NON_FINAL_END_NODE=0), the layres above
|
||||
|
@ -32,6 +32,7 @@ import org.apache.lucene.util.automaton.fst.Builder.UnCompiledNode;
|
|||
/** Represents an FST using a compact byte[] format.
|
||||
* <p> The format is similar to what's used by Morfologik
|
||||
* (http://sourceforge.net/projects/morfologik).
|
||||
*
|
||||
* @lucene.experimental
|
||||
*/
|
||||
public class FST<T> {
|
|
@ -1,4 +1,4 @@
|
|||
package org.apache.lucene.util.automaton.fst;
|
||||
package org.apache.lucene.util.fst;
|
||||
|
||||
/**
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
|
@ -23,6 +23,7 @@ import org.apache.lucene.util.RamUsageEstimator;
|
|||
import java.io.IOException;
|
||||
|
||||
/** Can next() and advance() through the terms in an FST
|
||||
*
|
||||
* @lucene.experimental
|
||||
*/
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.apache.lucene.util.automaton.fst;
|
||||
package org.apache.lucene.util.fst;
|
||||
|
||||
/**
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
|
@ -25,6 +25,7 @@ import org.apache.lucene.util.IntsRef;
|
|||
|
||||
/**
|
||||
* Output is a sequence of ints, for each input term.
|
||||
*
|
||||
* @lucene.experimental
|
||||
*/
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.apache.lucene.util.automaton.fst;
|
||||
package org.apache.lucene.util.fst;
|
||||
|
||||
/**
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
|
@ -22,6 +22,7 @@ import org.apache.lucene.util.IntsRef;
|
|||
import java.io.IOException;
|
||||
|
||||
/** Can next() and advance() through the terms in an FST
|
||||
*
|
||||
* @lucene.experimental
|
||||
*/
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.apache.lucene.util.automaton.fst;
|
||||
package org.apache.lucene.util.fst;
|
||||
|
||||
/**
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
|
@ -22,6 +22,8 @@ import org.apache.lucene.store.DataOutput;
|
|||
|
||||
/**
|
||||
* Use this if you just want to build an FSA.
|
||||
*
|
||||
* @lucene.experimental
|
||||
*/
|
||||
|
||||
public final class NoOutputs extends Outputs<Object> {
|
|
@ -1,4 +1,4 @@
|
|||
package org.apache.lucene.util.automaton.fst;
|
||||
package org.apache.lucene.util.fst;
|
||||
|
||||
/**
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
@ -1,4 +1,4 @@
|
|||
package org.apache.lucene.util.automaton.fst;
|
||||
package org.apache.lucene.util.fst;
|
||||
|
||||
/**
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
|
@ -25,6 +25,7 @@ import org.apache.lucene.store.DataOutput;
|
|||
/**
|
||||
* Represents the outputs for an FST, providing the basic
|
||||
* algebra needed for the FST.
|
||||
*
|
||||
* @lucene.experimental
|
||||
*/
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.apache.lucene.util.automaton.fst;
|
||||
package org.apache.lucene.util.fst;
|
||||
|
||||
/**
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
|
@ -24,10 +24,10 @@ import org.apache.lucene.store.DataOutput;
|
|||
|
||||
/**
|
||||
* Pairs up two outputs into one.
|
||||
*
|
||||
* @lucene.experimental
|
||||
*/
|
||||
|
||||
|
||||
public class PairOutputs<A,B> extends Outputs<PairOutputs.Pair<A,B>> {
|
||||
|
||||
private final Pair<A,B> NO_OUTPUT;
|
|
@ -1,4 +1,4 @@
|
|||
package org.apache.lucene.util.automaton.fst;
|
||||
package org.apache.lucene.util.fst;
|
||||
|
||||
/**
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
|
@ -27,6 +27,7 @@ import org.apache.lucene.store.DataOutput;
|
|||
* resulting FST is not guaranteed to be minimal! See
|
||||
* {@link Builder}. You cannot store 0 output with this
|
||||
* (that's reserved to mean "no output")!
|
||||
*
|
||||
* @lucene.experimental
|
||||
*/
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.apache.lucene.util.automaton.fst;
|
||||
package org.apache.lucene.util.fst;
|
||||
|
||||
/**
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
@ -1,4 +1,4 @@
|
|||
package org.apache.lucene.util.automaton.fst;
|
||||
package org.apache.lucene.util.fst;
|
||||
|
||||
/**
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
|
@ -23,7 +23,9 @@ import java.util.*;
|
|||
import org.apache.lucene.util.BytesRef;
|
||||
import org.apache.lucene.util.IntsRef;
|
||||
|
||||
/** Static helper methods */
|
||||
/** Static helper methods
|
||||
*
|
||||
* @lucene.experimental */
|
||||
public final class Util {
|
||||
private Util() {
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
package org.apache.lucene.util.automaton.fst;
|
||||
package org.apache.lucene.util.fst;
|
||||
|
||||
/**
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
|
@ -47,7 +47,7 @@ import org.apache.lucene.util.LineFileDocs;
|
|||
import org.apache.lucene.util.LuceneTestCase;
|
||||
import org.apache.lucene.util.UnicodeUtil;
|
||||
import org.apache.lucene.util._TestUtil;
|
||||
import org.apache.lucene.util.automaton.fst.FST.Arc;
|
||||
import org.apache.lucene.util.fst.FST.Arc;
|
||||
|
||||
public class TestFSTs extends LuceneTestCase {
|
||||
|
||||
|
@ -1226,7 +1226,7 @@ public class TestFSTs extends LuceneTestCase {
|
|||
}
|
||||
}
|
||||
|
||||
// java -cp build/classes/test:build/classes/java:lib/junit-4.7.jar org.apache.lucene.util.automaton.fst.TestFSTs /x/tmp/allTerms3.txt out
|
||||
// java -cp build/classes/test:build/classes/java:lib/junit-4.7.jar org.apache.lucene.util.fst.TestFSTs /x/tmp/allTerms3.txt out
|
||||
public static void main(String[] args) throws IOException {
|
||||
int prune = 0;
|
||||
int limit = Integer.MAX_VALUE;
|
|
@ -15,11 +15,11 @@ import java.util.List;
|
|||
|
||||
import org.apache.lucene.util.IOUtils;
|
||||
import org.apache.lucene.util.IntsRef;
|
||||
import org.apache.lucene.util.automaton.fst.Builder;
|
||||
import org.apache.lucene.util.automaton.fst.FST;
|
||||
import org.apache.lucene.util.automaton.fst.FST.Arc;
|
||||
import org.apache.lucene.util.automaton.fst.NoOutputs;
|
||||
import org.apache.lucene.util.automaton.fst.Outputs;
|
||||
import org.apache.lucene.util.fst.Builder;
|
||||
import org.apache.lucene.util.fst.FST;
|
||||
import org.apache.lucene.util.fst.FST.Arc;
|
||||
import org.apache.lucene.util.fst.NoOutputs;
|
||||
import org.apache.lucene.util.fst.Outputs;
|
||||
|
||||
import org.apache.lucene.search.suggest.Lookup;
|
||||
import org.apache.lucene.search.suggest.tst.TSTLookup;
|
||||
|
|
Loading…
Reference in New Issue