kanji koohii FORUM
Mighty Morphin Morphology - Printable Version

+- kanji koohii FORUM (http://forum.koohii.com)
+-- Forum: Learning Japanese (http://forum.koohii.com/forum-4.html)
+--- Forum: Learning resources (http://forum.koohii.com/forum-9.html)
+--- Thread: Mighty Morphin Morphology (/thread-7486.html)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18


Mighty Morphin Morphology - overture2112 - 2013-02-28

I have just released v3.3 of Morph Man.

AnkiWeb page

Be sure to look at the new config.py and edit appropriately.

What changed
● Track recently seen focus morphemes (since Anki was opened) and automatically skip new cards with the same focus (ie. "alternatives"). Can enable/disable by deck with 'next new card feature' option. Can also display how many cards will be skipped via 'print number of alternatives skipped' option.
● 'next new card feature' also alters Anki's selection of new cards to only pick those which have a focus morpheme and are k+1
● Hit "K" to tag a card's as already known, skipping it (and thus it's alternatives, if any, as per above) and letting Morph Man consider it mature in future recalcs. Can also add this tag to cards manually.
● Hit "L" to search for cards with the same focus morph, useful for finding alternative sentences to learn a word from or simply see more examples of it
● Ctrl-Shift-N in browser to immediately review the selected cards. This is useful if you decide to learn a word from an alternative sentence after using "L" (above) during review or came across some word outside Anki and want to immediate practice it.
● Ctrl-Shift-P to batch play all the media of the selected cards. This is useful if you want to quickly see many examples of a new word or grammar point in action.
● 'new card merged fill' feature allows you to study a parent deck and have it pull new cards from all children decks at once (whereas normally Anki will sequentially pull from the first deck until it's hit the daily limit, then move on the the next, etc). Also automatically skips cards whose "due" isn't above some configurable threshold.
● 'morphHighlight' command for card templates to wrap morphemes in <span>s with maturity info in the attributes so you can customize their color/style via css according to overall maturity level (eg. mature = blue, known = green, unknown = red) or, for more detail, by maturity in days (eg. 11 = red, 12 = dark pink, 13 = pink, 14 = purple, etc)
● Databases created from text files can have maturity assigned to the morphemes
● Cards in "learning" status now how maturity assigned (set to 0.5 days) instead of 0, making sub-day "seen" and "known" thresholds more useful
● Can save all.db, mature.db, known.db, and seen.db
● Can configure optimal sentence length (defaults to 4 morphemes)
● "Lite" mode which only modifies notes which are k+2 or better in order to reduce how much data must by synced
● bugfixes and/or improved error messages for many issues

Video tutorials
You can see the above features in action with the youtube video tutorials.

How you can help
● Tweaks to the algorithm and suggestions for otherwise improving Morph Man Index
● Create a tutorial. Or request a tutorial if a particular feature is confusing or non-intuitive
● Share new/novel ways you've found to utilize the tools to improve your learning or solve interesting problems


Mighty Morphin Morphology - Aspiring - 2013-03-01

Thanks!

It's easier to edit the config now. Big Grin


Mighty Morphin Morphology - asmodean - 2013-03-01

overture2112 Wrote:I have just released v3.3 of Morph Man.
Hi! Somebody on the Anki User's forum pointed me at this. I've been considering some similar cross-deck performance tracking issues related to decks I generate.

Essentially I am generating Anki decks optimized for specific games, i.e. the cards order is based on the frequency of use in that game and sample sentences are drawn from the script. See my web site for some more technical details and the actual decks: http://asmodean.reverse.net/pages/freqdeck.html

The question for me is how to leverage Anki's knowledge of your performance on cards between separate decks without completely losing the per-deck/game priority ordering.

I plan to familiarize myself with Morph Man to see how it might help. From the description, I suspect your goals are not quite the same (opposite, in some ways). But perhaps some of the ideas will be useful.

Anyway, it's nice to see others working on technology-based strategies for Japanese learning. If you'd like to discuss such things, you can find me in many places (email, irc, forums, etc).

I also have a thread on the Anki forum that I hope might cause the author to consider built-in support for cross-deck cards: https://groups.google.com/forum/#!topic/ankisrs-users/KZePYO2Ju1U


Mighty Morphin Morphology - overture2112 - 2013-03-02

asmodean Wrote:Essentially I am generating Anki decks optimized for specific games, i.e. the cards order is based on the frequency of use in that game and sample sentences are drawn from the script. See my web site for some more technical details and the actual decks: http://asmodean.reverse.net/pages/freqdeck.html
That's pretty cool, I actually just posted a topic on generating flashcards from visual novels here but I'd love to see work on other games as well.

asmodean Wrote:The question for me is how to leverage Anki's knowledge of your performance on cards between separate decks without completely losing the per-deck/game priority ordering.

I plan to familiarize myself with Morph Man to see how it might help. From the description, I suspect your goals are not quite the same (opposite, in some ways). But perhaps some of the ideas will be useful.
I looked at some of the decks on your website and if I understand what you're trying to do correctly, it should be quite feasible by using MorphMan in the standard way as it's quite similar to how I use different subs2srs decks from tv shows. Essentially:

1) modify config.py so morph man analyzes the 'Kanji' field of the cards, since that's the word you're testing
2) add a field for storing k+N (how many unknowns)
3) when studying, limit new cards to only ones which are k+1 (ie. the word is not already known via study of some card from a different deck). you can do this with filtered decks or the v3.3 new card feature (if you add a field for storing the focus morpheme)

