Back

Mighty Morphin Morphology

Riddian Wrote:...How can I inform MorphMan that these items are known or have MorphMan ignore them?...I have tried adding a list of particles to my known.db...
The known.db is regenerated every time re-calc is done. What you're looking for is "external.db".

Alternatively, tag cards as already known. There's a shortcut "set known and skip key" (defaults to "k") that you can use on any card that comes up for learning that you already know.
Reply
overture2112 Wrote:
Riddian Wrote:...How can I inform MorphMan that these items are known or have MorphMan ignore them?...I have tried adding a list of particles to my known.db...
The known.db is regenerated every time re-calc is done. What you're looking for is "external.db".

Alternatively, tag cards as already known. There's a shortcut "set known and skip key" (defaults to "k") that you can use on any card that comes up for learning that you already know.
Thank you for your reply.

I'm very sorry but I meant to write "external.db" not "known.db".

Perhaps the problem I am having is related to the "POS Blacklist" filed which contains "助詞", however, I have seen seen this field described as a filtering field and so I'm guessing it would not have any effect on the data I import? Will need to do some tests to confirm if this is issue or not.
Edited: 2015-05-09, 7:20 pm
Reply
Couldn't figure out why it wasn't working so decided I'd just tag the cards as "alreadyKnown" as suggested which works fine thanks Smile
Edited: 2015-05-12, 7:07 am
Reply
May 16 - 30 : Pretty Big Deal: Save 31% on all Premium Subscriptions! - Sign up here
JapanesePod101
Riddian Wrote:Everything looks good but for some reason I can't study any cards now Sad I can see that I have 20 new cards available to study but when I hit the "Study Now" button I get the message "No cards are due yet.".
Same here. ¿I suspect my problem is due to AnkiDroid?

After finishing reviews and moving on to new cards, AnkiDroid starts feeding me new cards with vocab I've already seen (i+0). When I start up Anki (desktop) after syncing, Anki tells me I'm done even though Anki shows New: 20. I try clicking on Study Now, but a message pops up saying "No cards are due yet." After clicking Study Now a few times, the correct, new cards come up (cards with the target vocab from my priority database file).

I see in the due column that i+0 cards have parentheses around them, e.g., (3999). I'm guessing MorphMan puts the parentheses in place so it knows to ignore them. Does AnkiDroid not recognize that it should ignore cards with those numbers in parentheses?

After a bit of searching, I see one way to deal with this is to create a filtered deck, "k+N:1":
overture2112 Wrote:Alternatively (and useful for AnkiDroid which has no MorphMan), you can use a Filtered Deck that just contains k+N:1 cards.
This is the only place I saw it mentioned that AnkidDroid doesn't dish the cards in order, so it might be worth mentioning in the wiki. (I guess I assumed that, even though AnkiDroid doesn't have MorphMan, the cards were reordred so Anki naturally recognized that order.)

I'm probably wrong on a lot of this, so please correct and enlighten me! Thanks!
Reply
So I've been using morph man for a while, but recently I reinstalled windows. I went back on the anki add-ons page and don't see morph man there anymore. Is there some other way of adding it to anki?
Reply
richardws1984 Wrote:So I've been using morph man for a while, but recently I reinstalled windows. I went back on the anki add-ons page and don't see morph man there anymore. Is there some other way of adding it to anki?
Check out overture2112's post, which details what's changed and the github link where you can download until it goes back up on the plugins page.
Reply
You should update the download link in both the wiki and the first post of this thread with the last version.

I was like crazy searching for the plugin in the ankiweb addons page Tongue
Edited: 2015-05-14, 5:47 am
Reply
HelenF Wrote:Hi, I'm using the Dec 31 version from GitHub.

I had to add the "#-*- coding: utf-8 -*-" to main.py to make it run.
I just installed on Windows and it didn't complain about this. I was using Fedora when I needed to add the encoding line.
Reply
Could you add the UTF-8 line by default? You need it in files with non-ASCII text.
Reply
Amazing tool man. Currently cleaning up my decks so I can use this more effectively and without conflicts.

