Back

yomichan: a tool for reading books with Anki vocab deck integration

That's a very good theory, can you help me test it?

Grab __init__.py from http://ftp.foosoft.net/releases/yomichan and put it in your Yomichan yomi_base/japanese directory, overriding the file that's there and let me know if that fixes it.
Reply
Of course. I tried replacing the file with the one you said, and the problem changed. There is still a problem though.

Traceback (most recent call last):
File "C:\cygwin\home\dae\win\build\pyi.win32\anki\outPYZ1.pyz/aqt.addons", line 39, in loadAddons
File "c:\pyi\iu.py", line 436, in importHook
File "c:\pyi\iu.py", line 521, in doimport
File "C:\Users\psn t�mrer\Documents\Anki\addons\yomichan.py", line 94, in <module>
instance = YomichanPlugin()
File "C:\Users\psn t�mrer\Documents\Anki\addons\yomichan.py", line 36, in __init__
Yomichan.__init__(self)
File "C:\Users\psn t�mrer\Documents\Anki\addons\yomichan.py", line 29, in __init__
self.language = japanese.initLanguage()
File "C:\Users\psn t�mrer\Documents\Anki\addons\yomi_base\japanese\__init__.py", line 28, in initLanguage
deinflect.Deinflector(os.path.join(directory, u'deinflect.json')),
File "C:\cygwin\home\dae\win\build\pyi.win32\anki\outPYZ1.pyz/ntpath", line 108, in join
UnicodeDecodeError: 'ascii' codec can't decode byte 0xf8 in position 14: ordinal not in range(128)

At the least i think it's quite a precise error-message this time. It would be great if you could make out any sense from it and solve the problem.
Reply
Has anyone used Yomichan with an Android tablet? Is that possible?
Reply
May 16 - 30 : Pretty Big Deal: Save 31% on all Premium Subscriptions! - Sign up here
JapanesePod101
Okay. What about a Windows tablet? Wink
Reply
It should work on a surface pro, but as is it will not work on an android tablet. If someone wants to try, http://code.google.com/p/android-python27/ looks promising.
Reply
Wow I want to learn programming just to attempt that, but I have 0 experience.

Is the Surface Pro different than other Windows tablets?
Reply
Yomichan needs the full desktop version of Anki to work. The mobile versions don't have the extensions that this tool uses. You would have to completely re-write it. I use yomichan on a windows tablet all the time (right now a Dell Venue Pro 8" tablet). I had to make a slight change in the code so that the program would do a definition look-up on a mouse press instead of just on hovering to make it work really well though with a finger instead of a mouse. I would like a "tablet mode" toggle to be added in the future to make it a bit more tablet friendly. Like making the icons bigger, etc..
Reply
Is there a shortcut to auto-create the card or must one mouse-click the green circle? Thanks.

(I'm sure this is written somewhere but I couldn't find it).
Reply
Hi, I'm trying to use Yomichan to get started on reading Harry Potter. I got the ebook from the pottermore site, converted it to .txt format using Calibre, but I'm having a problem with the furigana. I'd like to remove them or at least find a way to differentiate them from the words they represent but they come out all mixed up. For example, instead of getting 夫妻[ふさい], I get 夫ふ妻さい. Each kanji has its furigana directly after it, which confuses Yomichan (and me too honestly). Someone please help me fix this!
Reply
girlsargeeks2 Wrote:Hi, I'm trying to use Yomichan to get started on reading Harry Potter. I got the ebook from the pottermore site, converted it to .txt format using Calibre, but I'm having a problem with the furigana. I'd like to remove them or at least find a way to differentiate them from the words they represent but they come out all mixed up. For example, instead of getting 夫妻[ふさい], I get 夫ふ妻さい. Each kanji has its furigana directly after it, which confuses Yomichan (and me too honestly). Someone please help me fix this!
You can use a text editor that supports find and replace with regular expressions to remove the furigana and brackets. I'm a little fuzzy on regex but I think something like this would do it:

/[.*? t/], ''

Make a back up copy before you try it just in case.
Reply
JunePin Wrote:
girlsargeeks2 Wrote:Hi, I'm trying to use Yomichan to get started on reading Harry Potter. I got the ebook from the pottermore site, converted it to .txt format using Calibre, but I'm having a problem with the furigana. I'd like to remove them or at least find a way to differentiate them from the words they represent but they come out all mixed up. For example, instead of getting 夫妻[ふさい], I get 夫ふ妻さい. Each kanji has its furigana directly after it, which confuses Yomichan (and me too honestly). Someone please help me fix this!
You can use a text editor that supports find and replace with regular expressions to remove the furigana and brackets. I'm a little fuzzy on regex but I think something like this would do it:

/[.*? t/], ''

Make a back up copy before you try it just in case.
Thanks! Unfortunately I know nothing about regex. Calibre has a search and replace feature, but it seems the line you suggested I use isn't finding anything to be replaced.

