-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
japanese support compatibility #5
Comments
Hi, Your suspiction is correct. The addon does not process reading fields in the form Details
|
unfortunately i don't know how to code in python so my attempts at doing this myself haven't worked, but would it be possible to make an alternate clean function that japanese support users could add manually? i tried duplicating the function and just changing the |
If you're fine with changing the addon's code on your end, here's what should work: Replace the line
with
Hope this helps. :) |
hm, doesn't seem to be working on my end... not sure what the issue would be, any idea? i can try removing and adding japanese support to see if there's an issue with the config somehow |
oh and if it helps, this is the code i was using previously when i was messing about myself.
and then i replaced |
Your code as well as the one I suggested does, given an input If it's by looking at the output for your
You could test the code changes by creating two cards with |
sorry i didn't see the notification for this! i was trying it using 年 since i figured 歳 might be an outlier but neither seemed to work... |
oh! i finally got around to deleting and reinstalling both japanese support and japanese pitch, changed the code, and it's suddenly working? the config on japanese support is the same and nothing about the code is different from before... that's so weird. i'm still interested in any advice on how to fix the さい problem but that's that issue fixed at least |
Glad to hear it worked out. If you know what the correct pitch accent pattern for 歳[さい] is, /edit: @kaoala7577 I just updated the plugin and it now supports editing cards' annotations individually. :) |
Not saying you should use your own add-on differently, but more simple and structural way would be to have an alternative way of writing as a separate field. This would not only allow easier parsing, as it comes to be an issue for kana[furigana] format, but also enable more flexible representation. For example, for homophones, I use kanji form as a hint (not shown initially on a front, but can be shown by user request) for cards with reading-only on the front, and for homographs I use meaning as a hint for kanji-only cards. This is easy to do, since the note has meaning and reading as separate field. And I don't need to do edits for any new card. |
Sure. If I'd start over creating by Japanese vocab deck I'd probably consider strict field contents for the sake of processability. E.g. having fields like /ninja edit: In any case, having special handling of certain card formats of any kind be the default will probably never make everyone happy. Given that the Japanese Support add-on's format can be assumed to be somewhat common, I'd welcome contributions towards some heuristic detection and user prompt as outlined in my first comment. |
One thing worth noting: Japanese Support isn't a plugin. It is built-in into Anki now. Here's some thoughts on how it can be approached:
As for initial inspection of the whole deck, I think it is a good idea, just a few things to note:
So I'd suggest to check whether ANY card in a deck has Japanese Support format and then offer user an option to proceed or cancel. |
Sounds good.
Good to know. I wasn't aware of that. |
Note to self: While developing automated heuristic determination of a note’s format (#35), just matching for the first continuous block of Japanese characters in a field seemed like a reasonable way to identify an expression. This could also be an elegant alternative to the current heuristic cleaning of the expression field. TODO: test on own collection an see if it leads to an improvement or not. |
hi! sorry if this is the wrong place to contact you, i couldn't find an email.
so, im using the japanese support addon (https://ankiweb.net/shared/info/3918629684) and was wondering if you would ever think about making the two compatible?
when japanese support adds furigana to an expression it shows it as kanji[kana] - however i'm not sure your pitch addon can read it, since when 歳[さい] is given as the reading input, it comes out with the pitch accent for とし and not さい.
japanese support is a very helpful addon and many people use it so i'd be reluctant to use another one, but if you know of an addon that generates the furigana reading just in kana instead as a workaround, i'd be willing to switch to using that instead
this isn't urgent or anything since it usually gets the right reading anyway, but wanted to ask the question just in case. thanks!
The text was updated successfully, but these errors were encountered: