[Web] Multi-Radical Kanji Search - v1.4: 3052 Kanji searchable, Keyboard shortcuts, etc

On this website of mine you can search Kanji by entering their Wanikani (or RTK) radical names:

image

image


image

image

There are currently ~3052 Kanji searchable by radicals, and i’m continually adding more.

Try it for yourself:
https://sschmidtu.github.io/mr-kanji-search-wtk/

The website is free and open source, hosted on github pages:

Instructions

  • Enter Wanikani radicals, separated by spaces to search. No need to press enter or click Search.

  • If the radical occurs multiple times, add the number to its name.
    image

  • Press the clipboard (:clipboard:) button to copy a Kanji to the clipboard

  • Press the WK button to see the kanji on Wanikani (if it’s not on WK, it will be greyed out)

  • If there are no search results, first check for typos and the exact Wanikani radical name.
    Then try using other or simpler radicals.
    If the radicals were correct, either the kanji is missing info on my end or it doesn’t exist at all in my data (currently ~3050 kanji searchable, i’ll add more).

    You can use traditional methods to find your kanji, like by handwriting (jisho.org), then tell me and i’ll try to fix/add it.
    You can also write me a mail: a link with a mail template will appear on unsuccessful queries.

    Enter the kanji in the search box to see if it’s findable:
    image

  • If you want to use this offline, go to the offline branch or releases page and download it. The offline branch is usually slightly outdated, see the Current State section to see which version it is synced with, or this github issue. Will be updated periodically.

    • To download the branch version, Press Code -> Download ZIP, extract the ZIP file you downloaded to a folder, go to that folder, open the index.html
    • To download the release, click on Assets and download the zip with the version number. The release may be outdated compared to the branch though.

Planned improvements

  • Add more Kanji - feel free to suggest in this thread
  • Integrated Dictionary - if only as an embedded Jisho.org window (can configure search site in settings)
  • Settings window - Change all kinds of settings like number of search results shown, used dictionary page, etc. - Open in a new window, so that the main page isn’t cluttered. (a few checkboxes like RTK mode on main page are fine)
  • Automatically check if a Kanji is on WK, cross WK out if not
    Done
  • Add RTK search mode (so you can use RTK names, like rice field instead of rice paddy)
    Done
  • Replace RTK kanji names with WK kanji names (in WK mode)
    Done
  • Add visual radical selection which filters on the results, like here (visual multiradical search)
  • Improve layout, add dark mode (semi-low priority)
  • Import function for radical/kanji synonyms, so you can use your own synonyms
  • Add most-requested and most useful improvements suggested in this thread

Current State

Version 1.4.0.0 (and up, see footer on website)
3052 Kanji searchable by radicals/elements (see counter at the bottom of the site)

offline version: 1.4.0.0
3052 Kanji searchable
(up to date with kanji info from online 1.4.0.0, general code from latest online version)

Implementation Details

The implementation is based on rtk-search by Học hành / Mạnh Tài, which did the same thing for RTK “radicals” (which are called primitives or elements there):
https://hochanh.github.io/rtk/index.html
It only had element info for the ~2200 RTK1 kanji though. The RTK3 kanji were there but without elements.
Unfortunately the original repository isn’t available anymore because of issues with copyright from the RTK book. I’ve removed the original RTK texts from the book in my version.

Differences between rtk-search and wtk-search (WTK)

  • WTK can translate WK radical names to RTK element names. Sometimes there are two possibilities, e.g. the WK radical “spirit” can be “cloak” or “altar” in RTK, because RTK makes finer differences in what exact shape and strokes the ‘radical’ is. WTK searches for all RTK equivalents. (most are 1:1, but some radicals like spirit have 2 or 3 possibilities)
    To see the replacements, open the browser console. This is what is sent to rtk-search, mostly.
  • WTK adds the WK and clipboard buttons
  • WTK tries to have a more compact layout maximizing the space for search results.
  • WTK is constantly getting more kanji, and features and fixes, rtk-search seems abandoned.
  • The rest (round about) is all rtk-search (original 3030 kanji, 2200 of which with radical/element data, search engine), i.e. code and data written by my predecessor Học hành, which i’m gratefully and humbly adapting and expanding for WK :slight_smile:

Why i do this

First of all, Wanikani itself can search by radical, but you can only enter one radical at a time. Also, Wanikani only has 2055 kanji, this has 3000+.
Try searching for a kanji with the rice paddy radical on WK. Good luck!


I originally proposed this tool here, where i also explain what i want to improve about other multi-radical search tools.