Optionally, disable MorphMan from changing the 'due' times of new cards if you want to preserve your current ordering of the words. That said, I'd argue the order it provides is likely superior to the one you're using now since it adjusts frequency based on the contents of your collection (plus any morphemes in the external.db) and thus will update as you add more cards.


Mighty Morphin Morphology - asmodean - 2013-03-03

overture2112 Wrote:1) modify config.py so morph man analyzes the 'Kanji' field of the cards, since that's the word you're testing
2) add a field for storing k+N (how many unknowns)
3) when studying, limit new cards to only ones which are k+1 (ie. the word is not already known via study of some card from a different deck). you can do this with filtered decks or the v3.3 new card feature (if you add a field for storing the focus morpheme)
Thanks for the suggestions. I played around a bit and managed to create quite a mess that broke Anki. Smile Negative due new-card counts, ignoring clicks to the Study button, etc... It's probably my error somewhere.

I think I'll hold off for now and try a simpler standalone approach.

overture2112 Wrote:Optionally, disable MorphMan from changing the 'due' times of new cards if you want to preserve your current ordering of the words. That said, I'd argue the order it provides is likely superior to the one you're using now since it adjusts frequency based on the contents of your collection (plus any morphemes in the external.db) and thus will update as you add more cards.
Preserving the unique order within each deck is my priority. The idea is to present words that are immediately useful for each game you are playing -- that makes study more fun and increases chances you'll remember the words because they show up in the game as exercise.


Mighty Morphin Morphology - overture2112 - 2013-03-03

asmodean Wrote:ignoring clicks to the Study button
On slow machines if you have the new card feature enabled but not the merged fill with a minimum due requirement, it can take awhile the first time you study something to fill the new card queue, so it's possible that's what's happening.

asmodean Wrote:Preserving the unique order within each deck is my priority. The idea is to present words that are immediately useful for each game you are playing -- that makes study more fun and increases chances you'll remember the words because they show up in the game as exercise.
Ah, if your anki collection was the entire script and not just the words it would give you roughly the same order, but since that's not the case you might want to preserve what you have.


Mighty Morphin Morphology - gorghurt - 2013-03-07

I think my question is very similar to asmodean's question.
Is there a way to disable resheduling for some decks, or enable it only for some decks.
I want to take the information out of my whole collection, but only want some sentence decks resheduled.
if it is'nt there already, i might hack it in myself (if possible).
It would be great if there was a variable EnableResheduling or something like this.

I think i know some work around(havent tried yet)
-export the decks you want to analyze but not reshedule
-import in another temporary profile
-create the databases for the temporary profile
-overwrite the databases of the original profile with the temporary databases
-change the config, so that only the sentence decks are processed
-recalculate

not sure if this is working, but if I understand corectly, the database isn't overwritten, while recalculating.


edit:
I've got a second question.
can i use the new card merged fill option without recalculating?
Does it work without the resheduling?


Mighty Morphin Morphology - overture2112 - 2013-03-08

gorghurt Wrote:Is there a way to disable resheduling for some decks, or enable it only for some decks.
Not in v3.3 but that's something I'm adding for 3.4 as I also ran into a situation where I want it to use some decks for frequency analysis but not touch their ordering.

In the meantime you can export the decks you want for analysis only to the external.db (all.db is rewritten every time you recalculate) as a semi-solution.

gorghurt Wrote:I've got a second question.
can i use the new card merged fill option without recalculating?
Does it work without the resheduling?
I'm not sure what you mean by this? Can you clarify?


Mighty Morphin Morphology - gorghurt - 2013-03-08

basicaly I'm asking how the "new card merged fill" option works.
does it automaticaly work, when I set it true in the deck_overrides even when 'enabled' is set to False?


