[Userscript] Open Framework JLPT, Joyo, and Frequency filters

Thanks for these scripts, @Kumirei. :slight_smile:
It is fine with me if you are actually a code writing bot that will soon put all of the human programmers on Earth out of business and also hasten the robot Apocalypse. I like you anyways.
To think that it all started with innocent little level flairs.

2 Likes

I have found a pair of bugs in this script.

In the include_jlpt_data filter there is this statement:

var level = data[item.data.characters].jlpt_level;

There is no data for some kanji. This throws a can't read property jlpt_level of undefined error. A try/catch statement in wkof.itemData catches it and filters out the item without reporting the error to the console. This is annoying because we don’t want items being filtered out.

The same issue occurs in include_joyo_data. Frequency is OK.

1 Like

Will fix when I get the time 230185602321088514

1 Like

I have posted the changes to this script I mentioned on github.

I also posted on github Visually Similar again. There is no change from the previous version. It is just that I was under the impression my original posting was lost. I could be me misunderstanding how github works, so please ignore it it it turns out to be a duplicate.

1 Like

I am incredibly busy right now, but I will get to reviewing both scripts sometime next week

1 Like

Take the time you need, there is no hurry.

1 Like

That was in October. When will you review both scripts? There is no hurry. You may take the time you need.

For your information I have not included these script in the optional filters list of Item Inspector because I await for this review to do so. Some filters are buggy and the filter value data type of some filters will change as a consequence of the new UI. This is why I keep the filters off the optional filter list.

1 Like

Sorry, I just got busier and busier with school. Turns out that taking 50% extra classes while also working 25% leaves you with a lot less spare time! I just had an exam yesterday, and only have a thing to hand in on Sunday, then I will start getting back to normal. I don’t plan on doing any schoolwork today, though, so I might just have a look at it today

1 Like

Merged!

1 Like

Thanks for the merge.

I will check how it works on my end and add the filters to the next version of Item inspector. I expect it will take about two weeks due to other work that must go in this version.

Good luck with your school and work.

1 Like

I want your opinion on something.

The JLPT level with vocab filter runs into a problem. It calculates the highest JLPT level (the lowest number) and filters on that basis. @NicoleIsEnough points out this is not how it should be done. In the JLPT exams they go by usefulness of the vocab to a given JLPT level and this is disconnected from kanji. The exams use hiragana. She pointed to Jonathan Waller web site to get the actual data. I want to know how we should proceed about this.

Option 1: Throw the current filter away and write one that uses the J. Waller’s data.

Option 2: Keep the current filter because it indicates which vocab kanji are covered by attaining knowledge of the kanji of a given JLPT level. A new different filter would use J. Waller’s data.

I am hesitant between the two. What do you think?

Edit: Now I think have two filters will confuse many people. They will wonder which one to use. We should only have the J. Waller data filter.

1 Like

What do you think the users’ expectation will be when they use the filter? That they will get words relevant to the JLPT level? → Then use the J. Waller data for the filtering.
Or that they will get words containing kanji relevant to that JLPT level (although the actual words may not appear in that level at all)? → Then stick with your current filter.

2 Likes

I think this is not an either or situation. There will be people with both expectations. But there is a question of getting the users to understand what the filter will do.

My guess is more people will want to prepare for JLPT so the J Waller filter seems more relevant to me.

Edit: Perhaps the confusion aspect may be addressed through communication, like a better hover tip. i am still hesitating.

2 Likes

How about two filters with names something like this?

JLPT (by kanji)
JLPT (by vocab)
1 Like

This may lead people to believe one filter returns only kanji items and the other only vocab items. How about

JLPT (with kanji in voc.)
JLPT (by vocab)

The first one is a bit longish I fear. Perhaps we need to place these details in the hover tip.

I also need to think about how to make this distinction clear in an Item Inspector popup.

1 Like

Maybe indicating that it’s kanji level would do? JLPT (by kanji lvl)

1 Like

To increase the confusion, keep in mind that there is also a filter just for kanji, no vocab.

If we use abbreviations maybe JLPT (voc by kan lvl) and JLPT (voc by voc lvl)

1 Like

Difficult choice

1 Like

I ran a sizing test on the last proposal. There is still room for more characters. We can flesh out the details with hover tips.

test

Maybe this because the filters also return kanji on top of vocab.

test1

1 Like

Might make more sense to indicate which type it is outside the parenthesis

JLPT Kanji
JLPT Vocab (by kanji lvl)
JLPT Vocab (by vocab lvl)

Or perhaps just a clarification on the vocab by kanji filter

JLPT Kanji
JLPT Vocab 
JLPT Vocab (by kanji level)
1 Like