Return-Path: X-Original-To: apmail-lucene-dev-archive@www.apache.org Delivered-To: apmail-lucene-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 63885964A for ; Sun, 4 Mar 2012 16:40:25 +0000 (UTC) Received: (qmail 66577 invoked by uid 500); 4 Mar 2012 16:40:23 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 66479 invoked by uid 500); 4 Mar 2012 16:40:23 -0000 Mailing-List: contact dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@lucene.apache.org Delivered-To: mailing list dev@lucene.apache.org Received: (qmail 66424 invoked by uid 99); 4 Mar 2012 16:40:23 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 04 Mar 2012 16:40:23 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 04 Mar 2012 16:40:20 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id F1C78718C for ; Sun, 4 Mar 2012 16:39:58 +0000 (UTC) Date: Sun, 4 Mar 2012 16:39:58 +0000 (UTC) From: "Dawid Weiss (Commented) (JIRA)" To: dev@lucene.apache.org Message-ID: <1765320445.19917.1330879199043.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <171091046.18607.1330807797243.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (LUCENE-3842) Analyzing Suggester MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/LUCENE-3842?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13221929#comment-13221929 ] Dawid Weiss commented on LUCENE-3842: ------------------------------------- bq. Patch with a static utility method to translate a TokenStream to a byte-by-byte automaton. I looked at the patch but I don't fully get what it does. Looks like a combination of state sequence unions, am I right? bq. Brics has some code for this (puts all the accepted strings into a set). It's probably a naive walk with an acceptor. I've always wanted to see what Brics returns from that method for an automaton equivalent to .* :) > Analyzing Suggester > ------------------- > > Key: LUCENE-3842 > URL: https://issues.apache.org/jira/browse/LUCENE-3842 > Project: Lucene - Java > Issue Type: New Feature > Components: modules/spellchecker > Affects Versions: 3.6, 4.0 > Reporter: Robert Muir > Attachments: LUCENE-3842-TokenStream_to_Automaton.patch, LUCENE-3842.patch > > > Since we added shortest-path wFSA search in LUCENE-3714, and generified the comparator in LUCENE-3801, > I think we should look at implementing suggesters that have more capabilities than just basic prefix matching. > In particular I think the most flexible approach is to integrate with Analyzer at both build and query time, > such that we build a wFST with: > input: analyzed text such as ghost0christmas0past <-- byte 0 here is an optional token separator > output: surface form such as "the ghost of christmas past" > weight: the weight of the suggestion > we make an FST with PairOutputs, but only do the shortest path operation on the weight side (like > the test in LUCENE-3801), at the same time accumulating the output (surface form), which will be the actual suggestion. > This allows a lot of flexibility: > * Using even standardanalyzer means you can offer suggestions that ignore stopwords, e.g. if you type in "ghost of chr...", > it will suggest "the ghost of christmas past" > * we can add support for synonyms/wdf/etc at both index and query time (there are tradeoffs here, and this is not implemented!) > * this is a basis for more complicated suggesters such as Japanese suggesters, where the analyzed form is in fact the reading, > so we would add a TokenFilter that copies ReadingAttribute into term text to support that... > * other general things like offering suggestions that are more "fuzzy" like using a plural stemmer or ignoring accents or whatever. > According to my benchmarks, suggestions are still very fast with the prototype (e.g. ~ 100,000 QPS), and the FST size does not > explode (its short of twice that of a regular wFST, but this is still far smaller than TST or JaSpell, etc). -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org For additional commands, e-mail: dev-help@lucene.apache.org