One question I had was if it's able to automatically recognise a close deletion as the focus morph. That is, if I have a cloze-deletion deck, will it automatically be able to recognise the close deleted portion of the sentence to be the focus morph? If no, could this be a potential future feature? If not/regardless, anybody have suggestion for doing this "manually" without doing it one by one?
Reply
Uh.... help, since the ankiweb download is down, how do I download it from github? I've no idea which files to choose from and how to configure them...
Reply
polyturn Wrote:Uh.... help, since the ankiweb download is down, how do I download it from github? I've no idea which files to choose from and how to configure them...
"morphman.py" and the whole "morph" folder.
"morphman3.zip" has a copy of the same files (and is a little quicker to download if you don't have git installed).

On your computer, it should be laid out as Anki/addons/morphman.py and Anki/addons/morph/TheOtherFiles.py

You need to edit config.py with the appropriate configuration.

(I'm not sure what to do with morphServer.py, but it's not needed for the basic features.)
Edited: 2015-06-18, 9:12 am
Reply
I've been trying to get this thing to work for the longest time and nothing. First error I got was some utf encoding error, which was fixed simply by adding the utf-8 encoding declaration to main.py

Now I get this error
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 "/Users/Salvador/Documents/Anki/addons/morphman.py", line 6, in onMorphManRecalc
    morph.main.main()
  File "/Users/Salvador/Documents/Anki/addons/morph/main.py", line 266, in main
    knownDb = updateNotes( allDb )
  File "/Users/Salvador/Documents/Anki/addons/morph/main.py", line 231, in updateNotes
    TAG.register( tagNames )
UnboundLocalError: local variable 'tagNames' referenced before assignment
Any help would be greatly appreciated.
Reply
Just wondering, is it possible to use MM to optimize the order of my Vocab deck instead of my sentences deck? i.e. using it to reorder my vocab deck based on the Kanji I already know?, it's quite tiring manually repositioning cards
Reply
Anyone home?
Just got this working however I can't figure out how to tweak the settings to what I like.
What I'd like to do is for MM to analyze my Vocab, Kanji and Grammar decks but update only my Sentences and Vocab deck.


To be specific, what I'd like to do is to use MM to optimize my Vocab deck based on my Kanji deck, and to use my vocab+grammar deck to optimize my sentences deck. (I'm thinking I might need 2 sets of settings).


do I have to place all of the concerned fields here? -> 'morph_fields': [u'Expression', u'Kanji', u'ConceptTK'],

Under default = {}, do I leave 'enabled':False, as False?

Code:
model_overrides = {
    'Japanese-024b4':     { 'enabled':True, 'morph_fields': [u'Kanji']  },
    'Japanese-1b811 example_sentences-03c20d':       { 'enabled':True, 'morph_fields': [u'Expression']  },
    'Core Cloze':         { 'enabled':False, 'set due based on mmi': True, 'ignore maturity': True },
    'Tae Kim Cloze':{ 'enabled':True, 'morph_fields': [u'ConceptTK'] },
}

# Deck overrides can only override 'new card merged fill' options. 1st priority
deck_overrides = {
    'Jp corePLUS':     { 'enabled':True, 'morph_fields': [u'Expression'] },
    'Kanji (Eng-Jp and Vice Versa)':       { 'enabled':True, 'morph_fields': [u'Kanji'] },
    'X-Jp sentences Cloze Deleted script':         { 'enabled':False, 'set due based on mmi': True },
    'Tae Kims Guide to Japanese Grammar with Diagrams':         { 'enabled':True, 'morph_fields': [u'ConceptTK'] },
}
I've tried the above code where I've set my Sentences deck to 'False' in thinking that MM will not scan any fields, while setting the 'set due' on because I'd want MM to sort it in i+1 order.

The thing is it half-worked a while ago with some different settings it's now quite buggy since I've experimented on the settings, so that isn't the exact code.

Btw, I have no idea what 'new card merged fill' means.
Edited: 2015-08-09, 10:31 am
Reply
Hi there!

I'm not the the addon-creator or anything, but I might be able to help a little.

So, from what I can tell, the deck override settings can only override the "new card fill" options, so everything that you're doing there has to be moved up to the model overrides, assuming that your different decks use different note types.