*EDIT*: I did, however, just find the correct string to use to find all the furigana in a text, here it is for anyone who might need it: /<rb>([^<]*)<\/rb>|<rp>[^<]*<\/rp>|<rt>[^<]*<\/rt>|<\/?ruby>/g, "$1"
Edited: 2013-12-26, 4:21 pm
Reply
When I did this a while back on a text file, I remember it being something really simple like that which did the trick. I'm sorry it didn't help, but glad you figured it out!
Reply
I'm glad you guys figured it out. I actually have a feature in Yomichan (look under options) to strip out readings, but it assumes that they are enclosed within《 》tags like they are in most books. Looks like I need to make this feature more generic though...
Reply
tashippy Wrote:Is there a shortcut to auto-create the card or must one mouse-click the green circle? Thanks.

(I'm sure this is written somewhere but I couldn't find it).
There are no shortcuts for adding facts at the moment, so you gotta click on the green things. This has been mentioned before, so I'll see about adding it in the near future (I'm on vacation till the new year).
Reply
PotbellyPig Wrote:Yomichan needs the full desktop version of Anki to work. The mobile versions don't have the extensions that this tool uses. You would have to completely re-write it. I use yomichan on a windows tablet all the time (right now a Dell Venue Pro 8" tablet). I had to make a slight change in the code so that the program would do a definition look-up on a mouse press instead of just on hovering to make it work really well though with a finger instead of a mouse. I would like a "tablet mode" toggle to be added in the future to make it a bit more tablet friendly. Like making the icons bigger, etc..
Yomichan actually looks for middle mouse button being held down (or shift on hover) to determine what you are looking at. Was the middle mouse button the problem here? I'd like to see exactly what you modified if you can share Smile
Reply
tashippy Wrote:Has anyone used Yomichan with an Android tablet? Is that possible?
Android is a completely different environment, running a completely different version of Anki with no PyQt support as far as I know. Everything would have to be redone from scratch.
Edited: 2013-12-26, 9:42 pm
Reply
Thank you for the replies FooSoft! Happy New Year. And now to disable the world's internet connection so's I can get to Yomichanning
Reply
I just pushed a new version to AnkiWeb that has better keyboard support. I want to properly document the new shortcuts, so I'm not triggering the update nag in Yomichan, but you guys can check out by re-downloading the plugin.

Ctrl + [1234567890] => Add term at N as expression
Alt + [1234567890] => Add term at N as kana

Shift + Ctrl + [1234567890] => Add kanji at N
Reply
Thanks FooSoft, that's great.

I have a non-technical question, so I'll move it to another thread if it's more relevant elsewhere:
I've been reading Snow Country and it's my first time really trying Yomichan. I've read the first half of the book in English, and I'm only a few pages in with the native text.
My issue is that with all the convoluted, long sentences, descriptive metaphor-laden prose, and snow-specific terminology, I'm finding that I tag so many words and it feels somewhat daunting when I open up Anki ready to read but I have to get through reviews that take a while because I try to read the example sentences and internalize the sometimes obscure vocabulary.
So I'm wondering about other users' pace in using Yomichan (or LTR, et. al.) in terms of how you get through material, how thorough you are, what a reading/review session looks like for you, etc. Any advice is helpful. I'm on break from school now so I want to have a good pace going when it starts again so I won't let it fall to the wayside and can keep on Yomichan-ing.
Also, if anyone simply thinks I should try an easier book, and has recommendations for books in the 5000 files, I wasn't familiar with most of the material in that canon of liberty, so I just picked a classic. Too bad there aren't any Murakami books in there, I haven't of his non-translation stuff in Japanese.
Thanks.
Reply
@tashippy

I happen to have an electronic version of かえるくん、東京を救う from 神の子どもたちはみな踊る.

In my opinion it’s a relatively easy text of a medium size with a bit of witty humour. As a matter of showing you the level of difficulty you are likely to experience, here are lines from the first paragraph:
片桐がアパートの部屋に戻ると、巨大な蛙が待っていた。二本の後ろ脚で立ちあがった背丈は2メートル以上ある。体格もいい。身長1メートル60センチしかないやせっぽちの片桐は、その堂々とした外観に圧倒されてしまった。

On top of that, buonaparte has audio of the radio show for that story:
http://users.bestweb.net/~siom/martian_m...raHar2x.7z

The text has been OCRed so it’s quite likely that it has couple of errors/misspellings.

Send me a PM if interested.
Reply
Great tool, but whenever I try to use it, it creates two cards per word. This isn't really a problem as I could just suspend the duplicates, but it's kind of annoying. Any solutions?
Reply
I've never seen that problem, and it obviously doesn't happen for any of my decks. If you can PM you your deck, I can try and see what the issue there is.
Reply
FooSoft Wrote:I've never seen that problem, and it obviously doesn't happen for any of my decks. If you can PM you your deck, I can try and see what the issue there is.
Sorry, I'm an idiot. The card format I was using automatically made two >_<
Reply
Hah, I didn't even know that was possible. Glad you figured it out though Smile
Reply
Creating a new user, without any special charecters this time, seems to have solved the problem with Yomichan. Which probebly means that i was right in my hypothesis. In any case, back to the sentence mining!

PS. I do not know if your are aware of it, but if you trie to open text documents enypted in unicode, you're only able to watch a certain portion of it. The rest is, well, hidden. You will need to save it en ASCI format, intrestingly enough. What causes this i do not know. It is easy to work around by saving it normaly, but i dont think it is intended.
Edited: 2014-01-06, 2:35 pm
Reply