Module Import alias Import alias Import alias ImportFrom alias FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr IfExp NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad Str attr NameLoad Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr Str If BoolOpOr NameLoad UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Expr Call NameLoad NameLoad NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad orelse Expr Call AttributeLoad NameLoad attr Str NameLoad decorator_list FunctionDef arguments args defaults body Assign NameStore Call AttributeLoad NameLoad attr keyword Str Expr Call AttributeLoad NameLoad attr Str keyword NameLoad keyword Str Expr Call AttributeLoad NameLoad attr Str keyword NameLoad keyword Str Expr Call AttributeLoad NameLoad attr Str keyword NameLoad keyword Str keyword Str keyword Str Expr Call AttributeLoad NameLoad attr Str keyword NameLoad keyword Num keyword Str Expr Call AttributeLoad NameLoad attr Str keyword NameLoad keyword Num keyword Str Expr Call AttributeLoad NameLoad attr Str keyword NameLoad keyword Num keyword Str Expr Call AttributeLoad NameLoad attr Str keyword NameLoad keyword NameLoad keyword Str keyword Str Expr Call AttributeLoad NameLoad attr Str keyword NameLoad keyword NameLoad keyword Str keyword Str Assign NameStore Call AttributeLoad NameLoad attr Expr Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list If CompareEq NameLoad Str body Expr Call NameLoad
N/A N/A argparse N/A logging N/A os modellers.MalletLDA BuildMultipleLDAs TrainMalletN N/A N/A corpus_path model_path token_regex num_topics num_iters num_models is_quiet force_overwrite N/A N/A N/A logger N/A N/A logging getLogger termite N/A N/A N/A logger addHandler N/A N/A logging StreamHandler N/A N/A N/A logger setLevel N/A is_quiet N/A logging INFO N/A logging DEBUG N/A corpus_filename N/A N/A {}/corpus.txt format corpus_path N/A N/A N/A logger info -------------------------------------------------------------------------------- N/A N/A N/A logger info Training an LDA topic model using MALLET... N/A N/A N/A logger info        corpus = %s corpus_filename N/A N/A N/A logger info         model = %s model_path N/A N/A N/A logger info   token_regex = %s token_regex N/A N/A N/A logger info        topics = %s num_topics N/A N/A N/A logger info         iters = %s num_iters N/A N/A N/A logger info        models = %s num_models N/A N/A N/A logger info -------------------------------------------------------------------------------- N/A N/A force_overwrite N/A N/A N/A N/A os path exists model_path N/A N/A N/A BuildMultipleLDAs corpus_filename model_path tokenRegex token_regex numTopics num_topics numIters num_iters numModels num_models N/A N/A N/A N/A logger info     Already exists: %s model_path N/A main N/A N/A N/A N/A N/A parser N/A N/A argparse ArgumentParser description Train an LDA topic model using MALLET. N/A N/A N/A parser add_argument corpus_path type str help Input folder containing the text corpus as "corpus.txt" N/A N/A N/A parser add_argument model_path type str help Output model folder N/A N/A N/A parser add_argument --token-regex type str default \w{3,} help Tokenization dest token_regex N/A N/A N/A parser add_argument --topics type int default 20 help Number of topics N/A N/A N/A parser add_argument --iters type int default 1000 help Number of iterations N/A N/A N/A parser add_argument --models type int default 50 help Number of models N/A N/A N/A parser add_argument --quiet const True default False help Show fewer debugging messages action store_const N/A N/A N/A parser add_argument --overwrite const True default False help Overwrite any existing model action store_const N/A args N/A N/A parser parse_args N/A N/A TrainMalletN N/A args corpus_path N/A args model_path N/A args token_regex N/A args topics N/A args iters N/A args models N/A args quiet N/A args overwrite N/A N/A N/A __name__ __main__ N/A N/A N/A main