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 - Gensan - 2015-10-24

xtreme1 Wrote:Anyone have the focusMorph field working? I'm trying to use it here

<span id="expression-content">{{focusMorph:kanji:Expression}}</span>

From the video it seems the focusMorph ought to get filled out to things based on the k+N field, and set an html property that you can catch in css like this:

[mtype=unknown]{
color: black !important;
}

What am i missing? morphman is reording for me so i assume my configuration is right.
I'm not really sure what you're trying to do(sorry V_V) but i dont think that the focusMorph thing works like that. if you mean the highlight thing, then changes it to this

<span id="expression-content">{{morphHighlight:kanji:Expression}}</span>

if you really want focusMorph then removes the ":kanji:Expression" text.

<span id="expression-content">{{focusMorph}}</span>


Mighty Morphin Morphology - Gensan - 2015-10-24

I have question here.

i have 3 deck ( core; Taekim; Subs2srs) i want morphman to analyze known card from all three deck, but i only want subs2srs deck to be modified with n+1 order. is that possible?

my config.py:

# only these can have model overrides
'enabled':True, # whether to analyze notes of a given model, modify their fields, and manipulate due time by Morph Man Index
'set due based on mmi':True, # whether to modify card Due times based on MorphManIndex. does nothing if relevant notes aren't enabled
'ignore maturity':False, # if True, pretends card maturity is always zero

# Model overrides can only override the entries marked above. 2nd priority
model_overrides = {
'Japanese Sub': { 'enabled':True }, #my subs2srs deck model
'Japanese Core':{ 'enabled':False }, #my core deck model
'Japanese Tae':{ 'enabled':False }, #my tae kim deck model
}


Since 'Japanese Core' and 'Japanese Tae' are {enabled:False}. Does Morph still analyze(without modify) those 2 models when i press Ctrl+M ?

EDIT: Nevermind... just change it to { 'enabled':True, 'set due based on mmi': False }, durrr -_-"


Mighty Morphin Morphology - xtreme1 - 2015-10-25

Gensan Wrote:I'm not really sure what you're trying to do(sorry V_V) but i dont think that the focusMorph thing works like that. if you mean the highlight thing, then changes it to this

<span id="expression-content">{{morphHighlight:kanji:Expression}}</span>

if you really want focusMorph then removes the ":kanji:Expression" text.

<span id="expression-content">{{focusMorph}}</span>
I just want to be able to do this with the morphHighlight:




Mighty Morphin Morphology - Gensan - 2015-10-26

You can highlight using unknowns field but you cant highlight using focusMorph field.
what he did in video is highlight using unknowns field.
{{morphHighlight:blahblah}}

I.E
[Image: gdDbeTp.png]
by using morphhighlight, unknowns word will be highlight on sentence.
morphighlight uses unknowns field to highlight the sentence.
unknowns field will disappear once you've learned that card.
unknowns field is not limit to 1 word.