Of course you don’t need kanji search when you’re reading plain text on the PC (e.g. websites), you could just copy the character.
But if you only have a picture or video (e.g. physical books, films or games), and you need to look up a kanji from it, you need to go from visuals alone.
You can also search a kanji by handwriting of course and have it optically detected by whatever software, but even if it weren’t unreliable, it’s still much more effort and annoyance to me than typing.

Personally, i like to watch videos and play video games for practice (i do read as well), and especially in video games, you constantly encounter kanji that you can’t copy by text.
One way around that for games is Textractor, which is great, but it doesn’t support all games, mostly Visual Novels, and definitely not videos. It’s also pretty geeky and complicated to set up.

For me, the fastest way to look up a kanji visually is this website. At least if the kanji is in the data. All you need is to have the WK (or RTK) radicals memorized.
I admit that makes this less useful for WK users on early levels, but you can always use more primitive radicals, e.g. ‘evening cow’ instead of ‘dance’.

Final words

Once again thanks to Học hành for the original RTK version and the code I could base this on.

Tell me in this thread if there’s kanji you can’t find or radicals not recognized, i’ll try to add or fix them. Feedback appreciated!

24 Likes

I can see the usefulness however I had some issues looking up radicals though, particularly higher level where wanikani combines smaller radicals for a super radical to simplify mnemonic stories. So something like ‘guy’ looking for 郎 to get to 廊 didn’t work, it seems to want 良 (good) and 阝 (building) instead. Couple others I tried (penguin, frostbite, satellite, bully, showy) and it didn’t create searches.

4 Likes

edit: fixed!

Thanks for the hints, i’ll fix all of these!
This is an early release of the website, so it will continually get improved.

(maybe your browser will still have the old page cached, unfortunately. try Ctrl+R for hard refresh.)

1 Like

That was fast! I tried a bunch quickly and I couldn’t stump it (except for ‘pyschopath’), otherwise looks great, thank you for sharing! :slightly_smiling_face:

1 Like

Good job! You got something working.

I have possibly a bug report. I got this result. I don’t see any kanji related to rice paddy but there should be some since I asked for it. Is this the expected result?

snashot

Thanks for bringing the rice paddy to our attention. Wanikani puts dashes instead of spaces in their slug data. This throws off the search algorithms. I will adapt my own search filters to take this into account.

2 Likes

Ok, fixed as well. That was a weird error, should have been fixed before ^^
image

1 Like
long explanation This is an unfortunate side effect of radical mismatch between WK and RTK. "rice paddy" in WK can be "rice field", "silage", or "sun" in RTK.

In WTK-search, i replace the WK radical with all possible RTK equivalents:
"ricepaddy": "rice field,silage,sun"

It’s usually not “sun”, but in RTK terms, 更 contains sun, while WK says it’s rice field.
So if i don’t match WK’s sun radical with rice paddy, you couldn’t search for 更 with “ground ricepaddy treasure”, as WK would analyze it.
You can see the transformed RTK query in the console.

I can see if i can reduce the hits for the pure sun radical (without a vertical slash in it for whatever reason).

Maybe i simply add “rice paddy” (“rice field” in RTK) to the kanji where WK says it’s rice paddy, and remove the rice paddy -> sun mapping. (edit: done)

Fixed.
image

When you search for rice paddy now, you only find beautiful rice fields, no grossly incandescent suns.

image

1 Like

You now don’t have to write “ricepaddy” instead of “rice paddy” anymore (though you still can).
(see screenshot above)

It was a simple matter of preprocessing, silly me!
But personally i’ll still save the strokes and keep the separation by space.

edit: working on strict and rtk modes.

1 Like

This!!! I’m really looking forward to using this site as this has been a issue for me playing games in Japanese for years!

Thank you so much for making this site! :bowing_woman:

3 Likes

Dang @Saimin, this is really impressive. Thanks for spending you time on this.

1 Like

Really awesome ! I wil really use this recourse regularly to look up some things I don’t understand ^^ !

1 Like

Version 1.2 Update: 3031 Kanji searchable, all WK radicals fixed

  • Fixed all Wanikani radicals that weren’t recognized (i quickly tested all of them)

  • All ~3029 RTK kanji are now fully annotated and searchable by elements/radicals
    (the predecessor rtk-search had only ~2200 searchable by elements from RTK1, not 3)

  • Fixed many errors in the existing kanji elements/annotations

  • Added the first new non-RTK Kanji (墟, 杳, 睫). More to come - feel free to suggest kanji you tried to find!

  • Strict mode: Only display kanji with at least one exact radical (or keyword) match
    image
    (i may add an even stricter mode where all radicals have to match, though it usually doesn’t change the result, the indexer score takes care of it)

  • RTK mode: Use the RTK element and kanji names
    e.g. big is called large in RTK, leader is person, tsunami is water, etc.
    image
    (strict mode is not yet compatible with RTK mode)

  • Compound mode: Add multiple Kanji from your searches to a compound, so that you can copy a word with multiple kanji (or hiragana) to clipboard, e.g. to look up compound words / vocab with multiple kanji. Compatible with browser extensions like Yomichan and Rikaichamp.
    image
    (you have to search each kanji individually and add them via their copy button)

  • And many more big and small fixes and improvements

