Untitled diff

Created Diff never expires
58 removals
Lines
Total
Removed
Words
Total
Removed
To continue using this feature, upgrade to
Diffchecker logo
Diffchecker Pro
120 lines
13 additions
Lines
Total
Added
Words
Total
Added
To continue using this feature, upgrade to
Diffchecker logo
Diffchecker Pro
80 lines
#-*- coding: utf-8 -*-
#-*- coding: utf-8 -*-
import os
import os
from aqt import mw # this script isn't imported until profile is loaded
from aqt import mw # this script isn't imported until profile is loaded


# 4th (lowest) priority
# 4th (lowest) priority
default = {
default = {
'path_dbs': os.path.join( mw.pm.profileFolder(), 'dbs' ),
'path_dbs': os.path.join( mw.pm.profileFolder(), 'dbs' ),
'path_priority': os.path.join( mw.pm.profileFolder(), 'dbs', 'priority.db' ),
'path_ext': os.path.join( mw.pm.profileFolder(), 'dbs', 'external.db' ),
'path_ext': os.path.join( mw.pm.profileFolder(), 'dbs', 'external.db' ),
'path_all': os.path.join( mw.pm.profileFolder(), 'dbs', 'all.db' ),
'path_all': os.path.join( mw.pm.profileFolder(), 'dbs', 'all.db' ),
'path_mature': os.path.join( mw.pm.profileFolder(), 'dbs', 'mature.db' ),
'path_mature': os.path.join( mw.pm.profileFolder(), 'dbs', 'mature.db' ),
'path_known': os.path.join( mw.pm.profileFolder(), 'dbs', 'known.db' ),
'path_known': os.path.join( mw.pm.profileFolder(), 'dbs', 'known.db' ),
'path_seen': os.path.join( mw.pm.profileFolder(), 'dbs', 'seen.db' ),
'path_seen': os.path.join( mw.pm.profileFolder(), 'dbs', 'seen.db' ),
'path_log': os.path.join( mw.pm.profileFolder(), 'morphman.log' ),
'path_log': os.path.join( mw.pm.profileFolder(), 'morphman.log' ),
'path_stats': os.path.join( mw.pm.profileFolder(), 'morphman.stats' ),
# change the thresholds for various stages of maturity, in days
# change the thresholds for various stages of maturity, in days
'threshold_mature': 21, # 21 days is what Anki uses
'threshold_mature': 21, # 21 days is what Anki uses
'threshold_known': 10/86400., # recommend a few seconds if you want to count things in learning queue or ~3 days otherwise
'threshold_known': 10/86400., # recommend a few seconds if you want to count things in learning queue or ~3 days otherwise
'threshold_seen': 1/86400., # this currently isn't used outside of create seen.db for your personal usage
'threshold_seen': 1/86400., # this currently isn't used outside of create seen.db for your personal usage
'text file import maturity':22, # when you import a file via Extract Morphemes from file, they are all given this maturity
'text file import maturity':22, # when you import a file via Extract Morphemes from file, they are all given this maturity
# reviewer mode keybindings
# reviewer mode keybindings
'browse same focus key': 'l',
'browse same focus key': 'l',
'set known and skip key': 'k',
'set known and skip key': 'k',
'auto skip alternatives': True,
'print number of alternatives skipped': True, # after answering or skipping a card in reviewer
'print number of alternatives skipped': True, # after answering or skipping a card in reviewer


# database saving/loading. you can disable these for performance reasons but their semantics are uninitutive
# database saving/loading. you can disable these for performance reasons but their semantics are uninitutive
# for example: features like morphHighlight always try to load all.db and expect it to be up to date
# for example: features like morphHighlight always try to load all.db and expect it to be up to date
# so not saving all.db and having it load an out of date copy many produce strange behavior
# so not saving all.db and having it load an out of date copy many produce strange behavior
'loadAllDb':True, # whether to load existing all.db when recalculating or create one from scratch
'loadAllDb':True, # whether to load existing all.db when recalculating or create one from scratch
'saveDbs':True, # whether to save all.db, known.db, mature.db, and seen.db
'saveDbs':True, # whether to save all.db, known.db, mature.db, and seen.db


# only these can have model overrides
# only these can have model overrides
'enabled':False, # whether to analyze notes of a given model, modify their fields, and manipulate due time by Morph Man Index
'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':False, # (CAN BE OVERRIDDEN in elements of overrides) 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
# field names to store various information
# field names to store various information
'k+N':u'k+N', # stores how many unknowns
'k+N':u'k+N', # stores how many unknowns
'm+N':u'm+N', # stores how many unmatures
'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
'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
'focusMorph':u'focusMorph', # holds the unknown for k+0 sentences but goes away once m+0
'mx0':u'mx0', # from DARKJAP
'mx0':u'mx0',
'k1e':u'k1e', # from DARKJAP
'k1e':u'k1e',
'outlier':u'outlier', # from DARKJAP
'outlier':u'outlier',
'unknowns':u'unknowns', # comma seperated list of morphemes that are unknown
'unknowns':u'unknowns', # comma seperated list of morphemes that are unknown
'unmatures':u'unmatures', # likewise for unmatures
'unmatures':u'unmatures', # likewise for unmatures
'unknownFreq':u'unknownFreq', # average of how many times the unknowns appear in your collection
'unknownFreq':u'unknownFreq', # average of how many times the unknowns appear in your collection
# analyze notes based on the morphemes in these fields
# analyze notes based on the morphemes in these fields
'morph_fields': [],
'morph_fields': [u'Expression'],
# tag names for marking the state of notes
# tag names for marking the state of notes
# the following three are mutually exclusive and erase eachother upon promotion/demotion
# the following three are mutually exclusive and erase each other upon promotion/demotion
'tag_comprehension':u'comprehension', # set once all morphs for note are mature
'tag_comprehension':u'comprehension', # set once all morphs for note are mature
'tag_vocab':u'vocab', # set once all but 1 morph for note is known
'tag_vocab':u'vocab', # set once all but 1 morph for note is known
'tag_notReady':u'notReady', # set for k+2 and above cards
'tag_notReady':u'notReady', # set for k+2 and above cards
'tag_alreadyKnown':u'alreadyKnown', # you can add this tag to a note to make anki treat it as if mature
'tag_alreadyKnown':u'alreadyKnown', # you can add this tag to a note to make anki treat it as if mature
'tag_priority':u'priority', # set if note contains an unknown that exists in priority.db
'tag_badLength':u'badLength', # set if sentence isn't within optimal sentence length range
'tag_tooLong':u'tooLong', # set if sentence is above optimal sentence length
# controls for morpheme analysis
# controls for morpheme analysis
'morph_blacklist': [ u'記号', u'UNKNOWN'], # you probably don't care about punctuation and things mecab couldn't parse
'morph_blacklist': [ u'記号', u'UNKNOWN'], # you probably don't care about punctuation and things mecab couldn't parse
# try playing fields in this order when using batch media player
# try playing fields in this order when using batch media player
'batch media fields': [ u'Video', u'Audio' ],
'batch media fields': [ u'Video', u'Sound' ],
# configure morph man index algorithm
# configure morph man index algorithm
'optimal sentence length': 4, # +1000 MMI per morpheme more/less than this after the first 2
'optimal sentence length': 4,
'reinforce new vocab weight': 5.0, # -reinforce_weight / maturity MMI per known that is not yet mature
'verb bonus': 100, # -verb_bonus if at least one unknown is a verb
'priority.db weight': 200, # -priority_weight per unknown that exists in priority.db
# lite update
# lite update
'only update k+2 and below': False, # this reduces how many notes are changed and thus sync burden by not updating notes that aren't as important
'only update k+2 and below': False, # this reduces how many notes are changed and thus sync burden by not updating notes that aren't as important
'only update m+1 and below': False, # from dark_jap
'only update m+1 and below': False,


# only these can have deck overrides
# only these can have deck overrides
'next new card feature':True, # skip cards with focusMorph that was already seen or aren't k+1
'next new card feature':False, # 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':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'
'new card merged fill min due':10000, # k+1 by default. this mostly is to boost performance of 'next new card feature'
}
}
# Can override anything. 3rd priority
# Can override anything. 3rd priority
profile_overrides = {
profile_overrides = {
# 'User 1': { 'enabled':False },
'Z_For Media files': { 'enabled':False },
'Z_EXP': { 'enabled':False },
'UxLearning': { 'enabled':False },
}
}


