Back

Nazeka - Rikai replacement - also works on Android Firefox

#1
https://addons.mozilla.org/en-US/firefox/addon/nazeka/

https://github.com/wareya/nazeka

https://github.com/wareya/nazeka/blob/ma...utorial.md

[Image: rBUMsh3.png]

I got frustrated at minor issues with rikaichamp and ended up making a rikai clone from scratch over the course of a week.

It works on Android and has a built-in clipboard grabbing page on desktop.

It's still experimental.

Has very rudimentary support for mining now.

Changes:

0.1.7

- Fix mining UI
- Add link to a tutorial
- Update some text

0.1.6

- Fix some positioning-related bugs involving very wide pages and horizontal scrolling.
- Add "Top Auto" positioning corner, but it's not recommended.

0.1.5

Bugfixes, some additional options: configurable padding (i.e. you can move it several pixels down to get it out of the way of text), positioning (i.e. you can set it to come out on the bottom-left instead of the bottom-right of the cursor).

0.1.4

- Support for most text input fields
- Sort more likely definitions to top
- Alternative lookups (must be enabled in options) (so if you mouse over はずだ, it will look up はずだ, はず, and は)
- VERY rudimentary mining support, press m while the popup is active to start
-- Right click the browser action icon and press "View Mined Cards" to open a page that shows what you've mined so far; you can export manually
Edited: 2018-01-25, 7:28 am
Reply
#2
Awesome, thanks -- now I have dictionary lookup back on my Android tablet. I see in the description that you recommend setting the lookup rate to 100 on Android. What does that do? The default seems to work OK, and the options dialog doesn't describe what the setting is for...

Finally, could I make a feature request? Rikaikun (I think it was) has 'move selection left/right one character' icons on the popup box. This is really useful on Android where it's quite easy to fat-finger and select not quite the right character when you first bring up the popup, and being able to just hit 'no, start one character further left' is nicer than dismissing the popup and trying again. Is there any chance you could add those?
Reply
#3
The lookup rate is actually a throttle, I forgot I have the name backwards. 8ms means at most 125 times a second, 100ms means at most 10 times a second.

