Fuzzy search not automatic?

4 views
Skip to first unread message

Cori26

unread,
Apr 5, 2009, 11:15:44 PM4/5/09
to Glossword Users
Hi All,

Love this project, looking at using it, but have one problem:

I am using it for a japanese dictionary, and say there is the word: かしめ
リング in the database, if you search for かし you get 0 results (??). If
you search for か it does show up in the results, and if you search for
かしめ it does NOT show up (though a couple of terms do show up).
However, if you search かしめ* it does show up, or if you other
wildcards. It obviously should show up in all of those.

I know you probably can't read these, but just from looking you can
see that there is no fuzzy search without using wildcards. I am just
trying to figure out why this might be. The dictionary is in UTF-8.
If I can fix this so that it is searching it properly, this will
defintiely be a go. But if not, I don't know. My users might not be
used to always using wildcards.

Thanks let me know. I know a little bit about php so even if I have
to change something in the code, I am game, if you can give me some
pointers.

Cori26

unread,
Apr 6, 2009, 9:37:37 AM4/6/09
to Glossword Users
Basically, what I am looking to do is to at "*" to every search,
though preferably in the backend so no one can see it. This would be
similar in english if you looked up "cat" and "catfish" did not show
up. Or maybe more like you looked up "dump" and "dump truck" did not
show up. Anyway, if there is not an answer to my main question, if
there is a way to make it so every search could have a * at the end,
in the backend when it searches, that would be great.

Cori26

unread,
Apr 6, 2009, 9:47:52 AM4/6/09
to Glossword Users
Ah, but I see that just adding "*" to the end of all search queries
would be problematic, since if a user did do an English query, a
search for the* would not just bring up descriptions or words with
"the" in it, but also "thermal dynamics" etc. Is there a way I could
change the script so it added "*" to only japanese queries? I know,
probably impossible, but any suggestions?

akagawa

unread,
Apr 9, 2009, 11:34:19 AM4/9/09
to Glossword Users
Cori-san is right. No working in Japanese search. But astrict on
front of search AND end of search for Asian only search is working.
Cori-san says Glossword team is sending him fix, but I think I can fix
and will upload file later.

Dmity-Sh

unread,
Apr 9, 2009, 1:10:11 PM4/9/09
to Glossword Users
I have the solution. However, implementation is delayed for unknown
time.
Cori's bosses reply: "we decide we want to use something that was
offline".

Cori26

unread,
Apr 13, 2009, 12:29:40 PM4/13/09
to Glossword Users
Yeah, they want to use something that can be used offline. I tried
explaining about WAMP, but they want something like the program PDICT-
Unicode. So I guess either we have to wait and see if akagawa
releases his fix or something else.

Goodluck guys

akagawa

unread,
Apr 15, 2009, 10:41:32 AM4/15/09
to Glossword Users
I upload my edited file for Asian Japanese language search. It will
enable user to search for terms as Cori asks. Unzip it and place in
the inc folder.

akagawa

Dmity-Sh

unread,
Apr 15, 2009, 11:24:17 AM4/15/09
to Glossword Users
By the way, it's possible to replace

$v = '%'.$v.'%';

with

$v = $v.'%'

to make the search work as `かしめ*` instead of `*かしめ*`.

akagawa

unread,
Apr 15, 2009, 12:15:59 PM4/15/09
to Glossword Users
He is right. I did this way so when searching for 走査 you can find 行走査
as well as 走査装置, which do not work with $v = $v.'%'


Reply all
Reply to author
Forward
0 new messages