You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Pablo Anzorena <an...@gmail.com> on 2017/04/21 14:08:33 UTC

How to use Wordnet in solr?

Hey,

I'm planning to use Wordnet and I want to know how.

There's a class called *WordnetSynonymParser *, does anybody use it? It
says it is experimental...

I'm using solr 5.2.1

Briefly speaking about my needs:
I have different collections in different languages (fr, pr, sp, en).
When the user search for example in the english collection the word
"furnitures" I want to look for "table", "chair", "furniture"(without the
plural) and all the synonyms of "furnitures". Wordnet already provides me
all this and in different languages, that's why it would be great to have
solr using it.

Regards,
Pablo.

Re: How to use Wordnet in solr?

Posted by Steve Rowe <sa...@gmail.com>.
From <https://cwiki.apache.org/confluence/display/solr/Filter+Descriptions#FilterDescriptions-SynonymGraphFilter> (also applies to SynonymFilter):

-----
format: (optional; default: solr) Controls how the synonyms will be parsed. The short names solr (for SolrSynonymParser) and wordnet (for WordnetSynonymParser ) are supported, or you may alternatively supply the name of your own  SynonymMap.Builder  subclass.
-----

--
Steve
www.lucidworks.com

> On Apr 21, 2017, at 10:28 AM, Alexandre Rafalovitch <ar...@gmail.com> wrote:
> 
> I am not sure WordnetSynonymParser is accessible from Solr. At least
> I never heard anybody mention it.
> 
> I am also aware of https://github.com/nicholasding/solr-lemmatizer but
> that's lematizer, not a synonym builder. But perhaps there are some
> lessons/code in there that could be useful.
> 
> Regards,
>   Alex.
> ----
> http://www.solr-start.com/ - Resources for Solr users, new and experienced
> 
> 
> On 21 April 2017 at 10:08, Pablo Anzorena <an...@gmail.com> wrote:
>> Hey,
>> 
>> I'm planning to use Wordnet and I want to know how.
>> 
>> There's a class called *WordnetSynonymParser *, does anybody use it? It
>> says it is experimental...
>> 
>> I'm using solr 5.2.1
>> 
>> Briefly speaking about my needs:
>> I have different collections in different languages (fr, pr, sp, en).
>> When the user search for example in the english collection the word
>> "furnitures" I want to look for "table", "chair", "furniture"(without the
>> plural) and all the synonyms of "furnitures". Wordnet already provides me
>> all this and in different languages, that's why it would be great to have
>> solr using it.
>> 
>> Regards,
>> Pablo.


Re: How to use Wordnet in solr?

Posted by Alexandre Rafalovitch <ar...@gmail.com>.
 I am not sure WordnetSynonymParser is accessible from Solr. At least
I never heard anybody mention it.

I am also aware of https://github.com/nicholasding/solr-lemmatizer but
that's lematizer, not a synonym builder. But perhaps there are some
lessons/code in there that could be useful.

Regards,
   Alex.
----
http://www.solr-start.com/ - Resources for Solr users, new and experienced


On 21 April 2017 at 10:08, Pablo Anzorena <an...@gmail.com> wrote:
> Hey,
>
> I'm planning to use Wordnet and I want to know how.
>
> There's a class called *WordnetSynonymParser *, does anybody use it? It
> says it is experimental...
>
> I'm using solr 5.2.1
>
> Briefly speaking about my needs:
> I have different collections in different languages (fr, pr, sp, en).
> When the user search for example in the english collection the word
> "furnitures" I want to look for "table", "chair", "furniture"(without the
> plural) and all the synonyms of "furnitures". Wordnet already provides me
> all this and in different languages, that's why it would be great to have
> solr using it.
>
> Regards,
> Pablo.

Re: How to use Wordnet in solr?

Posted by "alessandro.benedetti" <a....@sease.io>.
No no Pablo, what I am saying is that you will need to :

1) download the wordnet file
2) upload it to Solr as a managed resource
3) use the synonym token filter with the wordnet format.

I don't know ( and I don't think it is possible right now) how to configure
a managed resource to fetch data from an online service, maybe could be a
good addition for this specific synonym filter.

Cheers



-----
---------------
Alessandro Benedetti
Search Consultant, R&D Software Engineer, Director
Sease Ltd. - www.sease.io
--
View this message in context: http://lucene.472066.n3.nabble.com/How-to-use-Wordnet-in-solr-tp4331273p4331554.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: How to use Wordnet in solr?

Posted by Pablo Anzorena <an...@gmail.com>.
Thanks to everybody.

I will try first Alessandro and Steve recommendation.

If i don't misunderstood, you are telling me that I have to customize the
prolog files to "solr txt synonyms syntax"? If that is correct, what is the
point of format:wordnet ?

2017-04-21 12:52 GMT-03:00 alessandro.benedetti <a....@sease.io>:

> Hi Pablo,
> with wordnet format , Solr will just parse synonyms from a different file
> format [1] .
> The rest will work exactly the same.
> You will use a managed resource to load the file and then potentially
> update
> it.
> If you were thinking to use directly the online resource, you may need to
> customize it a bit.
>
> Cheers
>
> [1] http://wordnet.princeton.edu/man/prologdb.5WN.html
>
>
>
> -----
> ---------------
> Alessandro Benedetti
> Search Consultant, R&D Software Engineer, Director
> Sease Ltd. - www.sease.io
> --
> View this message in context: http://lucene.472066.n3.
> nabble.com/How-to-use-Wordnet-in-solr-tp4331273p4331306.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>

Re: How to use Wordnet in solr?

Posted by "alessandro.benedetti" <a....@sease.io>.
Hi Pablo,
with wordnet format , Solr will just parse synonyms from a different file
format [1] .
The rest will work exactly the same.
You will use a managed resource to load the file and then potentially update
it.
If you were thinking to use directly the online resource, you may need to
customize it a bit.

Cheers

[1] http://wordnet.princeton.edu/man/prologdb.5WN.html



-----
---------------
Alessandro Benedetti
Search Consultant, R&D Software Engineer, Director
Sease Ltd. - www.sease.io
--
View this message in context: http://lucene.472066.n3.nabble.com/How-to-use-Wordnet-in-solr-tp4331273p4331306.html
Sent from the Solr - User mailing list archive at Nabble.com.