<s> """<STR_LIT>""" <EOL> import platform <EOL> import warnings <EOL> from ldacgsseq import * <EOL> from ldacgsmulti import * <EOL> from ldafunctions import load_lda <EOL> __all__ = [ '<STR_LIT>' ] <EOL> class LDA ( object ) : <EOL> """<STR_LIT>""" <EOL> def __new__ ( cls , <EOL> corpus = None , context_type = None , <EOL> K = <NUM_LIT:20> , V = <NUM_LIT:0> , alpha = [ ] , beta = [ ] , <EOL> multiprocessing = False , seed_or_seeds = None , n_proc = None ) : <EOL> kwargs = dict ( corpus = corpus , context_type = context_type , <EOL> K = K , V = V , alpha = alpha , beta = beta ) <EOL> if multiprocessing and platform . system ( ) != '<STR_LIT>' : <EOL> if n_proc is not None : <EOL> kwargs [ '<STR_LIT>' ] = n_proc <EOL> if seed_or_seeds is not None and not isinstance ( seed_or_seeds , int ) : <EOL> kwargs [ '<STR_LIT>' ] = seed_or_seeds <EOL> return LdaCgsMulti ( ** kwargs ) <EOL> else : <EOL> if multiprocessing and platform . system ( ) == '<STR_LIT>' : <EOL> warnings . warn ( """<STR_LIT>""" , RuntimeWarning ) <EOL> if seed_or_seeds is not None and not isinstance ( seed_or_seeds , int ) : <EOL> seed_or_seeds = seed_or_seeds [ <NUM_LIT:0> ] <EOL> warnings . warn ( "<STR_LIT>" + <EOL> str ( seed_or_seeds ) , RuntimeWarning ) <EOL> if isinstance ( seed_or_seeds , int ) : <EOL> kwargs [ '<STR_LIT>' ] = seed_or_seeds <EOL> elif seed_or_seeds is not None : <EOL> raise ValueError ( "<STR_LIT>" + <EOL> "<STR_LIT>" ) <EOL> return LdaCgsSeq ( ** kwargs ) <EOL> @ staticmethod <EOL> def load ( filename , multiprocessing = False , n_proc = None ) : <EOL> """<STR_LIT>""" <EOL> if multiprocessing and platform . system ( ) != '<STR_LIT>' : <EOL> return load_lda ( filename , LdaCgsMulti ) <EOL> else : <EOL> if platform . system ( ) == '<STR_LIT>' : <EOL> warnings . warn ( """<STR_LIT>""" , RuntimeWarning ) <EOL> return load_lda ( filename , LdaCgsSeq ) </s>
