Title Back Colour Keyoti Title Line Title Curve
Blue Box Top

Handling British spelling word variations - SearchUnit - Forum

Welcome Guest Search | Active Topics | Log In | Register

Options
DMacy
#1 Posted : Thursday, August 10, 2017 9:24:57 PM
Rank: Advanced Member

Groups: Registered

Joined: 9/1/2010
Posts: 133
I have added some test code to the action GetWordVariations to see how to handle British spelling word variations, such as labour for labor.

Code:

If WordStr.ToLower = "labor" Then WordVariationArray.Insert(0, "labour")
If WordStr.ToLower = "labour" Then WordVariationArray.Insert(0, "labor")


However, when I search for one spelling, I get a different number of search results than when I search for the other spelling.

What is the best way to handle this type of variation?

Thanks!

Dan
Jim
#2 Posted : Friday, August 11, 2017 10:20:55 PM
Rank: Advanced Member

Groups: Administrators, Registered

Joined: 8/13/2004
Posts: 2,667
Location: Canada
It could be that there are other forms of the word being matched. So if you have

Labours
Laboured
Labouring

in the text, but the user searches for labor and you add the substitute for 'labour', then it's not going to match the other variations, so you just need to add those to your code too.

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


DMacy
#3 Posted : Friday, August 11, 2017 10:36:39 PM
Rank: Advanced Member

Groups: Registered

Joined: 9/1/2010
Posts: 133
Thanks, Jim!

Is there a way to handle this sort of situation with an alternate dictionary? I've never done anything with dictionaries and SearchUnit.

Best regards,
Dan
Jim
#4 Posted : Saturday, August 12, 2017 4:38:06 AM
Rank: Advanced Member

Groups: Administrators, Registered

Joined: 8/13/2004
Posts: 2,667
Location: Canada
Yes for other languages, see https://keyoti.com/produ...rGuide/Multilingual.htm but there is no distinction between UK and US English. So if the user searches "labor" it will find "labored" (etc) but if the user searches "labour" it will find "laboured" (etc). It's never come up before but I can see why finding either UK or US variations is useful. I'll put that down for future improvement.

In case you're wondering, with your code, like I said in my previous post it won't automatically find "laboured" if the user searches "labor" because your variation is not used to generate other lemmas (variations).

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


DMacy
#5 Posted : Monday, August 14, 2017 4:27:13 PM
Rank: Advanced Member

Groups: Registered

Joined: 9/1/2010
Posts: 133
Being able to use two dictionaries concurrently would be a useful enhancement for our situation.

Yes, I understand what you said about needing to manually specify all the possible forms of a word when defining its variations.

Best regards,
Dan
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.