#NEWLINE# def __init__( self , corpusPath , modelPath , tokenRegex = '\\w{3,}' , numTopics = 20 , numIters = 1000 , MALLET_PATH = 'tools/mallet' ) : #NEWLINE# #INDENT# with ImportMalletCorpus ( corpusPath , modelPath ) as importer : #NEWLINE# #INDENT# importer . ImportFileOrFolder ( tokenRegex ) #NEWLINE# #UNINDENT# with TrainMalletLDA ( modelPath , modelPath ) as builder : #NEWLINE# #INDENT# builder . TrainTopics ( numTopics , numIters )