Hedge Posted July 19, 2008 at 04:03 PM Report Share Posted July 19, 2008 at 04:03 PM Hey, I always wanted something similar to the Kanji statistics function in Anki, but for Hanzi, so I made a plugin. More info here. If anyone has any comments or suggestions, please tell me:) Quote Link to comment Share on other sites More sharing options...
doviende Posted August 4, 2008 at 10:57 AM Report Share Posted August 4, 2008 at 10:57 AM I love the latest version of this plugin (0.5 currently). The ability to not look at "New" cards is perfect for me, since i imported a ton of new cards lately and the count was off. works great Quote Link to comment Share on other sites More sharing options...
HerrPetersen Posted August 4, 2008 at 01:02 PM Report Share Posted August 4, 2008 at 01:02 PM Not much to add... Great tool. One question however: My deck contains of different models. When adding the "MyHanzi"-tag to two different models it seems the hanzistatistics only counts one of the two. Any ideas? Quote Link to comment Share on other sites More sharing options...
doviende Posted August 4, 2008 at 01:14 PM Report Share Posted August 4, 2008 at 01:14 PM you have to add the tag to a specific field within that model, not in the top-level model itself. At least, this was the mistake i made initially. Quote Link to comment Share on other sites More sharing options...
jonlondon Posted October 6, 2009 at 01:05 PM Report Share Posted October 6, 2009 at 01:05 PM Hi Folks, I have just set myself up with Anki, using the Pinyin Toolkit & Hanzi Statistics plugins. It's all working great for the decks I have made for myself, as well as two I downloaded. My question though is, does anyone know if you can get the Hanzi Stats plugin to check for characters seen in multiple decks? Would be very grateful for a bit of help. Jonathan Quote Link to comment Share on other sites More sharing options...
kdavid Posted October 22, 2009 at 02:45 AM Report Share Posted October 22, 2009 at 02:45 AM Anyone having problems downloading this from the site? I'm getting a super-slow download speed for a few minutes and then it times out. I know it's not a local issue because my utorrent is downloading at over 300 kbps. Quote Link to comment Share on other sites More sharing options...
Korakow Posted January 15, 2010 at 05:43 PM Report Share Posted January 15, 2010 at 05:43 PM How is this plugin supposed to work? Although I have a lot of Hanzi in my deck, the plugin says that "This deck contains 0 unique Hanzi." Quote Link to comment Share on other sites More sharing options...
Gymnosopher Posted September 19, 2011 at 06:48 AM Report Share Posted September 19, 2011 at 06:48 AM I initially had the same problem as above (Anki Hanzi Stats showing deck to contain 0 unique) but just managed to fix it. As this doesn't seem to be up anywhere else on the forum hopefully people will now be able to Hanzi Stats for Anki that may have had problems too. Note: as both 'Hanzi Stats (Inofficial )' and 'Hanzi Stats (New HSK 2011)' work in the same way this fix can be done for either/both of them. Basically, the plugin works by searching for Chinese characters in a specific field in your deck which it has set as 'Expression' by default. In order for the plugin to work then you will need to make sure these fields match - by either ensuring your Hanzi field is names 'Expression' or by editing the plugin file itself (actually easier than it might sound and doesn't interfere with how you manage your decks). For me this problem arose as I am using the Pinyin Toolkit and putting my Hanzi in a field called... Hanzi... So perhaps you've done the same or are using a downloaded deck which uses different fields which aren't picked up. Below are step-by-step instructions on doing this - they may seem long but are really easy, I'm just trying to make this idiot proof (for when I forget how to do it ) Method #1 - Edit your deck (recommended if using several decks with differently named fields as the plugin looks for one named field; other plugins may also work with standard field names so changing these could make other non-working plugins work too) 1. Open the Deck you're interested in 2. Go to Settings > Deck Properties ... 3. Select the model that you have used for the Deck (i.e. the one that counts facts - on my current deck this is 'Mandarin [82 facts]' as I use the Pinyin Toolkit though you may have 'Basic [XXX facts]' or something similar) and click Edit 4. Select the card template that you have been using and click Card Layout at the bottom (again, the one that counts facts - so something like 'Recognition [82 facts]') 5. Go to the Fields tab via the top button and click on the field that holds the Hanzi in the deck (in my case this is Hanzi - if you're not sure which one is yours you can go right back to the first deck screen and look in the browser by clicking on the magnifying glass and reading the name of the field on the right of where the characters are) 6. Now change the name of this field in the textbox below to 'Expression' (which will change the name above at the same time) 7. Return to the Card Templates tab via the top button and change the field names in Question/Answer so they match the changes name in the Fields tab (for example, if the field was called 'Hanzi' and was changed to 'Expression' the Card Template would have displayed the field has {{Hanzi}} and need to be changed to {{Expression}}) 8. That's it! Just hit Esc a few times to go back to the main screen. You should be able to view the statistics straight away by going to Tools > Hanzi Statistics - if you already had it open just run it again for it to work. Method #2 - Edit the plugin (recommended if you have a way of naming your deck fields that is already unified across decks and you don't want to change, and also to be able to change other settings such as switching between simplified/traditional and reading from external files etc as outlined in the plugin itself) 1. Open the plugin folder straight from Anki by going to Settings > Plugins > Open Plugin Folder ... 2. Right click the Hanzi Stats .py file and click Open With ... 3. Select Notepad and click OK (other text editors should work too, notepad's just easy and less risky) 4. Scroll down until you see this: #################################################################### # Return all unique Hanzi in the current deck. # #################################################################### def get_deckHanzi(): hanzi_ids = mw.deck.s.column0("select id from fieldModels where name LIKE '%Expression%'") 5. Change '%Expression%' to match the name of the field you put Hanzi in when using Anki Decks (so in my case the field was called Hanzi and I changed this to '%Hanzi%' - if you don't know the name of the field you're using just check in the Anki deck Browser as outlined in method #1 step 5) 6. Save and Exit the file. 7. Close and restart Anki for the modified plugin to be reloaded and you're done! Anyway, this is just something that hasn't worked for me for a while and I finally decided to see if it could work rather than just getting rid of the plugin. Now it works and looks great! If anyone is still working on the Python coding I'd suggests it's probably beneficial to put in an 'or' option so the plugin would work with several field names such as Hanzi, Character, 中文, 汉字, Chinese, 词 etc as the Pinyin Toolkit does so that more people will be able to use it automatically without having to make the above revisions. 2 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and select your username and password later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.