The "move selection" option is a neat idea, but the way I look up text makes it really hard to keep anything about how the text was looked up around after the lookup window comes up. I don't use virtual selections or anything.
Reply
Breakthrough Sale! Get 28% OFF Basic, Premium or Premium PLUS! (until March 2)
JapanesePod101
#4
So the lookup rate limit is to reduce network usage? (Not sure why you'd do lookups except as requested, so maybe I have the wrong end of the stick.)
Reply
#5
It limits how often some really expensive Javascript code is run. It happens on a timer loop instead of in the event handler for touches/mouse motion because of how Javascript handles asynchronous code, and messages from the tab/window/content script to the background script are asynchronous. I might rework this later... but it was pretty hard to get fast text scrubbing on desktop browsers, so I don't know when I'll touch it.
Reply
#6
OK, so 'push number up if on slow cpu and/or performance is poor'. Thanks for the explanation.
Reply
#7
Yeah. Keep in mind that it increases the delay between lookups in general so "if performance is poor" might not always be the right thing. The default 8ms throttle is so that 1000hz mice don't cause 8x as many lookups as 125hz mice.
Edited: 2017-12-16, 7:05 pm
Reply
#8
Thanks a lot for this addon ! I might rely less on yondle browse from now on thanks to it ! Would it be possible to incorporate a japanese to japanese dictionnary option though ??
Reply
#9
I can do it, but I have no idea when I will. I have a lot of important problems to fix, since I made it in a week.
Reply
#10
0.1.4 is up on the addons page now.

- Support for most text input fields
- Sort more likely definitions to top
- Alternative lookups (must be enabled in options) (so if you mouse over はずだ, it will look up はずだ, はず, and は)
- VERY rudimentary mining support, press m while the popup is active to start
-- Right click the browser action icon and press "View Mined Cards" to open a page that shows what you've mined so far; you can export manually
Edited: 2017-12-19, 2:20 am
Reply
#11
Cool !
*Can't seem to be able to access the mined items though. Nothing appears in the page.
*Also the "looked up ~~" in the popup messes up the definition's layout when it's a small definition.
Good job though, Rikaichamp (which I use, along with Yomichan and its custom dictionnary feature ie jp-jp) is lacking the mining options featured in Rikaichan (much slower) and now (although rudimentary) in your Nazeka ! Please continue !
Reply
#12
(2017-12-19, 7:09 am)Butabanana Wrote: *Can't seem to be able to access the mined items though. Nothing appears in the page.
It only contains things that you clicked on on the mining popup, and it only updates when you reopen it. Aside from that, I have no idea why it'd be broken unless I broke it for new installs only, I guess I'll look for bugs later.
(2017-12-19, 7:09 am)Butabanana Wrote: *Also the "looked up ~~" in the popup messes up the definition's layout when it's a small definition.
You can disable the "looked up ~~" in the options. Aside from that there's no simple CSS to make it not push the reading out of the way if the popup is too small.
Reply
#13
(2017-12-19, 2:29 pm)wareya Wrote:
(2017-12-19, 7:09 am)Butabanana Wrote: *Can't seem to be able to access the mined items though. Nothing appears in the page.
It only contains things that you clicked on on the mining popup, and it only updates when you reopen it. Aside from that, I have no idea why it'd be broken unless I broke it for new installs only, I guess I'll look for bugs later.
(2017-12-19, 7:09 am)Butabanana Wrote: *Also the "looked up ~~" in the popup messes up the definition's layout when it's a small definition.
You can disable the "looked up ~~" in the options. Aside from that there's no simple CSS to make it not push the reading out of the way if the popup is too small.

Oh ok got it ! For the mined items, what is the thinking behind having to click on the popup ?
Besides, I get slightly different definitions than with rikaichamp sometimes, how come ?
I got into the options and I like to be able to change and customize what I want, like the colors and stuff.
Looking into different "Rikai" options I saw that rikaisama used to allow a lot of things before it was discontinued, one of it being examples sentences (taken from tatoeba I think). Would it be a future feature for nazeka ?
Thanks again.
Reply
#14
> Oh ok got it ! For the mined items, what is the thinking behind having to click on the popup ?

This way you get to pick exactly which definition gets mined. Otherwise there's no way to mine はず when you mouse over はずだ, or it would have to mine every definition at the same time.

> Besides, I get slightly different definitions than with rikaichamp sometimes, how come ?

Rikaichamp and nazeka have different deconjugators, so one might miss stuff the other doesn't miss. I'm still finishing the list of deconjugation rules in nazeka so it's going to miss a few word types if they're not in the dictionary form. The flip side is that nazeka's more "correct" type of deconjugator is able to implement really complicated rules without taking up a lot of space/duplication in the program, which should make looking up verbs with long conjugations less confusing for beginners.

> Looking into different "Rikai" options I saw that rikaisama used to allow a lot of things before it was discontinued, one of it being examples sentences (taken from tatoeba I think). Would it be a future feature for nazeka ?

If this happens it definitely won't be from tatoeba. It's a really low priority since example sentence sets are usually really poor quality and take up a lot of space if you store them locally. I have a frequency list ready to be added, though.
Edited: 2017-12-21, 5:44 pm
Reply
#15
Both Rikaisama and now Yomichan have example sentences. I must confess I thought the same thing (don't they take up ridiculous amount of space?) But that isn't how they work in either case (though it wasn't made very clear in Rikaisama).

What actually happens is that they pick up the sentence in which the word is situated and pipe it to Anki (in the field the user chooses). I don't know if something similar would work here.

Sorry for the late reply. I kind of thought someone else would field this one but since they didn't I chipped in.
Reply
#16
Yeah, if you do get around to sentence mining support, I suggest (read: I'd prefer) doing it with the examined text.
In those other addons, sentence boundaries are defined by periods (。) and newlines, with periods taking priority over newlines. All other characters are ignored. In a perfect world, I'd want that to be overridden if the sentence was in any kind of bracket as long as the resulting chunk was within a certain, user defined number of characters, but that seems like too much to ask at the moment.

I'm not sure how your mining system formats its file, but I don't mind making a link to my Firefox profile folder (or whatever it's called) if it means I can access a tab delineated file to import to Anki.
This is what happens when you roll out unfinished 'features' in your public builds, like only supporting WebExtensions... You break everything and no one is happy.

BTW, I'm pretty sure the tag system in Rikaisama that allowed the user to format their output was just fed directly to the append command (whatever that is in JS) as the string to be appended to the file with a newline following it; they all started with a % and required a tab variable between each one

Also, JavaScript is dumb.
Edited: 2017-12-30, 10:37 pm
Reply
#17
> What actually happens is that they pick up the sentence in which the word is situated and pipe it to Anki (in the field the user chooses). I don't know if something similar would work here.

Oh, that makes way more sense. The code won't be pretty but I can definitely do that when I get around to it.

> I'm not sure how your mining system formats its file, but I don't mind making a link to my Firefox profile folder (or whatever it's called) if it means I can access a tab delineated file to import to Anki.

~Stored in an opaque database in localstorage because the webextensions API is really bad~ ~Gotta manually navigate to a special internal webpage and copy paste text out of a text field because the webextensions API is really bad and I'm too lazy to use or make something like what yomichan does~

Also it's just tab-separated fields.
Reply
#18
When I tried reading from http://jgrpg-sakura.shobi-u.ac.jp/ I noticed Nazeka can't read vertical text, while yomichan and rikaichamp can.
Reply
#19
It works, but there's a bug with positioning and writing direction.

[Image: KqmiyQs.png]

I'll fix it soon.

EDIT: I already fixed the writing direction bug.
Edited: 2018-01-23, 12:40 pm
Reply
#20
Fixed, redownload after the new version (0.1.6) is verified or wait for an autoupdate.
Edited: 2018-01-23, 2:19 pm
Reply
#21
(2018-01-23, 2:19 pm)wareya Wrote: Fixed, redownload after the new version (0.1.6) is verified or wait for an autoupdate.

Thanks for the reply and the fast fix !
I just had another problem today, on my phone, with the width of the pop-up that was larger than the width of my phone but I solved it myself by messing with the options, very proud of myself. I love your app and would like to thank you again. I even uninstalled "yondle browse" that I've been using forever.
Reply
#22
Yeah, in earlier versions of nazeka, the right edge of the popup would limit itself to the edge of the window in cases like that (actually some default HTML/CSS behavior), but this caused problems for very wide pages that scroll from left to right.
Edited: 2018-01-25, 7:02 am
Reply
#23
Working on epwing support.

https://twitter.com/Wareya/status/958513985942323200

No ETA, but it's basically going to work similarly to yomichan's epwing support, you'll have to import the dictionary manually. In the future I want deconjugation rules and JMdict updates to be importable as well, but nazeka will always ship with a default set of deconjugation rules and JMdict built in.
Reply
#24
(2018-01-30, 8:37 pm)wareya Wrote: Working on epwing support.

https://twitter.com/Wareya/status/958513985942323200

No ETA, but it's basically going to work similarly to yomichan's epwing support, you'll have to import the dictionary manually. In the future I want deconjugation rules and JMdict updates to be importable as well, but nazeka will always ship with a default set of deconjugation rules and JMdict built in.

Awesome !
Reply