# Model overrides can only override the entries marked above. 2nd priority
# Model overrides can only override the entries marked above. 2nd priority
# Settings for the configuration of optimizing my SENTENCES deck
model_overrides = {
model_overrides = {
#'subs2srs': { 'enabled':True },
'Japanese-1b811 example_sentences': { 'enabled':True, 'morph_fields': [u'Expression_Original_Unedited'], }, #Vocab Deck
#'JtMW': { 'enabled':True },
'Japanese_OLD_KDamage-15AUG2015': { 'enabled':True, 'morph_fields': [u'Kanji'], }, #Kanji Deck
'Japanese (Tae Kim)-fe2c8': { 'enabled':True, 'morph_fields': [u'ConceptTK'], }, #Tae Kim Deck
'日本語文法辞典例文全集-2682b': { 'enabled':True, 'morph_fields': [u'grammatical concept'] },
# 'Core Cloze': { 'enabled':True, 'set due based on mmi': True, },
'Core Cloze': { 'enabled':True, 'morph_fields': [u'Sentence_Stripped_C_Cloze'], 'set due based on mmi': True, }, #Sentence Deck
'Songs_Cloze Japanese': { 'enabled':True, 'morph_fields': [u'Stripped_Sentence'], 'set due based on mmi': True, }, #Songs
'Tanuki-Ultima': { 'enabled':True, 'morph_fields': [u'Japanese - Definition (Kanji)', u'Vocabulary Word (Kanji)'], 'set due based on mmi': True, }, #J-J Deck
# 'Core Cloze': { 'morph_fields': [u'Expression_CORE'], 'set due based on mmi': True, },
# 'Tanuki-Ultima': { 'morph_fields': [u'Japanese - Definition (Kanji)'], 'set due based on mmi': True, },
}
}


