You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by mi...@apache.org on 2012/09/28 15:28:34 UTC
svn commit: r1391450 - in /lucene/dev/branches/lucene3842/lucene:
core/src/java/org/apache/lucene/analysis/
suggest/src/java/org/apache/lucene/search/suggest/analyzing/
test-framework/src/java/org/apache/lucene/analysis/
Author: mikemccand
Date: Fri Sep 28 13:28:33 2012
New Revision: 1391450
URL: http://svn.apache.org/viewvc?rev=1391450&view=rev
Log:
LUCENE-3842: javadocs
Added:
lucene/dev/branches/lucene3842/lucene/suggest/src/java/org/apache/lucene/search/suggest/analyzing/package.html (with props)
Modified:
lucene/dev/branches/lucene3842/lucene/core/src/java/org/apache/lucene/analysis/TokenStreamToAutomaton.java
lucene/dev/branches/lucene3842/lucene/suggest/src/java/org/apache/lucene/search/suggest/analyzing/AnalyzingCompletionLookup.java
lucene/dev/branches/lucene3842/lucene/suggest/src/java/org/apache/lucene/search/suggest/analyzing/FSTUtil.java
lucene/dev/branches/lucene3842/lucene/test-framework/src/java/org/apache/lucene/analysis/CannedBinaryTokenStream.java
Modified: lucene/dev/branches/lucene3842/lucene/core/src/java/org/apache/lucene/analysis/TokenStreamToAutomaton.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3842/lucene/core/src/java/org/apache/lucene/analysis/TokenStreamToAutomaton.java?rev=1391450&r1=1391449&r2=1391450&view=diff
==============================================================================
--- lucene/dev/branches/lucene3842/lucene/core/src/java/org/apache/lucene/analysis/TokenStreamToAutomaton.java (original)
+++ lucene/dev/branches/lucene3842/lucene/core/src/java/org/apache/lucene/analysis/TokenStreamToAutomaton.java Fri Sep 28 13:28:33 2012
@@ -39,6 +39,10 @@ import org.apache.lucene.util.automaton.
* POS_SEP and for holes we insert HOLE. */
public class TokenStreamToAutomaton {
+ /** Sole constructor. */
+ public TokenStreamToAutomaton() {
+ }
+
private static class Position implements RollingBuffer.Resettable {
// Any tokens that ended at our position arrive to this state:
State arriving;
Modified: lucene/dev/branches/lucene3842/lucene/suggest/src/java/org/apache/lucene/search/suggest/analyzing/AnalyzingCompletionLookup.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3842/lucene/suggest/src/java/org/apache/lucene/search/suggest/analyzing/AnalyzingCompletionLookup.java?rev=1391450&r1=1391449&r2=1391450&view=diff
==============================================================================
--- lucene/dev/branches/lucene3842/lucene/suggest/src/java/org/apache/lucene/search/suggest/analyzing/AnalyzingCompletionLookup.java (original)
+++ lucene/dev/branches/lucene3842/lucene/suggest/src/java/org/apache/lucene/search/suggest/analyzing/AnalyzingCompletionLookup.java Fri Sep 28 13:28:33 2012
@@ -60,13 +60,13 @@ import org.apache.lucene.util.fst.Util;
/**
* Suggester that first analyzes the surface form, adds the
- * analyzed from to a weighted FST, and then does the same
+ * analyzed form to a weighted FST, and then does the same
* thing at lookup time. This means lookup is based on the
* analyzed form while suggestions are still the surface
* form(s).
-
+ *
* <p>
- * This can result in powerful suggestor functionality. For
+ * This can result in powerful suggester functionality. For
* example, if you use an analyzer removing stop words,
* then the partial text "ghost chr..." could see the
* suggestion "The Ghost of Christmas Past". If
Modified: lucene/dev/branches/lucene3842/lucene/suggest/src/java/org/apache/lucene/search/suggest/analyzing/FSTUtil.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3842/lucene/suggest/src/java/org/apache/lucene/search/suggest/analyzing/FSTUtil.java?rev=1391450&r1=1391449&r2=1391450&view=diff
==============================================================================
--- lucene/dev/branches/lucene3842/lucene/suggest/src/java/org/apache/lucene/search/suggest/analyzing/FSTUtil.java (original)
+++ lucene/dev/branches/lucene3842/lucene/suggest/src/java/org/apache/lucene/search/suggest/analyzing/FSTUtil.java Fri Sep 28 13:28:33 2012
@@ -29,6 +29,10 @@ import org.apache.lucene.util.fst.FST;
// TODO: move to core? nobody else uses it yet though...
+/**
+ * Exposes a utility method to enumerate all paths
+ * intersecting an {@link Automaton} with an {@link FST}.
+ */
public class FSTUtil {
/** Holds a pair (automaton, fst) of states and accumulated output in the intersected machine. */
Added: lucene/dev/branches/lucene3842/lucene/suggest/src/java/org/apache/lucene/search/suggest/analyzing/package.html
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3842/lucene/suggest/src/java/org/apache/lucene/search/suggest/analyzing/package.html?rev=1391450&view=auto
==============================================================================
--- lucene/dev/branches/lucene3842/lucene/suggest/src/java/org/apache/lucene/search/suggest/analyzing/package.html (added)
+++ lucene/dev/branches/lucene3842/lucene/suggest/src/java/org/apache/lucene/search/suggest/analyzing/package.html Fri Sep 28 13:28:33 2012
@@ -0,0 +1,22 @@
+<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<html><head></head>
+<body>
+Analyzer based autosuggest.
+</body>
+</html>
Modified: lucene/dev/branches/lucene3842/lucene/test-framework/src/java/org/apache/lucene/analysis/CannedBinaryTokenStream.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3842/lucene/test-framework/src/java/org/apache/lucene/analysis/CannedBinaryTokenStream.java?rev=1391450&r1=1391449&r2=1391450&view=diff
==============================================================================
--- lucene/dev/branches/lucene3842/lucene/test-framework/src/java/org/apache/lucene/analysis/CannedBinaryTokenStream.java (original)
+++ lucene/dev/branches/lucene3842/lucene/test-framework/src/java/org/apache/lucene/analysis/CannedBinaryTokenStream.java Fri Sep 28 13:28:33 2012
@@ -59,10 +59,16 @@ public final class CannedBinaryTokenStre
private final PositionLengthAttribute posLengthAtt = addAttribute(PositionLengthAttribute.class);
private final OffsetAttribute offsetAtt = addAttribute(OffsetAttribute.class);
+ /** An attribute extending {@link
+ * TermToBytesRefAttribute} but exposing {@link
+ * #setBytesRef} method. */
public interface BinaryTermAttribute extends TermToBytesRefAttribute {
+
+ /** Set the current binary value. */
public void setBytesRef(BytesRef bytes);
}
+ /** Implementation for {@link BinaryTermAttribute}. */
public final static class BinaryTermAttributeImpl extends AttributeImpl implements BinaryTermAttribute, TermToBytesRefAttribute {
private final BytesRef bytes = new BytesRef();