You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Kits89 <ma...@gmail.com> on 2012/06/15 12:27:43 UTC

Does any one know how to expand queries using Wordnet with Lucene 3.6?

I've found the class WordnetSynonymParser in
org.apache.lucene.analysis.synonym but there aren't examples of its usage
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-any-one-know-how-to-expand-queries-using-Wordnet-with-Lucene-3-6-tp3989794.html
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


Re: Does any one know how to expand queries using Wordnet with Lucene 3.6?

Posted by Kits89 <ma...@gmail.com>.
Robert Muir wrote
> 
> 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).
> 

I assume that I have to read the synonyms file in the Prolog version of
Wordnet. But I get the error that I posted in my first message and I don't
know what's happening.

--
View this message in context: http://lucene.472066.n3.nabble.com/Does-any-one-know-how-to-expand-queries-using-Wordnet-with-Lucene-3-6-tp3989794p3990153.html
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


Re: Does any one know how to expand queries using Wordnet with Lucene 3.6?

Posted by Péter Király <ki...@gmail.com>.
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ály Péter

2012/6/15 Robert Muir <rc...@gmail.com>:
> 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/analysis/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 <ma...@gmail.com> wrote:
>> I've found the class WordnetSynonymParser in
>> org.apache.lucene.analysis.synonym but there aren't examples of its usage
>> 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-any-one-know-how-to-expand-queries-using-Wordnet-with-Lucene-3-6-tp3989794.html
>> 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


Re: Does any one know how to expand queries using Wordnet with Lucene 3.6?

Posted by Robert Muir <rc...@gmail.com>.
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/analysis/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 <ma...@gmail.com> wrote:
> I've found the class WordnetSynonymParser in
> org.apache.lucene.analysis.synonym but there aren't examples of its usage
> 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-any-one-know-how-to-expand-queries-using-Wordnet-with-Lucene-3-6-tp3989794.html
> 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