Did I find the right examples for you? yes no

All Samples(23)  |  Call(15)  |  Derive(0)  |  Import(8)

src/j/a/JapaneseStudy-HEAD/anki/plugins/morphman2/morph/setMatch.py   JapaneseStudy(Download)
from PyQt4.QtCore import *
from PyQt4.QtGui import *
import util
from util import infoMsg, errorMsg
import matchingLib as ML
   g = ML.Graph()
   g.mkMatch( pairs )
   infoMsg( '%d possible pairings for %d/%d morphemes to %d/%d facts, %s. Calculating now...' % ( len(pairs), len(A), len(allM), len(B), len(allF), g.complexity() ), p=st['ed'] )
   return g.doMatch()
   ps = getMatches( st, allM, allF )
   infoMsg( 'Successfully matched %d pairs.' % len(ps), p=st['ed'] )
   for m,f in ps: f['matchedMorpheme'] = u'%s' % m.base
   infoMsg( 'Saved' )

src/j/a/JapaneseStudy-HEAD/anki/plugins/morphman3/morph/extractMorphemes.py   JapaneseStudy(Download)
#-*- coding: utf-8 -*-
import os
from morphemes import AnkiDeck, MorphDb, getMorphemes, ms2str
from util import addBrowserSelectionCmd, cfg, cfg1, mw, infoMsg, QFileDialog
def post( st ):
    st['morphDb'].save( st['dbpath'] )
    infoMsg( 'DB saved with extracted morphemes' )
addBrowserSelectionCmd( 'Extract Morphemes', pre, per, post, tooltip='Extract morphemes in selected notes to a MorphMan db', shortcut=('Ctrl+Shift+E',) )

src/j/a/JapaneseStudy-HEAD/anki/plugins/morphman2/morph/manager.py   JapaneseStudy(Download)
import morphemes as M
import util
from util import errorMsg, infoMsg, deckDbPath
def getPath( le ):
            errorMsg( 'Unable to stop auto' )
        infoMsg( 'Restarted' )
    def stopAuto( self ):
            infoMsg( 'Auto stopping' )
        except AttributeError: # no updater instance yet
            infoMsg( 'Auto never started' )
            infoMsg( 'Auto never started' )
        except ValueError: # bad tid
            infoMsg( 'Auto already stopped' )
        except ThreadError: # not active
            infoMsg( 'Auto already stopped' )

src/j/a/JapaneseStudy-HEAD/anki/plugins/morphman3/morph/viewMorphemes.py   JapaneseStudy(Download)
#-*- coding: utf-8 -*-
from morphemes import getMorphemes, ms2str
from util import addBrowserSelectionCmd, cfg, cfg1, infoMsg
def pre( b ): return { 'txt':'' }
def post( st ):
    ms = getMorphemes( st['txt'], None, cfg1('morph_blacklist') )
    s = ms2str( ms )
    infoMsg( '----- All -----\n' + s )

src/j/a/JapaneseStudy-HEAD/anki/plugins/morphman3/morph/manager.py   JapaneseStudy(Download)
import adaptiveSubs
from morphemes import MorphDb
from util import dbsPath, errorMsg, infoMsg, mw, parseWhitelist, cfg1
def getPath( le ): # LineEdit -> GUI ()
        adaptiveSubs.run( inFile, outFile, ws, bs, mFmt, kFmt, uFmt )
        infoMsg( 'Completed successfully' )
class MorphMan( QDialog ):
        if db:
            db.save( str(destPath) )
            infoMsg( 'Extracted successfully' )
    def onSaveResults( self ):
        destPath = QFileDialog.getSaveFileName( caption='Save results to?', directory=dbsPath + os.sep + 'results.db' )
        if not destPath: return
        if not hasattr( self, 'db' ): return errorMsg( 'No results to save' )
        self.db.save( str(destPath) )
        infoMsg( 'Saved successfully' )

src/j/a/JapaneseStudy-HEAD/anki/plugins/morphman3/morph/main.py   JapaneseStudy(Download)
import time
from anki.utils import splitFields, joinFields, stripHTML, intTime, fieldChecksum
from morphemes import MorphDb, AnkiDeck, getMorphemes
from util import printf, mw, memoize, cfg, cfg1, partial, errorMsg, infoMsg

src/j/a/JapaneseStudy-HEAD/anki/plugins/morphman3/morph/massTagger.py   JapaneseStudy(Download)
#-*- coding: utf-8 -*-
from morphemes import getMorphemes, ms2str, MorphDb
from util import addBrowserSelectionCmd, cfg, cfg1, infoMsg, QInputDialog, QFileDialog, QLineEdit
import util

src/j/a/JapaneseStudy-HEAD/anki/plugins/morphman2/morph/massTagger.py   JapaneseStudy(Download)
from PyQt4.QtCore import *
from PyQt4.QtGui import *
from anki.utils import addTags, canonifyTags
import util
from util import infoMsg, errorMsg