himselfv / wakan

Japanese and Chinese learning tool with dictionary
38 stars 7 forks source link

Search for "stork" also brings up kana results for "と", "とし" etc #282

Open himselfv opened 9 years ago

himselfv commented 9 years ago

Original report by me.

Originally reported on Google Code with ID 282

Wakan search tries to be helpful by searching both as english word and romaji. But in
some cases the assumptions are too far from being reasonable.

For instance if you search for "stork", Wakan tries to interpret "stork" as kana. Only
"to" matches, so Wakan displays results for "と" and then other words beginning with
"と" as kana.

Possible solutions:
1. Do not search as kana if anything in the word failed to match (except maybe a bunch
of allowed characters: space, punctuation, digits).
2. Search for the converted sequence where unconverted parts are left as is: sとrk.
(Except, again, for maybe stripping spaces and punctuation)

Both protect from excessive matches, neither would produce any invalid results for
"stork".

I think I'll do 2 when I get to it, as it costs little to try and there might be cases
when romaji contains inconversible parts what are to be left alone. (Although I can't
think of an example right now)

Reported by himselfv on 2015-07-25 12:24:49

WaiYanMyintMo commented 3 years ago

I like your possible solutions you present in your issues.

Solution 2 is good too but I think its over-engineering. I recommend solution 1 as its simpler and easier. I'll get to learning Pascal.