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 Khawaja Shams <ks...@gmail.com> on 2008/12/03 07:16:12 UTC

Indexing Names in Lucene -- Thomas = Tom, etc

Hello,  I am indexing documents with a field that contains the first and
last name of people. It is working wonderfully with a slight issue: if
Thomas is indexed for a document, I would like searches for Tom to match
that document. I am sure this is a common problem that many of you must have
addressed, but I was unable to find anything in the archives or on Google.
Thanks in advance for the guidance.


Regards,
Khawaja Shams

Re: Indexing Names in Lucene -- Thomas = Tom, etc

Posted by Ian Lea <ia...@gmail.com>.
Hi


To get from Thomas to Tom you'll need to use synonyms.  For Thom you
would have been able to use prefixes or wild cards.

If you google for lucene synonyms you'll find loads of stuff.  Also, I
believe that Solr has built in support for synonyms.


--
Ian.


On Wed, Dec 3, 2008 at 6:16 AM, Khawaja Shams <ks...@gmail.com> wrote:
> Hello,  I am indexing documents with a field that contains the first and
> last name of people. It is working wonderfully with a slight issue: if
> Thomas is indexed for a document, I would like searches for Tom to match
> that document. I am sure this is a common problem that many of you must have
> addressed, but I was unable to find anything in the archives or on Google.
> Thanks in advance for the guidance.
>
>
> Regards,
> Khawaja Shams

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Re: Indexing Names in Lucene -- Thomas = Tom, etc

Posted by Grant Ingersoll <gs...@apache.org>.
I believe these lists exists out on the Internet, just google for  
something like "most common first names" or "common  
nicknames" (yields: http://www.cc.kyoto-su.ac.jp/~trobb/nicklist.html  
for instance)

If you want to dig deeper, you might look into named entity  
recognition research, and also co-reference resolution research, as  
those problems often have to deal with this problem.

HTH,
Grant

On Dec 3, 2008, at 5:02 PM, Khawaja Shams wrote:

> Hi,   Yes that is pretty obvious that I would have to index Tom, but  
> I think
> you missed the point. I don't have a list of names with their nick  
> names,
> and this is pretty common: Mike being Michael, Richard being Rich or  
> Dick,
> William could be Bill or Will, etc. I thought I would check if there  
> was a
> canonical way of doing this before building my own list from common  
> sir
> names.  Thanks for your time.
>
>
> Sincerely,
> Khawaja Shams
>
> On Wed, Dec 3, 2008 at 1:42 AM, Ganesh <em...@yahoo.co.in> wrote:
>
>> If you want to query for Tom, then you need to index the value Tom.  
>> Create
>> one more field as Alias or add alias name as part of name field.
>>
>> Regards
>> Ganesh
>>
>> ----- Original Message ----- From: "Khawaja Shams"  
>> <ks...@gmail.com>
>> To: <ja...@lucene.apache.org>
>> Sent: Wednesday, December 03, 2008 11:46 AM
>> Subject: Indexing Names in Lucene -- Thomas = Tom, etc
>>
>>
>>
>> Hello,  I am indexing documents with a field that contains the  
>> first and
>>> last name of people. It is working wonderfully with a slight  
>>> issue: if
>>> Thomas is indexed for a document, I would like searches for Tom to  
>>> match
>>> that document. I am sure this is a common problem that many of you  
>>> must
>>> have
>>> addressed, but I was unable to find anything in the archives or on  
>>> Google.
>>> Thanks in advance for the guidance.
>>>
>>>
>>> Regards,
>>> Khawaja Shams
>>>
>>>
>> Send instant messages to your online friends http://in.messenger.yahoo.com
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>
>>

--------------------------
Grant Ingersoll

Lucene Helpful Hints:
http://wiki.apache.org/lucene-java/BasicsOfPerformance
http://wiki.apache.org/lucene-java/LuceneFAQ











---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Re: Indexing Names in Lucene -- Thomas = Tom, etc

Posted by Khawaja Shams <ks...@gmail.com>.
Hi,   Yes that is pretty obvious that I would have to index Tom, but I think
you missed the point. I don't have a list of names with their nick names,
and this is pretty common: Mike being Michael, Richard being Rich or Dick,
William could be Bill or Will, etc. I thought I would check if there was a
canonical way of doing this before building my own list from common sir
names.  Thanks for your time.


Sincerely,
Khawaja Shams

On Wed, Dec 3, 2008 at 1:42 AM, Ganesh <em...@yahoo.co.in> wrote:

> If you want to query for Tom, then you need to index the value Tom. Create
> one more field as Alias or add alias name as part of name field.
>
> Regards
> Ganesh
>
> ----- Original Message ----- From: "Khawaja Shams" <ks...@gmail.com>
> To: <ja...@lucene.apache.org>
> Sent: Wednesday, December 03, 2008 11:46 AM
> Subject: Indexing Names in Lucene -- Thomas = Tom, etc
>
>
>
>  Hello,  I am indexing documents with a field that contains the first and
>> last name of people. It is working wonderfully with a slight issue: if
>> Thomas is indexed for a document, I would like searches for Tom to match
>> that document. I am sure this is a common problem that many of you must
>> have
>> addressed, but I was unable to find anything in the archives or on Google.
>> Thanks in advance for the guidance.
>>
>>
>> Regards,
>> Khawaja Shams
>>
>>
> Send instant messages to your online friends http://in.messenger.yahoo.com
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>

Re: Indexing Names in Lucene -- Thomas = Tom, etc

Posted by Ganesh <em...@yahoo.co.in>.
If you want to query for Tom, then you need to index the value Tom. Create 
one more field as Alias or add alias name as part of name field.

Regards
Ganesh

----- Original Message ----- 
From: "Khawaja Shams" <ks...@gmail.com>
To: <ja...@lucene.apache.org>
Sent: Wednesday, December 03, 2008 11:46 AM
Subject: Indexing Names in Lucene -- Thomas = Tom, etc


> Hello,  I am indexing documents with a field that contains the first and
> last name of people. It is working wonderfully with a slight issue: if
> Thomas is indexed for a document, I would like searches for Tom to match
> that document. I am sure this is a common problem that many of you must 
> have
> addressed, but I was unable to find anything in the archives or on Google.
> Thanks in advance for the guidance.
>
>
> Regards,
> Khawaja Shams
> 

Send instant messages to your online friends http://in.messenger.yahoo.com 

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org