Back

Mighty Morphin Morphology

Thanks for the prompt reply.
I tried what you suggested - removed the folder and the py file as instructed, did a new install - but I STILL get the same @$#$% error message - so the info must be stored someplace else. The anki file the message complains about has been renamed to something very different, but the plug-in just can't seem to forget... .
What can I try now?
Thank you!
Reply
I finally found the problem with the error message - the plug-in was finding old files in a directory I don't really use any more... .
So, I'm no longer getting the error message.
But I still don't get the option to "set iPlusN" - the options that show up, after I have selected cards in the browser and click on Actions-It's Morphin Time are: Export Morphemes, View Morphemes, Mass Tagging, Morph Match... .

Oh dear, what can the matter be?... .

Thank you
Reply
MonjaIsshin Wrote:I finally found the problem with the error message - the plug-in was finding old files in a directory I don't really use any more... .
So, I'm no longer getting the error message.
But I still don't get the option to "set iPlusN" - the options that show up, after I have selected cards in the browser and click on Actions-It's Morphin Time are: Export Morphemes, View Morphemes, Mass Tagging, Morph Match... .

Oh dear, what can the matter be?... .

Thank you
If you have the right fields available, morph man 2 should automatically add i+n info if you don't have the deck open and wait for the auto process to finish.
Edited: 2012-09-14, 6:53 pm
Reply
May 16 - 30 : Pretty Big Deal: Save 31% on all Premium Subscriptions! - Sign up here
JapanesePod101
Morph Man 3.0 has been released for Anki 2.0 (code: 1248316808)

Wiki docs: http://rtkwiki.koohii.com/wiki/Morph_Man

Core features such as analyzing your collection to sort new cards by difficulty, generating adaptive subtitles, an extracting morphemes for selections of cards are working, but a number of old side features (such as Mass Tagger and Matched Morpheme) remain unimplemented. There are also a handful of note worthy changes to how the system works:

-- Invoking
Instead of running automatically in the background when a deck isn't open, you manually invoke MorphMan's recalculation via the menu (or Ctrl+M). For a 9000 note collection this takes my desktop about 4 seconds and my netbook with a crippled drive around 26 seconds the first time you do it after starting Anki. Successive recalculations are faster as Morph Man caches aggressively, cutting my times to around 3 seconds (desktop) and 5 seconds (netbook).