thanks, i will try with with the external.db for now.


Mighty Morphin Morphology - Daichi - 2013-03-08

Regarding the card order, can't you just set Anki to "Show new cards by order added"? Order isn't very meaningful in Anki to be honest, if your storing sorted-cards that order is going to be lost after the initial reviews unless you keep it in some sort of filtered deck.

Anyway, it wouldn't be a bad feature, it would be one way to speed up analysis.


Mighty Morphin Morphology - overture2112 - 2013-03-08

gorghurt Wrote:basicaly I'm asking how the "new card merged fill" option works.
does it automaticaly work, when I set it true in the deck_overrides even when 'enabled' is set to False?
Yes, 'enabled' (a model option) only determines whether cards of a particular model (ie. note type) are used to generate all.db and whether they're later modified with various fields/tags/due-sorting. These two separate stages should probably be better separated into two config options, as you suggested.

Whereas 'new card merged fill' (a deck option) will change the way anki gathers "new" cards when reviewing that deck and it doesn't consider whether the cards inside that deck happen to be part of a model which is 'enabled' for morph man calculations or not. They are essentially completely separate features (though I personally use them together).


Mighty Morphin Morphology - tokyostyle - 2013-03-09

@overture2112

gorghurt Wrote:Is there a way to disable resheduling for some decks, or enable it only for some decks.
I want to take the information out of my whole collection, but only want some sentence decks resheduled.
I'd like to add my vote to this. I was going to mention it earlier but I'm having no luck converting DVD subtitles to nice useful text so once again technology spoils my plans to use your plugin.

Also, is there a repo for M3 that I missed? It's kind of sad how much I rely on git for rapid, reversible hacking.


Mighty Morphin Morphology - Boy.pockets - 2013-03-10

Hi @overture2112,

I am getting an error with MorphMan 3.3.

Anki Wrote:Traceback (most recent call last):
File "/Users/UserName/Documents/Anki/addons/morphman.py", line 6, in onMorphManRecalc
morph.main.main()
File "/Users/UserName/Documents/Anki/addons/morph/main.py", line 208, in main
updateNotes( allDb )
File "/Users/UserName/Documents/Anki/addons/morph/main.py", line 175, in updateNotes
TAG.register( tagNames )
UnboundLocalError: local variable 'tagNames' referenced before assignment
I am on a Mac (10.8.2), Anki 2.0.8. I *think* the last time I used this plugin was Anki 1.x, so perhaps I have not got the correct setup. I have looked through the doco, but can't see anything amiss.

No hurry for this; I still doing pretty well with the old morphManIndex.

Thanks for the cool plugins.


Mighty Morphin Morphology - overture2112 - 2013-03-15

Boy.pockets Wrote:File "/Users/UserName/Documents/Anki/addons/morph/main.py", line 175, in updateNotes
TAG.register( tagNames )
UnboundLocalError: local variable 'tagNames' referenced before assignment
It seems this is half a bug and half misconfiguration. Basically, you're getting this error because 0 cards are enabled and thus processed during the part where it modifies cards with various fields, tags, and sets their due date according to MorphManIndex (which is a problem with your config.py or you have no cards in your collection) and MorphMan assumes it's enabled for at least 1 card (which is a problem with my code).

tl;dr => you need to fix your config.py


Mighty Morphin Morphology - overture2112 - 2013-03-15

tokyostyle Wrote:Also, is there a repo for M3 that I missed? It's kind of sad how much I rely on git for rapid, reversible hacking.
There's a github repo I push my stuff to occassionally.


Mighty Morphin Morphology - overture2112 - 2013-03-18

Recently I decided I wanted to reinforce recently learned vocab (ie. seen but not mature) in order to get a better feel for the range of meanings of new words, improve my ability to hear it in different sentences, etc but I didn't want to put in any extra effort like doing more sentences with the word (I'm super lazy time efficient).

Instead of doing extra cards explicitly catered for these known-but-not-mature words, I decided to instead alter the Morph Man Index algorithm to give a bonus for each known which decays rapidly according to maturity. Without even much tuning, this quickly proved to be pretty good; it slightly impairs the word frequency factor (but not enough to matter, imo) at the benefit of the already known portions of k+1 sentences now performing double duty by helping reinforce and integrate new knowledge.

The main problem with the above solution is coverage. That is, it doesn't garuntee getting extra experience with all the new words you're learning but rather just does a best-effort attempt to reinforce some of the newest vocab.