# Settings for the configuration of optimizing my ""VOCAB DECK""
#'Japanese-024b4': -> Kanji
# Japanese-1b811 example_sentences-03c20d' -> Vocab
#model_overrides = {
# 'Japanese-024b4': { 'enabled':True, 'morph_fields': [u'Kanji'],},
# 'Japanese-1b811 example_sentences-03c20d': { 'set due based on mmi': True, 'morph_fields': [u'Expression'], },
#'Tae Kim Cloze': { 'enabled':True, 'morph_fields': [u'ConceptTK'] },
#'Core Cloze': { 'enabled':True, 'set due based on mmi': True, },
#'Core Cloze': { 'morph_fields': [u'Expression_CORE'], 'set due based on mmi': True, },
#}

# Deck overrides can only override 'new card merged fill' options. 1st priority
# Deck overrides can only override 'new card merged fill' options. 1st priority
deck_overrides = {
deck_overrides = {
'Sentences': { 'new card merged fill':True },
#'subs2srs': { 'new card merged fill':False },
'Sentences::subs2srs': { 'new card merged fill':True },
'Sentences::vn2srs': { 'new card merged fill':True },
'ExtraVocab': { 'new card merged fill':True },
'ExtraVocab::_Yotsubato': { 'new card merged fill':True },
'ExtraVocab::_Kore': { 'new card merged fill':True },
}
}