Return-Path: X-Original-To: apmail-lucene-java-user-archive@www.apache.org Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6EBA99558 for ; Fri, 15 Jun 2012 18:07:52 +0000 (UTC) Received: (qmail 88456 invoked by uid 500); 15 Jun 2012 18:07:50 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 88398 invoked by uid 500); 15 Jun 2012 18:07:50 -0000 Mailing-List: contact java-user-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-user@lucene.apache.org Delivered-To: mailing list java-user@lucene.apache.org Received: (qmail 88388 invoked by uid 99); 15 Jun 2012 18:07:49 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 15 Jun 2012 18:07:49 +0000 X-ASF-Spam-Status: No, hits=0.6 required=5.0 tests=FSL_RCVD_USER,RCVD_IN_DNSWL_LOW,SPF_PASS,URI_HEX X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of kirunews@gmail.com designates 209.85.213.48 as permitted sender) Received: from [209.85.213.48] (HELO mail-yw0-f48.google.com) (209.85.213.48) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 15 Jun 2012 18:07:45 +0000 Received: by yhfq46 with SMTP id q46so3180344yhf.35 for ; Fri, 15 Jun 2012 11:07:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=VoORvXMayZLNqSZoGqoSJD2X5U4OEGsi0sBlFPGKHbc=; b=ewuPi4gt9SddJg+jarElSi7XWEKds/66zY78CLM/OCDR0NBY8attYphjWxYft6p4Zw TTBwrwPgJxxFVHa1hA3Frw5Jz/sdc8BfgbMNJO8xfPFrty6tPsAb4HCtjuPQDbowlVfS uzKbAzRxe6i46FQxn8zhveYQYQ6VGQ9aQLiawfk7Tj+g524Gc/cK63keJOz7V1Sg9gBX 5JkjjOQUr8kxNNd07yr8Eu0hBaHexG7QhjHuwKWbmYLLflV1Xkq0JIGPbguGuboJ89/u QSD3tRPX793QWwKlUM3o7rLMX3Lmmxl2y2OQiTUQR2te+YPAbwr6UkJIKu7ChsBz6R0h 0gLg== MIME-Version: 1.0 Received: by 10.60.2.131 with SMTP id 3mr6855332oeu.59.1339783644708; Fri, 15 Jun 2012 11:07:24 -0700 (PDT) Received: by 10.76.174.35 with HTTP; Fri, 15 Jun 2012 11:07:24 -0700 (PDT) In-Reply-To: References: <1339756063102-3989794.post@n3.nabble.com> Date: Fri, 15 Jun 2012 20:07:24 +0200 Message-ID: Subject: Re: Does any one know how to expand queries using Wordnet with Lucene 3.6? From: =?UTF-8?B?UMOpdGVyIEtpcsOhbHk=?= To: java-user@lucene.apache.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org Hi, maybe not the one you are looking for, only a similar thing what I have create: http://drupalcode.org/project/xc.git/tree/refs/heads/6.x-1.x:/= xc_wordnet. This is a Drupal module and a distinct Java class. The Java class creates an XML file, which can be imported into Solr, to build a Wordnet index (so I have two indexes: one for my content, and one for wordnet). The Drupal module provides synonyms as links, so if the user enters a term, below or upon the search results a list of synsets is shown up, as links. The user can click any synonym or a special "all synonyms" link, wich runs the refinement search. For me the suggested solution of using Wordnet in a SynonymFilter produced very-very strange results, because sometimes (and more frequently as toleratable) the synonyms go too far from the impliciltly intended meaning. For example Wiener -> Frankfurter -> hot dog is a real-world example. You can imagine that your result set will be fulfilled with unwanted hits when you search for Wien (capital of Austria). For me not to handling it automatically, but provide something the user to help him to refine the search is the optimal solution. Regards, Kir=C3=A1ly P=C3=A9ter 2012/6/15 Robert Muir : > See its test: http://svn.apache.org/repos/asf/lucene/dev/branches/lucene_= solr_3_6/lucene/contrib/analyzers/common/src/test/org/apache/lucene/analysi= s/synonym/TestWordnetSynonymParser.java > > The idea is you parse the wordnet file with this thing, and create a > SynonymFilter that you use in your query Analyzer (The one you pass to > QueryParser). > > On Fri, Jun 15, 2012 at 6:27 AM, Kits89 wrote: >> I've found the class WordnetSynonymParser in >> org.apache.lucene.analysis.synonym but there aren't examples of its usag= e >> neither in the API nor in google. Does any one have experience with it? >> >> Thank you! >> >> EDIT: I know that there used to be the class SynExpand, but with version= 3.6 >> it disappeared... >> >> -- >> View this message in context: http://lucene.472066.n3.nabble.com/Does-an= y-one-know-how-to-expand-queries-using-Wordnet-with-Lucene-3-6-tp3989794.ht= ml >> Sent from the Lucene - Java Users mailing list archive at Nabble.com. >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org >> For additional commands, e-mail: java-user-help@lucene.apache.org >> > > > > -- > lucidimagination.com > > --------------------------------------------------------------------- > To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org > For additional commands, e-mail: java-user-help@lucene.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org