You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@lucene.apache.org by amita <am...@persistent.co.in> on 2013/02/07 08:53:49 UTC

Singular to plural

Hi,

I am using Snowball Analyzer with English Stemmer. It stems the plural term
to singular and shows the proper search result however there is problem with
singular to plural.
My requirement is if document title is "guest room", it should be shown in
search result upon searching for "rooms". The terms indexed for my document
title are "guest" and "room". Since "rooms" is not indexed for this
document, it's not being shown currently. 
Is there any way to achieve this?  

Regards,
Amita



--
View this message in context: http://lucene.472066.n3.nabble.com/Singular-to-plural-tp4038931.html
Sent from the Lucene - General mailing list archive at Nabble.com.

RE: Singular to plural

Posted by amita <am...@persistent.co.in>.
Thanks Uwe. This did help and resolved the issue with regular plurals.
However issue still exist for irregular plural like tooth-teeth,Woman-women,
leaf- leaves, knife - knives as English Stemmer  stems them as different
tokens. Is it possible to handle this further? Is there any other analyzer
that supports this? I am using Snowball analyzer with English
stemmer.Regards,Amita



--
View this message in context: http://lucene.472066.n3.nabble.com/Singular-to-plural-tp4038931p4056902.html
Sent from the Lucene - General mailing list archive at Nabble.com.

RE: Singular to plural

Posted by Uwe Schindler <uw...@thetaphi.de>.
You have to do stemming on both indexing and query side! If the query submitted by the user is also stemmed the plurals get singular and a result is found. The important rule for Lucene is: Use the same Analyzer for indexing and query parsing (which is in most cases true, there are some special cases, but not related to stemming).

Uwe

-----
Uwe Schindler
H.-H.-Meier-Allee 63, D-28213 Bremen
http://www.thetaphi.de
eMail: uwe@thetaphi.de

> -----Original Message-----
> From: amita [mailto:amita_bhakkad@persistent.co.in]
> Sent: Thursday, February 07, 2013 8:54 AM
> To: general@lucene.apache.org
> Subject: Singular to plural
> 
> Hi,
> 
> I am using Snowball Analyzer with English Stemmer. It stems the plural term
> to singular and shows the proper search result however there is problem
> with singular to plural.
> My requirement is if document title is "guest room", it should be shown in
> search result upon searching for "rooms". The terms indexed for my
> document title are "guest" and "room". Since "rooms" is not indexed for this
> document, it's not being shown currently.
> Is there any way to achieve this?
> 
> Regards,
> Amita
> 
> 
> 
> --
> View this message in context: http://lucene.472066.n3.nabble.com/Singular-
> to-plural-tp4038931.html
> Sent from the Lucene - General mailing list archive at Nabble.com.