tokyostyle Wrote:If overture doesn't mind too much I'd love to move this setting into the config.py in MorphMan.Seems reasonable.
2013-04-09, 8:57 am
2013-04-14, 10:55 am
overture2112 Wrote:this message appear also to me, but I can't resolve itBoy.pockets Wrote:File "/Users/UserName/Documents/Anki/addons/morph/main.py", line 175, in updateNotesIt 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).
TAG.register( tagNames )
UnboundLocalError: local variable 'tagNames' referenced before assignment
tl;dr => you need to fix your config.py
2013-04-18, 11:40 am
I downloaded Morphman 3.3, edited config.py to only look at Subs2srs and Sentences note types, then ran Mprphman Calc. I got and error that "could not find file" so I instaled mecab from ubuntu repository. Now I get this error.
An error occurred in an add-on. Please contact the add-on author.
Traceback (most recent call last):
File "/home/yoxtuparai/Anki/addons/morphman.py", line 6, in onMorphManRecalc
morph.main.main()
File "/home/yoxtuparai/Anki/addons/morph/main.py", line 199, in main
allDb = mkAllDb( cur )
File "/home/yoxtuparai/Anki/addons/morph/main.py", line 57, in mkAllDb
ms = getMorphemes( fieldValue )
File "/home/yoxtuparai/Anki/addons/morph/util.py", line 119, in __call__
value = self.func(*args)
File "/home/yoxtuparai/Anki/addons/morph/morphemes.py", line 82, in getMorphemes
ms = [ tuple( m.split('\t') ) for m in interact( e ).split('\r') ] # morphemes
File "/home/yoxtuparai/Anki/addons/morph/util.py", line 119, in __call__
value = self.func(*args)
File "/home/yoxtuparai/Anki/addons/morph/morphemes.py", line 69, in interact
p.stdin.flush()
IOError: [Errno 32] Broken pipe
Any thoughts as what to do next?
EDIT:FIXED
there are two mecabs, i installed the other one, plus the python one to be safe.
An error occurred in an add-on. Please contact the add-on author.
Traceback (most recent call last):
File "/home/yoxtuparai/Anki/addons/morphman.py", line 6, in onMorphManRecalc
morph.main.main()
File "/home/yoxtuparai/Anki/addons/morph/main.py", line 199, in main
allDb = mkAllDb( cur )
File "/home/yoxtuparai/Anki/addons/morph/main.py", line 57, in mkAllDb
ms = getMorphemes( fieldValue )
File "/home/yoxtuparai/Anki/addons/morph/util.py", line 119, in __call__
value = self.func(*args)
File "/home/yoxtuparai/Anki/addons/morph/morphemes.py", line 82, in getMorphemes
ms = [ tuple( m.split('\t') ) for m in interact( e ).split('\r') ] # morphemes
File "/home/yoxtuparai/Anki/addons/morph/util.py", line 119, in __call__
value = self.func(*args)
File "/home/yoxtuparai/Anki/addons/morph/morphemes.py", line 69, in interact
p.stdin.flush()
IOError: [Errno 32] Broken pipe
Any thoughts as what to do next?
EDIT:FIXED
there are two mecabs, i installed the other one, plus the python one to be safe.
Edited: 2013-04-18, 12:22 pm
Advertising (Register to hide)
May 16 - 30 : Pretty Big Deal: Save 31% on all Premium Subscriptions!
- Sign up here
2013-04-26, 2:26 am
I installed Morpman 3.3 and ran calc to get this error:
Any help?
Code:
An error occurred in an add-on. Please contact the add-on author.
Traceback (most recent call last):
File "/home/user/Anki/addons/morphman.py", line 6, in onMorphManRecalc
morph.main.main()
File "/home/user/Anki/addons/morph/main.py", line 208, in main
updateNotes( allDb )
File "/home/user/Anki/addons/morph/main.py", line 175, in updateNotes
TAG.register( tagNames )
UnboundLocalError: local variable 'tagNames' referenced before assignment
2013-04-26, 12:52 pm
^ You need to setup config.py to include some Note types that you use in your deck.
2013-05-06, 8:08 pm
Since I've just finished my huge backlog I decided to finally upgrade to Morph Man 3.3. Anyway, I noticed that the "next new card feature" is prohibitively slow on my system. Like when I finish my normal reviews and get to new cards, I have just under a 2 minute wait till the next card shows up. :/
Seems like a nice option, but I think with my card count it's too slow an inefficient right now.
I love the Batch play option, could we get the option to customize that hotkey with the config in a later update?
Seems like a nice option, but I think with my card count it's too slow an inefficient right now.
I love the Batch play option, could we get the option to customize that hotkey with the config in a later update?
2013-05-06, 11:46 pm
Daichi Wrote:[...]currently, the best solution is to edit the hotkey in batchPlay.py
I love the Batch play option, could we get the option to customize that hotkey with the config in a later update?
2013-05-07, 8:30 pm
Aspiring, thanks for saving me the trouble of hunting for the key location myself.
Okay, here are a lot of minor nitpicks, but I've run into a lot of stuff in my past day of testing.
I noticed that the "Learn Now" feature queues up all versions of a particular card. For instance, I have reading and listening card types. I don't particularly see how this is useful or intended, if I want both, it's not hard to select both in the browser. It's also putting card type 2 before card type 1. Which in my case is the less useful order.
Dueling subtitle feature is pretty neat, it would be neat if there was a way to parse a monolingual Japanese sub with it. There is no reason why English is actually needed here.
Batch Play doesn't seem to always play in a sensible order. I think there should be an option to have it play it in the order it is listed in the browser. (If possible anyway.)
Okay, here are a lot of minor nitpicks, but I've run into a lot of stuff in my past day of testing.
I noticed that the "Learn Now" feature queues up all versions of a particular card. For instance, I have reading and listening card types. I don't particularly see how this is useful or intended, if I want both, it's not hard to select both in the browser. It's also putting card type 2 before card type 1. Which in my case is the less useful order.
Dueling subtitle feature is pretty neat, it would be neat if there was a way to parse a monolingual Japanese sub with it. There is no reason why English is actually needed here.
Batch Play doesn't seem to always play in a sensible order. I think there should be an option to have it play it in the order it is listed in the browser. (If possible anyway.)
2013-05-18, 9:22 am
Sorry, if this has already been answered, but how would I prevent Morphman from affecting my Core 2k/6k (the optimized one) study deck's review order/due date? I only want it to change the sort order of my subs2srs decks.
2013-05-18, 12:00 pm
edit config.py in anki apps folder
in model_overrides add:
'###': { 'enabled':False},
Replace ### with the Note Type of Core 2k/6k cards
in model_overrides add:
'###': { 'enabled':False},
Replace ### with the Note Type of Core 2k/6k cards
2013-06-28, 3:12 am
After updating to Anki 2.0.11 I'm noticing that the default Batch Play hotkey doesn't work. It seems to conflict with a Preview card dialog. Just mapped it to Ctrl+Shift+Z for now. Seems like a lot of convenient shortcuts are already taken.
2013-07-28, 4:16 am
I'm trying to understand this addon, I ran the recalc with a couple of models set up in my config, but only some cards got a vocab word in the "focusMorph" field. Is it my job to fill in this field when its missing?
2013-07-28, 2:32 pm
danelips Wrote:I'm trying to understand this addon, I ran the recalc with a couple of models set up in my config, but only some cards got a vocab word in the "focusMorph" field. Is it my job to fill in this field when its missing?The focusMorph is the new unknown word. The default settings in config.py make it so that morphman doesn't update the focusMorph of any sentence with more than two known morphemes (k+2). Morphman is set to only update the focusMorph of k+1 sentences
If you know every word of any given sentence, it's already somewhere in your known anki words so no focusMorphs are noted.
You can see the default settings in 'config.py' and see some feature explanations or enable/disable them
When you go into the browser you'll see in the 'Due' column that 1-9999 is k+0, 10000-19999 is k+1, 20000-29999 is k+2, and so on (gradually increasing in difficulty)
Generally you want to focus on the 10000-19999 cards (the assumed optimal learning rate, one new word at a time)
You can either suspend known cards or set 'next next card feature' and/or 'new card merged fill' to True (config.py) to skip any redundant sentences.
Edited: 2013-07-28, 2:43 pm
2013-07-30, 8:18 am
Ok, I think that I have it working, thanks for being so helpful. I have a few more questions if you don't mind:
Why are so many cards tagged 999-9999 Cards and won't they be shown before the optimal 10000-19999 cards?
Do you need to add the fields and enable the deck to get your cards sorted? Can morphman just use its database to keep track of the unknowns etc?
I want morphman to recognize my cards in japanese core 2000, but not mess with the order. Do I need to add the fields and enable in the config for it to do anything? Or is it just working automatically that way?
Why are so many cards tagged 999-9999 Cards and won't they be shown before the optimal 10000-19999 cards?
Do you need to add the fields and enable the deck to get your cards sorted? Can morphman just use its database to keep track of the unknowns etc?
I want morphman to recognize my cards in japanese core 2000, but not mess with the order. Do I need to add the fields and enable in the config for it to do anything? Or is it just working automatically that way?
2013-07-30, 5:52 pm
danelips Wrote:Why are so many cards tagged 999-9999 Cards and won't they be shown before the optimal 10000-19999 cards?Sentences with a difficulty between 999-9999 have zero new words to learn. You've already learned the words within those sentences and are thus redundant. Yeah, they'll be shown first. You could suspend them all, but there are features in config.py that skip these cards.
Quote:Do you need to add the fields and enable the deck to get your cards sorted? Can morphman just use its database to keep track of the unknowns etc?In config.py find:
Code:
'next new card feature':True, # skip cards with focusMorph that was already seen or aren't k+1
'new card merged fill':False, # fill new card queue with cards from all child decks instead of sequentially. also enforce a minimum due value
'new card merged fill min due':10000, # k+1 by default. this mostly is to boost performance of 'next new card feature'Quote:I want morphman to recognize my cards in japanese core 2000, but not mess with the order. Do I need to add the fields and enable in the config for it to do anything? Or is it just working automatically that way?The fields allow you to view information such as how much you know, what's mature, etc.
Code:
'k+N':u'k+N', # stores how many unknowns
'm+N':u'm+N', # stores how many unmatures
'morphManIndex':u'morphManIndex', # created an ordering to learn cards in. this is the value new card 'due' times are set to
'focusMorph':u'focusMorph', # holds the unknown for k+0 sentences but goes away once m+0
'unknowns':u'unknowns', # comma seperated list of morphemes that are unknown
'unmatures':u'unmatures', # likewise for unmatures
'unknownFreq':u'unknownFreq', # average of how many times the unknowns appear in your collectionTo export core 2k without ordering:
1. Extract known morphemes
Go to browser
Select all known in core 2k deck
Edit -> Extract morpheme (ctrl + Shift + E)
Save. Automatically saved as 'extractedMorphemes.db;
2.If you only wish to export Core 2k information, save the file as 'external.db'. This will be added into your database as external knowledge.
3. If there are multiple decks you wish to add [without re-ordering them], create and merge multiple extractedMorphemes
Create extractedMorphemes1.db, extractedMorphemes2.db, etc
Go to main anki screen
Tools -> Morphman Manager
Browse for DB A [database A]: extractedMorphemes1.db
Browse for DB B [database B]: extractedMorphemes2.db
Create 'Union' [combine the two]: save results as 'external.db'
Edited: 2013-07-30, 7:57 pm
2013-07-30, 6:09 pm
That clears a lot of things up, thanks so much. I'm really excited about this addon, I used to have to be so careful about not importing to many subs2srs because of the work involved in suspending/deleting cards. Now I can dump whole seasons of drama in there!
2013-07-30, 8:49 pm
No problem, glad to help.
[Amazing addon. Big ups to overture]
[Amazing addon. Big ups to overture]
Edited: 2013-07-30, 9:00 pm
2013-08-23, 5:54 pm
I have a lot of mature card that I created before I installed the plugin and almost all cards have low correct answer(50%~60%).
If I delete these card the know morpheme stay in the automatic generated DBs? If so, how to automatic delete the morphemes from the automatic generated DBs to relearn then from new setences?
If I delete these card the know morpheme stay in the automatic generated DBs? If so, how to automatic delete the morphemes from the automatic generated DBs to relearn then from new setences?
2013-09-11, 5:52 pm
henryohara Wrote:If I delete these card the know morpheme stay in the automatic generated DBs? If so, how to automatic delete the morphemes from the automatic generated DBs to relearn then from new setences?i ve only just installed the plugin, but i think you can do that with the morphman manager.
-first select all bad cards containing the morphs you want to delete from the database
-then export morphemes
-then load known.db as db A
-load exported morphemes as db B
-click A-B
-save results as known.db
i have a separate question, is it normal if i dont get prompted to merge with known.db ?
whenever i export morphemes, wether from the extract menu or the MMmanager, i only get to save to whatever db name i choose, but no prompt for merge.
i end up merging every manual export with external.db. is that normal or did i miss something ?
Edited: 2013-09-13, 5:28 am
2013-12-04, 7:25 pm
Is there an easy way to export morphs from the mature database to a text file? Specifically I want to make use of the awesome feature cb4960 was kind enough to add to his Text Analysis Tool.
cb4960 Wrote:Hello,
I have just released version 4.0 of cb's Japanese Text Analysis Tool.
Download cb's Japanese Text Analysis Tool v4.0 via SourceForge
What Changed?
● Added the User-based Readability Report option.
Using a list of words that the user already knows, this report can help to determine readability of a text based on the percentage of words in the text that the user already knows.
Name: user_based_readability_report.txt
Format:
Field 1: Readability expressed as a percentage (0-100) of the total number
of non-unique known words vs. the total number of non-unique words.
Field 2: Total number of non-unique words
Field 3: Total number of non-unique known words
Field 4: Total number of non-unique unknown words
Field 5: Readability expressed as a percentage (0-100) of the total number
of unique known words vs. the total number of unique words.
Field 6: Total number of unique words
Field 7: Total number of unique known words
Field 8: Total number of unique unknown words
Field 9: Filename
Report is sorted based on Readability (Field 1).
To generate this report, the "File that contains a list of words that you already know" option must be filled in. If a line contains multiple tab-separated columns, then the word is assumed to be in the first column.
2013-12-17, 12:35 pm
Thanks to Aspiring for helping out in my absence.
A bit late for some of these, but to answer questions above for any future readers:
The 'set due based on mmi' config option determines whether card due times are managed by MorphMan. It defaults to True, so you can either set this to False for your Core 2k model, or set it to False in the global option and selectively make it True for your subs2srs model.
As long as the Core2k stuff is still 'enabled' in general, MorphMan will factor it into known/mature information and manipulate the order of any cards which are both 'enabled' and 'set due based on mmi' accordingly.
0) In the config make sure 'saveDbs' is True (iirc, it should be by default)
1) Open Manager and open mature.db database
2) Select all the text in the window and save it in a text editor
* You may want to choose to just show the morphemes (1 column style) instead of the default (4 column style).
A bit late for some of these, but to answer questions above for any future readers:
Daichi Wrote:I noticed that the "Learn Now" feature queues up all versions of a particular card...Yes it does. For my setup getting all the cards for a note is useful, but I can definitely see how this would be better as an option and by default to instead treat your selection as individual cards.
Daichi Wrote:Batch Play doesn't seem to always play in a sensible order. I think there should be an option to have it play it in the order it is listed in the browser. (If possible anyway.)I'm fairly surprised I've never run into an issue with this, but yes, the ordering is potentially fairly arbitrary (it's the hash order of the python dictionary of media file names). It shouldn't be hard to re-implement it in a way that preserves ordering.
Daichi Wrote:Dueling subtitle feature is pretty neat, it would be neat if there was a way to parse a monolingual Japanese sub with it. There is no reason why English is actually needed here.I'm not sure what you mean here. If you mean to avoid English entirely, you can change the format strings to do so. If you mean to provide a gloss for the Japanese so that avoiding the English is more viable, then that can't be done at the moment but it's a good idea to add.
koikopi2637 Wrote:Sorry, if this has already been answered, but how would I prevent Morphman from affecting my Core 2k/6k (the optimized one) study deck's review order/due date? I only want it to change the sort order of my subs2srs decks.[ This applies to version 3.5+ which hasn't been released yet ]
The 'set due based on mmi' config option determines whether card due times are managed by MorphMan. It defaults to True, so you can either set this to False for your Core 2k model, or set it to False in the global option and selectively make it True for your subs2srs model.
As long as the Core2k stuff is still 'enabled' in general, MorphMan will factor it into known/mature information and manipulate the order of any cards which are both 'enabled' and 'set due based on mmi' accordingly.
mrbryce Wrote:i have a separate question, is it normal if i dont get prompted to merge with known.db ?...i end up merging every manual export with external.db. is that normal or did i miss something ?Yes. I removed the auto-merge-with-knowns feature in the 3.0 rewrite which made known.db get recalculated from scratch constantly. I should have added it back once the external.db idea was add later though.
Daichi Wrote:Is there an easy way to export morphs from the mature database to a text file? Specifically I want to make use of the awesome feature cb4960 was kind enough to add to his Text Analysis Tool.Yes.
0) In the config make sure 'saveDbs' is True (iirc, it should be by default)
1) Open Manager and open mature.db database
2) Select all the text in the window and save it in a text editor
* You may want to choose to just show the morphemes (1 column style) instead of the default (4 column style).
Edited: 2013-12-17, 12:44 pm
2014-02-05, 9:33 pm
Is Morphman usable with Chinese?
2014-02-05, 9:52 pm
lesson17lesson17 Wrote:Is Morphman usable with Chinese?Not out of the box, but if you had a Chinese equivalent of `mecab` (the Japanese morphological analysis tool that MorphMan uses) then it could probably be adapted.
2014-02-06, 7:09 pm
overture2112 Wrote:What if the Chinese sentences were pre-segmented?lesson17lesson17 Wrote:Is Morphman usable with Chinese?Not out of the box, but if you had a Chinese equivalent of `mecab` (the Japanese morphological analysis tool that MorphMan uses) then it could probably be adapted.
2014-02-06, 10:49 pm
lesson17lesson17 Wrote:You'd lose out on the part-of-speech stuff, but otherwise it could work. Try looking at morphemes.py and rewriting `getMorphemes`.overture2112 Wrote:What if the Chinese sentences were pre-segmented?lesson17lesson17 Wrote:Is Morphman usable with Chinese?Not out of the box, but if you had a Chinese equivalent of `mecab` (the Japanese morphological analysis tool that MorphMan uses) then it could probably be adapted.