-- Configuration
By default your entire collection is analyzed over the 'Expression' field but you can modify config.py to customize this (you can change settings for a particular model/profile as well as the defaults- deck overrides are unimplemented right now and I'm not sure how useful they are anyway). See the wiki for help.

-- Modifying Notes
Morph Man 3 doesn't require any particular fields on your notes, it merely modifies the 'Due' number of new cards (which Anki uses to determine ordering) by setting it to the Morph Man Index (learning difficulty). However, if your cards have certain fields, Morph Man will set them with various information like k+N (MM3 uses the terminology k+N and m+N instead of i+N to disambiguate known vs mature knowledge), unknowns, focusMorph, etc. The names of these fields are configurable.

-- Usage tips
If you utilize Anki 2's deck hierarchy feature you can study with optimal order from all your shows at once or just a certain show very easily since the Morph Man Index creates a universal ordering for the cards' Due columns.


-- Known issues
* Interval dbs, including known.db and mature.db are not generated right now. To be fixed next release
* To optimize speed of successive calculations, MorphMan caches data aggressively which increases memory usage (~35 MB for a 9000 note collection). In the future there will be a config option to turn this off.
* Deck overrides for config don't work
* No GUI for editing configuration (I like the file approach of config.py better but someone is welcome to write a gui or request one if they really need it)

Since this is the initial release of a new rewrite, don't hesitate to send in bug reports or ask for new features.
Reply
Trying out Morph Man 3. Doesn't seem to have any problems creating the all.db. But afterwards it spits out this error.
Quote:Traceback (most recent call last):
File "C:\Users\Excel\Documents\Anki\addons\morphman.py", line 6, in onMorphManRecalc
morph.main.main()
File "C:\Users\Excel\Documents\Anki\addons\morph\main.py", line 197, in main
updateNotes( allDb )
File "C:\Users\Excel\Documents\Anki\addons\morph\main.py", line 164, in updateNotes
TAG.register( tagNames )
UnboundLocalError: local variable 'tagNames' referenced before assignment
Any thoughts?
Reply
Daichi Wrote:Trying out Morph Man 3. Doesn't seem to have any problems creating the all.db. But afterwards it spits out this error.
Quote:Traceback (most recent call last):
File "C:\Users\Excel\Documents\Anki\addons\morphman.py", line 6, in onMorphManRecalc
morph.main.main()
File "C:\Users\Excel\Documents\Anki\addons\morph\main.py", line 197, in main
updateNotes( allDb )
File "C:\Users\Excel\Documents\Anki\addons\morph\main.py", line 164, in updateNotes
TAG.register( tagNames )
UnboundLocalError: local variable 'tagNames' referenced before assignment
Any thoughts?
It seems there's a bug where if no notes are processed. This can only happen if there's no notes in your collection or everything is disabled, afaik.

Can you try checking that?
Reply
overture2112 Wrote:It seems there's a bug where if no notes are processed. This can only happen if there's no notes in your collection or everything is disabled, afaik.

Can you try checking that?
Well, I was trying to isolate morph man to two of my specific deck models, not sure if I typed it into the config properly. (Only two of my decks are sentence decks to begin with.)
Quote:default['enabled'] = False
model_overrides['Japanese'] = { 'enabled':True }
Without this restriction on I get this error.
Quote:Traceback (most recent call last):
File "...\Anki\addons\morphman.py", line 6, in onMorphManRecalc
morph.main.main()
File "...\Anki\addons\morph\main.py", line 188, in main
allDb = mkAllDb( cur )
File "...\Anki\addons\morph\main.py", line 49, in mkAllDb
fieldValue = getMecabField( fieldName, flds, mid )
File "...\Anki\addons\morph\main.py", line 23, in getMecabField
return stripHTML( splitFields( flds )[ idx ] )
TypeError: list indices must be integers, not NoneType
Anyway, thought I might as well take some time for additional testing. I created a new profile and imported both of my sentence decks. And it seems to work. After adding a default basic model card it spits out the error just above. Maybe you should just ignore card models that don't contain a "morph_field". Not sure why the model_override isn't working for me. Maybe I'm just using the wrong name.
Reply
overture2112 Wrote:
MonjaIsshin Wrote:I finally found the problem with the error message - the plug-in was finding old files in a directory I don't really use any more... .
So, I'm no longer getting the error message.
But I still don't get the option to "set iPlusN" - the options that show up, after I have selected cards in the browser and click on Actions-It's Morphin Time are: Export Morphemes, View Morphemes, Mass Tagging, Morph Match... .

Oh dear, what can the matter be?... .

Thank you
If you have the right fields available, morph man 2 should automatically add i+n info if you don't have the deck open and wait for the auto process to finish.
Hi, Overture2112,
I only just now found time to try to work on this again - sorry about the delay.
There seems to be something that I simply don't understand here... .

According to your instructions on page 1 of this thread, you say: "Create a field in your model called 'iPlusN' and mark it to be numerically sorted. Then select some cards in the card browser and go to Actions>It's Morphin Time>Set i+N. This will determine the morphemes in that card and see how many aren't in known.db; the result is stored in the 'iPlusN' field."

Then, in this your reply, you say something about an automatica process, so now I'm totally confused. I have the iPlusN field (or should that be i+N????), but no automatic processes seem to be happening - and the "set iPlusN" option doesn't show up when I try to follow the instructions as per the start of this thread... .

Can you take me step-by-step through this? I'm trying to run this on the Tanuki-Ultima, where I have redefine the {{Japanese - Definition (Kanji)}} as {{Expression}} and added a field named iPlusN and set it to be numerically ordered.

Then what?

Thank you!
Reply
MonjaIsshin Wrote:According to your instructions on page 1 of this thread...Actions>It's Morphin Time>Set i+N.
Needing to manually do that is only applicable to Morph Man 1. In MM2 there's a thread in the background that constantly updates any decks that aren't open (thus if you only have one deck, you need to sit at the deck selection page while it updates). In MM3 it returned back to a manual process because it was made over 100x faster and the workflow ends up nicer that way.

MonjaIsshin Wrote:Can you take me step-by-step through this? I'm trying to run this on the Tanuki-Ultima, where I have redefine the {{Japanese - Definition (Kanji)}} as {{Expression}} and added a field named iPlusN and set it to be numerically ordered
1) Change deck to have Expression field and iPlusN field.
2) Go to morph man gui -> config auto and enable the deck to be auto analyzed.
3) Go to deck selection window and wait for at least a minute. If it's still going Anki will warn you / prevent you from using that deck, saying the database is already open. You can also check the morphman.log file to get a better idea of what's going on and if it's done or errored out etc instead of just waiting and hoping for the best
4) Open the deck and it should be ready to go.

