Title Back Colour Keyoti Title Line Title Curve
Blue Box Top

Defining multiple spellings for names - SearchUnit - Forum

Welcome Guest Search | Active Topics | Log In | Register

Options
DMacy
#1 Posted : Monday, December 29, 2014 8:07:40 PM
Rank: Advanced Member

Groups: Registered

Joined: 9/1/2010
Posts: 136
Is it possible to define alternate spellings for words, such as names, when the index is created? For example, we have an author whose last name is "Bellett." It is common for people to misspell it as "Bellet." Is there a way to indicate this to the index so they are treated as the same word?

Thanks!
Jim
#2 Posted : Tuesday, December 30, 2014 1:44:04 PM
Rank: Advanced Member

Groups: Administrators, Registered

Joined: 8/13/2004
Posts: 2,669
Location: Canada
Yes, what you do is at search time provide Bellett as a lemma for Bellet. Please see Customization here http://keyoti.com/produc...ming%20And%20Lemmas.htm

Code:

protected void Page_Load(object sender, EventArgs e)

{

    Sr1.Configuration.CentralEventDispatcher.Action += new Keyoti.SearchEngine.Events.ActionEventHandler(CentralEventDispatcher_Action);

}


void CentralEventDispatcher_Action(object sender, Keyoti.SearchEngine.Events.ActionEventArgs e)

{

    if (e.ActionData.Name == Keyoti.SearchEngine.Events.ActionName.GetWordVariations)

    {

        Keyoti.SearchEngine.DataAccess.Word theWord = ((object[])e.ActionData.Data)[0] as Keyoti.SearchEngine.DataAccess.Word;

        ArrayList variations = (e.ActionData.Data as object[])[1] as ArrayList;

        if (theWord.WordContent.ToLower() == "bellet")

        {



            variations.Insert(0, "Bellett");//insert a word we also want to search for

        }

    }

}




-your feedback is helpful to other users, thank you!

-your feedback is helpful to other users, thank you!


DMacy
#3 Posted : Tuesday, December 30, 2014 5:34:39 PM
Rank: Advanced Member

Groups: Registered

Joined: 9/1/2010
Posts: 136
Looks like just what I need. Thanks!
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.




About | Contact | Site Map | Privacy Policy

Copyright © 2002- Keyoti Inc.