(btw, new card fill allows a deck to show you new cards from any of its child decks, rather then showing all the new cards from child deck 1, then child deck 2, etc. It will also skip any cards that it deems to be too easy (with 0 unknowns) I have it turned on, don't really see a reason not to. )

As for your specific case, I don't think you can tell morphman to modify some cards based on this model, but modify this other set of cards by a second set of rules. Like you said, you might have to do your vocab work under one config file, switch configs, recalc, then do your sentences.

(Please back up your config files before messing with them, incase we mess something up! Just save a copy to the desktop so if it breaks you can just copy it back into place.)

I think under defaults, you'll want to the following
Code:
'enabled':False,
'set due based on mmi':False
First option tells Morphman to ignore everything unless you specifically tell it otherwise.
Second option tells it to not mess with due dates unless you specifically tell it otherwise.

Then under model over rides, tell morphman which cards you want to see, including the ones that you want it to change, and the ones that you don't want it to change. Morphman will need to see both.

In addition, for the models that you want it to mess with due dates, set that option to true. So your model overrides will look something like
Code:
'Vocab:     { 'enabled':True, 'set due based on mmi':True, 'morph_fields': [u'Expression']},
    'Kanji':       { 'enabled':True,  'morph_fields': [u'Kanji'],},
    'Grammar':         { 'enabled':True, 'set due based on mmi':True, 'morph_fields': [u'ConceptTK']},
    'Sentances':{ 'enabled':True, }, 'morph_fields': [u'Expression']
Now, I don't know for sure morphfields can be overridden (Comments are a little ambiguous. It's either just those 3 options are overwridden (enabled, set due, and ignore maturity), stopping at the next comment line, or the whole option block down to the next empty line. I want to say it's the latter, but I have all of my relevant cards using the expression field.


Oh, and if you're not sure what the model is like I was, it looks like you can find it by going into the card browser, and hitting info. I'm 90% sure it's under "Note type". At least, that's what I've been using in my configs and it seems to be working!
Reply
How does it treat duplicates? the corePLUS deck in particular has a lot of them. It'd be tiring to delete all of them, i.e., how does it differences in the intervals of cards? e.g. one card is mature, one is unseed, which takes precedence? or does it take the average of all cards of a note?

----------------
Looks like with the way mecab works, it's impossible to sort my Vocab deck? Or is there a way?, i.e., instead of scanning morphemes, it'd scan individual characters.

It's quite frustrating having to manually reposition and/or unsuspend cards in corePLUS, I'd like to automate it with MM if there's a way somehow.
----------
Is it possible to set MM to ignore furigana? I'm guessing that it's messing with the optimizing of the order of the sentences. The Core sentences Cloze deck has it, I wish the Cloze Furigana tools had a 'batch' remove readings but it doesnt.

Would it be a good idea to also include the readings of the vocab on the morph_fields as a workaround?

I've also read somewhere that the scheduling based on mmi isn't transferred OTA to ankiweb/mobile/droid, does that mean that I have to manually sort using MMI and reposition accordingly?

EDIT2:
Just hatched another idea, I think I could use the script that was used to make this deck (https://ankiweb.net/shared/info/90973261), the thing is the corePLUS deck has a sentence field with its furigana removed.
I also thought that it's possible to use corePLUS as my sentence deck itself through deck override (I'm referring to Anki's deck override, not MM's) so that I won't have to update my sentence deck everytime I change the sample sentences in the corePLUS deck. I also think that this is a more elegant solution.... but the problem is, does MM work with deck overrides?

Another potential issue here is the conclict regarding the interval of the card? Does MM scan notes? or cards? If it scans based on notes then my idea won't work as expected, if it scans cards then I'd definitely try it.
----------
Edited: 2015-08-17, 9:00 am
Reply
polyturn Wrote:Is it possible to set MM to ignore furigana? I'm guessing that it's messing with the optimizing of the order of the sentences. The Core sentences Cloze deck has it, I wish the Cloze Furigana tools had a 'batch' remove readings but it doesnt.
For future reference, you could copy your furgiana line to another field. (This can be done with the Bulk-copy field addon.) And then on your new field, do a find/replace on the furigana tags, replacing them with nothing. (Simple regex for this: "\[(.*?)\]".) Also might want to remove any additional spaces. And then make this stripped field be the one that MM looks at.
Edited: 2015-08-20, 8:05 pm
Reply
Thanks, I should really start learning regex.
Where does MM store particles btw? I can't find them on the dbs.

What causes the 'No Cards are due yet' thingy?
Edited: 2015-08-21, 9:17 pm
Reply
Is there any way to make it ignore words written in katakana, at least for the bury function? It's a little annoying when a card is marked a k+N of 2 just because some borrowed English word is counted as a "new" word.

EDIT:
For future reference, I decided to just search for the cards and use Ctrl+Shift+N to force it to let me learn them. To search, I used this ugly, slow list of terms:
Code:
unknowns:*゠* or unknowns:*ァ* or unknowns:*ア* or unknowns:*ィ* or unknowns:*イ* or unknowns:*ゥ* or unknowns:*ウ* or unknowns:*ェ* or unknowns:*エ* or unknowns:*ォ* or unknowns:*オ* or unknowns:*カ* or unknowns:*ガ* or unknowns:*キ* or unknowns:*ギ* or unknowns:*ク* or unknowns:*グ* or unknowns:*ケ* or unknowns:*ゲ* or unknowns:*コ* or unknowns:*ゴ* or unknowns:*サ* or unknowns:*ザ* or unknowns:*シ* or unknowns:*ジ* or unknowns:*ス* or unknowns:*ズ* or unknowns:*セ* or unknowns:*ゼ* or unknowns:*ソ* or unknowns:*ゾ* or unknowns:*タ* or unknowns:*ダ* or unknowns:*チ* or unknowns:*ヂ* or unknowns:*ッ* or unknowns:*ツ* or unknowns:*ヅ* or unknowns:*テ* or unknowns:*デ* or unknowns:*ト* or unknowns:*ド* or unknowns:*ナ* or unknowns:*ニ* or unknowns:*ヌ* or unknowns:*ネ* or unknowns:*ノ* or unknowns:*ハ* or unknowns:*バ* or unknowns:*パ* or unknowns:*ヒ* or unknowns:*ビ* or unknowns:*ピ* or unknowns:*フ* or unknowns:*ブ* or unknowns:*プ* or unknowns:*ヘ* or unknowns:*ベ* or unknowns:*ペ* or unknowns:*ホ* or unknowns:*ボ* or unknowns:*ポ* or unknowns:*マ* or unknowns:*ミ* or unknowns:*ム* or unknowns:*メ* or unknowns:*モ* or unknowns:*ャ* or unknowns:*ヤ* or unknowns:*ュ* or unknowns:*ユ* or unknowns:*ョ* or unknowns:*ヨ* or unknowns:*ラ* or unknowns:*リ* or unknowns:*ル* or unknowns:*レ* or unknowns:*ロ* or unknowns:*ヮ* or unknowns:*ワ* or unknowns:*ヰ* or unknowns:*ヱ* or unknowns:*ヲ* or unknowns:*ン* or unknowns:*ヴ* or unknowns:*ヵ* or unknowns:*ヶ* or unknowns:*ヷ* or unknowns:*ヸ* or unknowns:*ヹ* or unknowns:*ヺ* or unknowns:*・* or unknowns:*ー* or unknowns:*ヽ* or unknowns:*ヾ* or unknowns:*ヿ*
(auto-generated from the unicode table)
Edited: 2015-09-10, 6:34 pm
Reply
I tend to review cards that are marked 'comprehension', but I'd rather not review a card if I have already covered each morphene multiple times.

Is it possible to adjust the scheduling to review cards (or spot in the schedule/tags) that contain morphenes you only have a single card for? In other words work towards having two cards for each morphene twice, rather than once?

At the moment I tend to delete all the 999 cards (I believe this shedule is given by i+0 cards, with short length?). Then browse the other cards and see if I struggle with any of them. Note: I manually move cards to my 'Default' deck from many other decks which are being analysed by Morphman.
Reply
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.
Reply
I can't get it to work. When I do ctrl-M it does this:

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\rain\Documents\Anki\addons\morphman.py", line 6, in onMorphManRecalc
morph.main.main()
File "C:\Users\rain\Documents\Anki\addons\morph\main.py", line 265, in main
knownDb = updateNotes( allDb )
File "C:\Users\rain\Documents\Anki\addons\morph\main.py", line 230, in updateNotes
TAG.register( tagNames )
UnboundLocalError: local variable 'tagNames' referenced before assignment



I request aid.
Edited: 2015-10-05, 11:15 am
Reply
Fixed this error at least. I was searching for quotations of the error with the wrong line, and also didn't hit show redundant searches on google, thus searching for my error only came up with my own post.

Page 14 of the thread had tokyostyle and Aspiring give the answer. Thanks.

The RTK wiki kind of made it seem like it works out of the box and its like "Just press Ctrl+M and you're good to go" and doesn't even mention this error so...
Edited: 2015-10-07, 4:36 am
Reply
Any chance it would be possible to add the use of a tag like "priority" to make a certain card's words prioritized so that the card can be learned like priority.db does?
Reply