You cant use focusMorph field to highlight sentence. but you can set it to appear on your card( that's obvious, but i just point it out just in case ^^ )
unlike unknowns field
focusmorph is limited to 1 word. ( if you have more than 1 unknowns the focusMorph field will be blank)
focusMorph field will hold your unknowns word until you've matured the card.


EDIT:

Got another question here.
i've created a new deck and move all my k+0 cards there. ( i want to review all my k+0 to increase my comprehension)

but i dont want morph to skip any alternatives on this deck. is there anyway to do that?

i tried put this in config.py

# Deck overrides can only override 'new card merged fill' options. 1st priority
deck_overrides = {
'k+0':{ 'next new card feature':False, 'auto skip alternatives': False },
}
but it doesnt work. ( only 'next new card feature' that has been disabled).

Nevermind this too. (there's no focusmorph to skip in k+0 anyways -_-" )


Mighty Morphin Morphology - polyturn - 2015-10-26

Gensan Wrote:EDIT: Nevermind... just change it to { 'enabled':True, 'set due based on mmi': False }, durrr -_-"
You still have to specify the field though.


Mighty Morphin Morphology - Gensan - 2015-10-27

polyturn Wrote:
Gensan Wrote:EDIT: Nevermind... just change it to { 'enabled':True, 'set due based on mmi': False }, durrr -_-"
You still have to specify the field though.
well, i thought that's goes without saying......


Mighty Morphin Morphology - polyturn - 2015-11-09

I need help... Anyone here using this technique (https://darkjapanese.wordpress.com/2013/07/27/looper-v%E2%86%92lo-regenesis/) for their Kanji cards?, i.e., for automating the transition from recog -> production.

I'm aware that the tutorial is meant for vocab decks, however I'd like to apply this to my Kanji deck as well.
The author uploaded the py for main and config, but it appears to be using an earlier MM3, i tweaked the settings myself for main & config based on the uploads from the wordpress.

main config (left [my edit], right [from darkja] -> https://www.diffchecker.com/rwaijahf

config.py (left[my edit], right[from darkja]) -> https://www.diffchecker.com/ntpdekcu

The lines for these may look odd, that's because I was wondering why MM3 (with a setting similar to darkja's) placed 'Yes' on the mx0 fields even for a large number of notes that I've never even seen. So, I decided to play with it a little bit, but to no avail.. here's how it looks like:
Code:
if N_m == 0:    # sentence comprehension card, m+0
            ts = [ compTag ] + [ t for t in ts if t not in [ vocabTag, notReadyTag ] ]
            setField( mid, fs, C('focusMorph'), u'' )
            setField( mid, fs, C('outlier'), u'' )
            setField( mid, fs, C('mx0'), u'Yes' )
            setField( mid, fs, C('k1e'), u'' )
        elif N_k == 1:  # new vocab card, k+1
            ts = [ vocabTag ] + [ t for t in ts if t not in [ compTag, notReadyTag ] ]
            setField( mid, fs, C('focusMorph'), u'%s' % focusMorph.base )
            setField( mid, fs, C('outlier'), u'' )        
            setField( mid, fs, C('k1e'), u'Yes' )
            setField( mid, fs, C('mx0'), u'' )
        elif N_k > 1:   # M+1+ and K+2+
            ts = [ notReadyTag ] + [ t for t in ts if t not in [ compTag, vocabTag ] ]
            setField( mid, fs, C('outlier'), u'Yes' )        
            setField( mid, fs, C('mx0'), u'' )
        elif N_m > 0:   # M+1+        
            setField( mid, fs, C('outlier'), u'Yes' )
            setField( mid, fs, C('mx0'), u'' )
What's weird with this is that for the new cards that were populated with 'Yes' with the previous setting, the 'Yes' strings still remain even though i placed setField( mid, fs, C('mx0'), u'' ) at every elif..

Help, anyone? My aim is simple; the automatic transition from recognition to production cards once a card becomes mature. The recognition card is also deactivated at this point.

Did I misunderstand darkja's post?


RE: Mighty Morphin Morphology - errtu - 2016-01-05

Can I use morphman with other languages? What do I need to do?


RE: Mighty Morphin Morphology - tokyostyle - 2016-01-06

(2016-01-05, 4:39 pm)errtu Wrote: Can I use morphman with other languages? What do I need to do?

No, you would have to rewrite parts of it. The bulk of the work is done with a program that splits Japanese sentences into their grammatical parts so the first thing you would have to do is find a similar library or program for your target language.


RE: Mighty Morphin Morphology - Earthlark - 2016-01-27

Edit: Fixed problem below by deleting databases; somehow they'd been corrupted I guess.

Haven't used morphman for about 6 months. Tried to recalc today, but got an IO error saying: "Not a gzipped file" ; anyone know what's wrong?

Code:
An error occurred in an add-on.
Please post on the add-on forum:
https://anki.tenderapp.com/discussions/add-ons

Traceback (most recent call last):
 File "D:\Documents\Anki\addons\morphman.py", line 6, in onMorphManRecalc
   morph.main.main()
 File "D:\Documents\Anki\addons\morph\main.py", line 268, in main
   stats.updateStats( knownDb )
 File "D:\Documents\Anki\addons\morph\stats.py", line 43, in updateStats
   gdb = MorphDb( path )
 File "D:\Documents\Anki\addons\morph\morphemes.py", line 151, in __init__
   try: self.load( path )
 File "D:\Documents\Anki\addons\morph\morphemes.py", line 186, in load
   self.db = pickle.load( f )
 File "C:\cygwin\home\dae\win\build\pyi.win32\anki\outPYZ1.pyz/gzip", line 256, in read
 File "C:\cygwin\home\dae\win\build\pyi.win32\anki\outPYZ1.pyz/gzip", line 291, in _read
 File "C:\cygwin\home\dae\win\build\pyi.win32\anki\outPYZ1.pyz/gzip", line 185, in _read_gzip_header
IOError: Not a gzipped file



RE: Mighty Morphin Morphology - shonarin - 2016-03-21

So I thought I set up Morphman correctly, but it seems that I missed some things for the stuff I want it to do. By default, morphman analyzes the expression field, I kept that option but for my Kanji notes I also added "kanji" as a morph field under model overrides. I downloaded a separate vocabulary deck for which I only want cards shown with Kanji I already know. When I let morphman calculate everything I noticed that the order of my vocabulary deck was still the same and all the cards have been tagged as badLength.
Any ideas to what I did wrong?


RE: Mighty Morphin Morphology - polyturn - 2016-03-22

Quote:So I thought I set up Morphman correctly, but it seems that I missed some things for the stuff I want it to do. By default, morphman analyzes the expression field, I kept that option but for my Kanji notes I also added "kanji" as a morph field under model overrides. I downloaded a separate vocabulary deck for which I only want cards shown with Kanji I already know. When I let morphman calculate everything I noticed that the order of my vocabulary deck was still the same and all the cards have been tagged as badLength.
Any ideas to what I did wrong?

Unfortunately, that's not the way mecab/morphman works. Morphman doesn't split a vocabulary morpheme into its individual Kanji, .e.g 映画 is only one morpheme 映 is another and 画 is another (assuming they can be morphemes in their own right).

I actually have the same problem as you, i.e., I'm also looking for a way to sort my vocab deck based on my Kanji deck unfortunately morphman can't do that as of the moment. I think it's possible to do though using excel macros but even then, I think it won't be as good as a morphman approach.


RE: Mighty Morphin Morphology - jaymonroe - 2016-04-03

Hello everyone!

I've been a Kanji Koohii user for years, albeit not a very consistent one. I check this forum every now and then, whenever I need some inspiration or when I need to change something in my studying routine.

I've decided to finally join the community after spending the whole afternoon trying to make Morphman work, because I think it's something that would really help me right now. But (as you might have aleady guessed) I haven't been able to set it up correctly. I'm sorry if my questions and doubts are going to sound stupid, but I'm an absolute newbie when it comes to coding, and even after reading this thread from start to finish I still don't know what I did wrong.

This is the error I get when I try to create the database by clicking on "Extract morphemes" in the card browser:


Quote:An error occurred in an add-on.
Please post on the add-on forum:
https://anki.tenderapp.com/discussions/add-ons
Traceback (most recent call last):
File "C:\Users\User\Documents\Anki\addons\morph\util.py", line 87, in <lambda>
b.connect( a, SIGNAL('triggered()'), lambda b=b: doOnSelection( b, preF, perF, postF, progLabel ) )
File "C:\Users\User\Documents\Anki\addons\morph\util.py", line 74, in doOnSelection
st = perF( st, n )
File "C:\Users\User\Documents\Anki\addons\morph\extractMorphemes.py", line 16, in per
ms = getMorphemes( n[ f ], None, cfg1('morph_blacklist') )
File "C:\cygwin\home\dae\win\build\pyi.win32\anki\outPYZ1.pyz/anki.notes", line 98, in __getitem__
File "C:\cygwin\home\dae\win\build\pyi.win32\anki\outPYZ1.pyz/anki.notes", line 95, in _fieldOrd
KeyError: u'Expression'
Could anyone please help me figure it out? Maybe you'll need some more information, but I don't know what could be useful to understand what's wrong, so please let me know.
By the way, I'm sorry if sometimes my English sounds strange or isn't clear enough - it's not my native language


RE: Mighty Morphin Morphology - Helena4 - 2016-04-27

I loved my morphman-controlled decks on my old computer, but that computer broke and now the plugin link doesn't work. Can someone please explain to me how to install the plugin using the files available on gituhub? I'm rather fed up of nothing being in the correct order any more.


RE: Mighty Morphin Morphology - HelenF - 2016-04-28

(2016-04-27, 11:26 am)Helena4 Wrote: I loved my morphman-controlled decks on my old computer, but that computer broke and now the plugin link doesn't work. Can someone please explain to me how to install the plugin using the files available on gituhub? I'm rather fed up of nothing being in the correct order any more.

https://github.com/jre2/JapaneseStudy/blob/master/anki/plugins/morphman3/morphman3.zip
Download the zip by clicking on the View Raw link.
Unzip it into your Anki addons folder (without making a new folder inside, so morphman.py is directly in the Anki addons folder).
Edit config.py and restart Anki, the same way as if it was a shared plugin.


RE: Mighty Morphin Morphology - Helena4 - 2016-04-29

(2016-04-28, 4:52 am)HelenF Wrote:
(2016-04-27, 11:26 am)Helena4 Wrote: I loved my morphman-controlled decks on my old computer, but that computer broke and now the plugin link doesn't work. Can someone please explain to me how to install the plugin using the files available on gituhub? I'm rather fed up of nothing being in the correct order any more.

https://github.com/jre2/JapaneseStudy/blob/master/anki/plugins/morphman3/morphman3.zip
Download the zip by clicking on the View Raw link.
Unzip it into your Anki addons folder (without making a new folder inside, so morphman.py is directly in the Anki addons folder).
Edit config.py and restart Anki, the same way as if it was a shared plugin.

Thank you. I'll try that later today x


RE: Mighty Morphin Morphology - Earthlark - 2016-06-05

I just updated to the latest iteration of Anki (Version 2.0.36, Qt 4.8.4 PyQt 4.10) and suddenly I'm seeing this error related to MorphMan. Anyone know how to fix this?



Quote:An error occurred in an add-on.
Please post on the add-on forum:
https://anki.tenderapp.com/discussions/add-ons

Traceback (most recent call last):
File "aqt\addons.py", line 41, in loadAddons
File "D:\Documents\Anki\addons\morphman.py", line 36, in <module>
main()
File "D:\Documents\Anki\addons\morphman.py", line 33, in main
import morph.stats
File "D:\Documents\Anki\addons\morph\stats.py", line 2, in <module>
import glob, gzip, os, cPickle as pickle
ImportError: No module named glob



RE: Mighty Morphin Morphology - polyturn - 2016-06-05

(2016-06-05, 9:32 pm)Earthlark Wrote: I just updated to the latest iteration of Anki (Version 2.0.36, Qt 4.8.4 PyQt 4.10) and suddenly I'm seeing this error related to MorphMan. Anyone know how to fix this?



Quote:An error occurred in an add-on.
Please post on the add-on forum:
https://anki.tenderapp.com/discussions/add-ons

Traceback (most recent call last):
File "aqt\addons.py", line 41, in loadAddons
File "D:\Documents\Anki\addons\morphman.py", line 36, in <module>
main()
File "D:\Documents\Anki\addons\morphman.py", line 33, in main
import morph.stats
File "D:\Documents\Anki\addons\morph\stats.py", line 2, in <module>
import glob, gzip, os, cPickle as pickle
ImportError: No module named glob

As far as I know it's not yet compatible with the latest version of Anki, I downgraded my Anki version due to the same error. I'm using 2.0.31.


RE: Mighty Morphin Morphology - Earthlark - 2016-06-14

(2016-06-05, 10:09 pm)polyturn Wrote: As far as I know it's not yet compatible with the latest version of Anki, I downgraded my Anki version due to the same error. I'm using 2.0.31.

Got it. Thanks for the info! Guess I'll downgrade for the time being.

Edit: Looks like 2.0.33 works, but from 2.0.34 on there's an error.