For more detail, the wiki should cover things like how to check the log (although note to use the Morph Man 2 wiki page, as "Morph Man" now points to instructions for MM3)
Reply
Anyway long story short, I did eventually found where Anki 2 stored the Note Types and found the names were changed in the conversions between Anki 1 and 2. So I figured out that whole config problem I was having.

So another problem I'm having. Morphman doesn't seem to be keeping track of any mature morphemes at all. I have cards with intervals of several years, but they list all the mophmemes in the unknown and unmature fields. So it doesn't really seem to be doing anything. >_<; The thresholds are all the defaults. Any thoughts?
Reply
Daichi Wrote:Anyway long story short, I did eventually found where Anki 2 stored the Note Types and found the names were changed in the conversions between Anki 1 and 2. So I figured out that whole config problem I was having.
Glad to hear it

Daichi Wrote:So another problem I'm having. Morphman doesn't seem to be keeping track of any mature morphemes at all. I have cards with intervals of several years, but they list all the mophmemes in the unknown and unmature fields. So it doesn't really seem to be doing anything. >_<; The thresholds are all the defaults. Any thoughts?
Interesting. Can you post your config.py file and an example note from your deck?
Reply
overture2112 Wrote:
Daichi Wrote:So another problem I'm having. Morphman doesn't seem to be keeping track of any mature morphemes at all. I have cards with intervals of several years, but they list all the mophmemes in the unknown and unmature fields. So it doesn't really seem to be doing anything. >_<; The thresholds are all the defaults. Any thoughts?
Interesting. Can you post your config.py file and an example note from your deck?
Sure, here is a very tiny packaged sentence sample. [SentenceTest.apkg]
Just make a new profile and import it. It has a wide range of intervals already that I picked mostly at random you can test with.

And here is my [config.py] file. Which I don't think makes a big difference here.

Edit: Removed URLs.
Edited: 2012-10-19, 9:37 pm
Reply
Hi, been using Morphman for ages now and love it, cheers!

I have a suggestion for a simple feature that I think a lot of people would benefit from. The idea would be that you could copy and paste a wordlist into morphman, and all of the cards in a particular deck containing those words could be tagged

The benefit of this would mainly be that people studying for the JLPT could stop using the "N3 vocab", "All JLPT Vocab" decks that are insanely popular, but mind grindingly boring, and build vocab for the exam exclusively through Drama's and Anime.