I'll be adding this to the next release of Morph Man (you can configure the importance of this factor in the config or disable it entirely) but I'm curious if anyone has suggestions on enhancements to this or other aspects of the algorithm. If a random whim combined with exceptional laziness can lead to free bonus learning like this, then hopefully that means there's still lots of room for improvement.


Mighty Morphin Morphology - Babyrat - 2013-03-19

Thanks for the great work overture2112, it has got me back into subs2srs!

But I have ran into a problem. Morphman has been working until today, when I made a new subs2srs deck. Now it doesn't reorganize the deck for i+1, so it is just giving me my cards in the original order. My sentences are in the expression field.

The recalc is working as I have checked the logs and it is saying:
"2013-03-19 15:37:12.734000: Processed all 7164 notes + saved all.db in 0.193000 sec
2013-03-19 15:37:13.042000: Updated notes in 0.307000 sec"

yet I am still getting card which are way too difficult.


Mighty Morphin Morphology - overture2112 - 2013-03-19

Babyrat Wrote:But I have ran into a problem. Morphman has been working until today, when I made a new subs2srs deck. Now it doesn't reorganize the deck for i+1, so it is just giving me my cards in the original order. My sentences are in the expression field.
The default config now has MorphMan disabled by default, so is it possible your new subs2srs deck has a different model / note type and it hasn't been enabled?

Also, if you add a field for storing "morphManIndex" or "k+N" etc, are any of them being set (ie. is it just the due order that's not working or is all the note modifications too)?


Mighty Morphin Morphology - Babyrat - 2013-03-19

Ah you were right about the note type, I forgot that I edited (and renamed) the template for subs2srs, so to fix I just added the note type to model_overrides = {}. Thanks for the help.


Mighty Morphin Morphology - Yoxtuparai - 2013-03-22

Hi Overture, I was looking at your video tutorials, and could help but be jealous of your tidy sentence glossing on your notes, what add on do you use, or more specifically what do you do to get those results? the glosser in the anki add on repository does no where the same thing. thanks.


Mighty Morphin Morphology - overture2112 - 2013-03-22

Yoxtuparai Wrote:Hi Overture, I was looking at your video tutorials, and could help but be jealous of your tidy sentence glossing on your notes, what add on do you use, or more specifically what do you do to get those results? the glosser in the anki add on repository does no where the same thing. thanks.
You sure? I'm using Sentence Gloss from the shared addons. It's an Anki 2 port Kenishi made of my original sentence glossing plugin for Anki 1, which was based on one of cangy's standalone scripts, which ultimately uses wwwjdic (see http://www.csse.monash.edu.au/~jwb/cgi-bin/wwwjdic.cgi?1C).

I'm guessing it's just the formatting that's making it look nicer, which I stole from a friend's template that I thought looked really good:
Code:
<span style="font-size: 14px; color: #005500">{{Gloss}}</span>



Mighty Morphin Morphology - Boy.pockets - 2013-03-24

overture2112 Wrote:you need to fix your config.py
Thank you. I have been able to fix it. As you said, it was my config file.

Cheers,


Mighty Morphin Morphology - Aspiring - 2013-03-31

@overture & tokyostyle
The main features of the plugins "MCD Support" & "Mighty Morphin' Morphology" are accessed through the shortcut Ctrl+M.
When both plugins are installed, the shortcut can't be used.


just a slight nuisance


Mighty Morphin Morphology - Pauline - 2013-04-01

I am using the 'next new card feature' and 'new card merged fill' options. When I review new cards there is always one more card in the queue than the daily limit. However if I interrupt the reviewing on that last card (to edit the card or to search for alternatives) and then return, the card is gone and I get the message that the daily limit has been reached.

[Image: anki2tennewcards.th.png][Image: anki2subs2srsoptions.th.png]

Code:
# only these can have deck overrides
'next new card feature':True,
'new card merged fill':False,
'new card merged fill min due':10000,
Code:
profile_overrides = {
}

model_overrides = {
    'subs2srs Japanese': { 'enabled':True },
}

deck_overrides = {
    'subs2srs': { 'new card merged fill':True },
}



Mighty Morphin Morphology - tokyostyle - 2013-04-01

Aspiring Wrote:@overture & tokyostyle
The main features of the plugins "MCD Support" & "Mighty Morphin' Morphology" are accessed through the shortcut Ctrl+M.
I actually tried to fix this by checking for MorphMan being installed, but unfortunately it always seems to get loaded after me so I couldn't come up with a good solution.

For now the best solution is to switch one to Ctrl+Shift+M. You can find the shortcut call in morphman.py or mcdsupport/menus.py. If overture doesn't mind too much I'd love to move this setting into the config.py in MorphMan.