Once again, if you had trouble finding a kanji, please tell me the kanji and the search terms you used, and i’ll try to add or fix the kanji in the dataset :slight_smile:
I myself intend to add any new kanji i encounter to the search.

5 Likes

My god this is like everything I’ve ever dreamed of.

3 Likes

wow, that’s nice to hear after all the work i’ve put in :smiley:
I intend to use this as my main kanji lookup tool myself, so it’s only in my interest to improve it, but i’m glad if it can be useful for others as well :slight_smile:

2 Likes

There’s many times where I’ve played a game and of course, recognized all the radicals, but since WK doesn’t teach strokes or anything, it takes eons to find it on Jisho by number of strokes. This is so great.

3 Likes

Yeah, I’ve often had to look up kanji from games as well.
You can of course search a kanji on Jisho by handwriting, that’s what I do when the kanji is not yet in my data. Google’s handwriting recognition is probably even better.
But I find that whole process tiresome, and sometimes the kanji isn’t recognized anyways,
so I’d prefer to search by radicals.

1 Like

Very nice updates, many thanks! Great that RTK is included; I’ve made this a homepage on my phone for those kanji in the wild moments.

1 Like

Version 1.3 Update: Show WK Kanji names, etc.

This is not very useful yet, but at least you can tell (me) whether the kanji is in my data :slight_smile:

The report link (mailto) opens your system default mail client with a template filled in with your search info by default, which you can use or ignore. Also works for normal radical queries.

Feel free to give me (private) feedback and request additions via that mail address.

  • Focus search bar after clicks:
    After you clicked e.g. on an option or copy button, the search bar will get keyboard focus again,
    so you don’t have to first click on copy, then click on the search bar for the next search.

For developers / console hackers:

If you want to have all kanji names capitalized, you could change the CSS:

.btnResultKanjiWK {
  text-transform: capitalize; /* in the official version: lowercase */
}

Use the url parameter ?console=1
This exposes the wtk object to window (the console).

  • To disable console.logs:
wtk.logLevel = wtk.LogLevels.Silent // = 0
wtk.search('myQuery', {
  // options. default values:
  returnResults: true, // return detailed results object with search results
  forceSearch: true, // search even if the query is the same as the last one
  updateHTMLElements: false, // don't update the results list in the HTML
}

I hope to make wtksearch a module, fully independent from the webpage/HTML, but first things first.

2 Likes

Small Update 1.3.3:

  • All WK Kanji names are now searchable
    image
    Many Kanji have different names/keywords in RTK, so the WK ones weren’t found before I added them.
    (for results the WK names were shown since 1.3, but the search index didn’t know about them)
    image

Fun fact: With RTK, all kanji and element (radical) names are unique, which can be useful. I still usually prefer the WK ones though, RTK’s often sound antiquated and/or misleading.

  • All 2055 WK Kanji are in wtk-search now
    There are 3 Kanji on WK that are not in the set of ~3030 from RTK1 and 3: 墟, 贅 and 漣.
    How do I know? Because you can now put 2055 (or more) kanji or a whole text into the search and it will tell you which it can and cannot find.
    (with the console, you can show only the missing ones)

  • search bar automatically gets (keyboard) focus back after clicks

  • Aozora most common 1000 kanji included.
    Missing for the most common 2000: 68 - will be added soon
    Aozora is a much-used collection of free japanese (e-)books.

  • ’Easter Egg’: Show latest added kanji - see the footer. Try clicking the kanji! :slight_smile:
    image

  • 1.3.4.0: File sizes optimized: download size reduced by ~200KB (resource size) to ~244KB transferred total (910KB resources size)
    Also, fixes for searches like tree2 etc - see below.
    Offline branch/release synced with online 1.3.4.0 (updated kanji data)

2 Likes

Thank you so much for this! I’ve bookmarked it and it will definitely be my go-to for playing games. I don’t even want to know how much time I’ve wasted knowing the WaniKani radical but still having to hunt it down in the Jisho list.

1 Like