I think this would complement Morphmans existing features really well, and make morphman a must have plugin for people studying for JLPT!
Reply
neilhalligan Wrote:The idea would be that you could copy and paste a wordlist into morphman, and all of the cards in a particular deck containing those words could be tagged
You can do this in Morphman 2 (MM3 doesn't have the mass tagger feature implemented yet) using the Mass Tagger feature, which adds a tag(s) you specify to the selected cards that contain a morpheme in a database you specify. For example:

1) Put the wordlist into a text file
2) Open the MorphMan gui and select the option to create a morpheme database from a text file. Let's call it wordsToLearn.db
3) Open the fact browser, select the cards you want to potentially learn from (select all for most cases) then select from the menu It's Morphin Time> Mass Tagger
4) Choose database wordsToLearn.db and tag you want (eg. 'JLPT' )
5) Do Anki selective study on the cards with that tag (maybe suspend any i+0 cards first to avoid wasting time on things you already know).


You can also achieve a similar goal using the Matched Morpheme feature, which takes a database of morphemes to learn, selection of cards to learn from, and trys to find the largest 1 to 1 matching of cards to morphemes to learn from and will set a field (defaults to 'matchedMorpheme') with the morpheme assigned to that card. This may be a bit more useful because then you could show the particular word you're trying to learn from the sentence on the question side of the card, which is allows you to only test that word (sort of makes a "vocab" card from a sentence card) or simply notes what you're focusing on (even if you're still translating the entire sentence). However, this has a downside in that it's unlikely that every morpheme in the database will be assigned unless you have a _really_ big deck to match them against.
Reply
overture2112, you ever figure out if my problem was an isolated bug or anything? I've tried other vanilla tests on new decks and ended up with the same results. Morphman doesn't do much if it doesn't do anything with how mature a morph is.
Reply
New version of MorphMan released: version 3.1

This should fix a bug relating to the known db used for some calculations being generated incorrectly. Thanks go to Daichi for pointing out the issue and giving good data to reproduce the problem with.


Remember that config.py will be overwritten with the default version if you download the new version of the plugin via Anki, so copy it somewhere before you update and then place it back afterwards.
Edited: 2012-10-19, 8:09 pm
Reply
Yes, everything seems to work as intended. I think I can happily use Anki 2 with my sentence decks now. Big Grin I'm going to go have fun studying now. Ja~

(overture2112, you rock!)
Reply
Hi, Just starting MM3 and I appear to be having the exact same error as Daichi :

Quote:An error occurred in an add-on. Please contact the add-on author.

Traceback (most recent call last):
File "D:\My Documents\Anki\addons\morphman.py", line 6, in onMorphManRecalc
morph.main.main()
File "D:\My Documents\Anki\addons\morph\main.py", line 188, in main
allDb = mkAllDb( cur )
File "D:\My Documents\Anki\addons\morph\main.py", line 49, in mkAllDb
fieldValue = getMecabField( fieldName, flds, mid )
File "D:\My Documents\Anki\addons\morph\main.py", line 23, in getMecabField
return stripHTML( splitFields( flds )[ idx ] )
TypeError: list indices must be integers, not NoneType"
You say you solved the problem in the following way, but could you clarify a little?
Daichi Wrote:I did eventually found where Anki 2 stored the Note Types and found the names were changed in the conversions between Anki 1 and 2. So I figured out that whole config problem I was having.
Reply
neilhalligan Wrote:Hi, Just starting MM3 and I appear to be having the exact same error as Daichi :

Quote:An error occurred in an add-on. Please contact the add-on author.

Traceback (most recent call last):
File "D:\My Documents\Anki\addons\morphman.py", line 6, in onMorphManRecalc
morph.main.main()
File "D:\My Documents\Anki\addons\morph\main.py", line 188, in main
allDb = mkAllDb( cur )
File "D:\My Documents\Anki\addons\morph\main.py", line 49, in mkAllDb
fieldValue = getMecabField( fieldName, flds, mid )
File "D:\My Documents\Anki\addons\morph\main.py", line 23, in getMecabField
return stripHTML( splitFields( flds )[ idx ] )
TypeError: list indices must be integers, not NoneType"
You say you solved the problem in the following way, but could you clarify a little?
Daichi Wrote:I did eventually found where Anki 2 stored the Note Types and found the names were changed in the conversions between Anki 1 and 2. So I figured out that whole config problem I was having.
If it's the same issue I was having, you need to be sure your excluding by the exact note type names that Anki 2 has imported your Anki 1 decks as. To find these names click on "Add" card button, and click on the "Type" button, the Note type names are listed here. They can be different from what they were called in Anki 1. You can click on "manage" and just rename them to whatever.

Anki 2 still has a long way to go as far as UI usability goes. :/
Edited: 2012-12-06, 6:00 am
Reply
Hmmm.... It doesnt appear to be the same problem then. I added a fullstop to the name of each note type and Im still getting the same error

Thank you!
Reply
Soo... I spent an entire day subs2srs'ing 60 or so episodes, downloaded morph man 3. I left config.py alone assuming the default would be it looks at "Expression" fields to extract know and seen from. Then ran calc from the tools menu and i get this error.

Traceback (most recent call last):
File "/home/harry/Anki/addons/morphman.py", line 6, in onMorphManRecalc
morph.main.main()
File "/home/harry/Anki/addons/morph/main.py", line 188, in main
allDb = mkAllDb( cur )
File "/home/harry/Anki/addons/morph/main.py", line 49, in mkAllDb
fieldValue = getMecabField( fieldName, flds, mid )
File "/home/harry/Anki/addons/morph/main.py", line 23, in getMecabField
return stripHTML( splitFields( flds )[ idx ] )
TypeError: list indices must be integers, not NoneType

I guess it has to do with my config file being vanilla. but honestly i know nothing of this sort of thing.

Any help would be appreciated!
Reply
Daichi Wrote:If it's the same issue I was having, you need to be sure your excluding by the exact note type names that Anki 2 has imported your Anki 1 decks as. To find these names click on "Add" card button, and click on the "Type" button, the Note type names are listed here. They can be different from what they were called in Anki 1. You can click on "manage" and just rename them to whatever.

Anki 2 still has a long way to go as far as UI usability goes. :/
Maybe I'm just very thickheaded, but I don't understand at all. I get exactly the same error message.

I suspect it's the same problem (I imported decks from Anki 1). What do you mean by "excluding by the exact note type names that Anki has imported your Anki 1 decks as"?? Am I supposed to rename all my Note types to something else? Isn't that what neilhalligan tried without success? Grateful for any advice.
Reply
Irixmark Wrote:
Daichi Wrote:If it's the same issue I was having, you need to be sure your excluding by the exact note type names that Anki 2 has imported your Anki 1 decks as. To find these names click on "Add" card button, and click on the "Type" button, the Note type names are listed here. They can be different from what they were called in Anki 1. You can click on "manage" and just rename them to whatever.

Anki 2 still has a long way to go as far as UI usability goes. :/
Maybe I'm just very thickheaded, but I don't understand at all. I get exactly the same error message.

I suspect it's the same problem (I imported decks from Anki 1). What do you mean by "excluding by the exact note type names that Anki has imported your Anki 1 decks as"?? Am I supposed to rename all my Note types to something else? Isn't that what neilhalligan tried without success? Grateful for any advice.
Lemme try explaining my config visually.
[Image: MorphConfig.png]
You gotta be sure you use the note type names as Anki 2 sees them, The names might be different from what they were in Anki 1.

Edit: I also have "enabled" set to False.
Edited: 2013-01-08, 3:04 am
Reply
Fixed everything according to Daichi's instructions, but I still get exactly the same error message. Sad
Reply
Irixmark Wrote:Fixed everything according to Daichi's instructions, but I still get exactly the same error message. Sad
Honestly, not sure how much I can help. If you have multiple note types, try creating a new profile to try isolating the problem. An empty database with a handful of cards might be easier to troubleshoot and share if needed.
Reply