Module ImportFrom alias ImportFrom alias Import alias identifier FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults Num Num body Expr Str Assign NameStore Call NameLoad keyword NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad NameLoad NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Return TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Str Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr keyword NameLoad Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr keyword NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad Assign SubscriptStore NameLoad Index Str Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Assign SubscriptStore NameLoad Index Str Call AttributeLoad NameLoad attr ListComp AttributeLoad NameLoad attr comprehension NameStore NameLoad Assign SubscriptStore NameLoad Index Str Call AttributeLoad NameLoad attr Assign SubscriptStore NameLoad Index Str Call NameLoad SubscriptLoad NameLoad Index Str Assign SubscriptStore NameLoad Index Str Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad keyword AttributeLoad NameLoad attr Assign SubscriptStore NameLoad Index Str Call AttributeLoad NameLoad attr ListComp AttributeLoad NameLoad attr comprehension NameStore NameLoad Assign SubscriptStore NameLoad Index Str NameLoad Assign SubscriptStore NameLoad Index Str NameLoad Assign SubscriptStore NameLoad Index Str BinOpAdd BinOpMult Call AttributeLoad NameLoad attr Call NameLoad SubscriptLoad NameLoad Index Str Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Assign SubscriptStore NameLoad Index Str NameLoad Assign SubscriptStore NameLoad Index Str Call NameLoad SubscriptLoad NameLoad Index Str Assign SubscriptStore NameLoad Index Str Call NameLoad SubscriptLoad NameLoad Index Str Assign SubscriptStore NameLoad Index Str Call NameLoad SubscriptLoad NameLoad Index Str Assign SubscriptStore NameLoad Index Str NameLoad Expr Str Print Str NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Assign NameStore ListLoad For NameStore NameLoad body Assign NameStore ListLoad For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad If NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Return Call AttributeLoad NameLoad attr NameLoad decorator_list If CompareEq NameLoad Str body ImportFrom alias Assign NameStore Str Assign NameStore Call AttributeLoad NameLoad attr BinOpAdd NameLoad Str Assign NameStore Str Assign NameStore Str Assign TupleStore NameStore NameStore Call NameLoad NameLoad BinOpAdd NameLoad Str NameLoad Num Num BinOpAdd NameLoad Str Num Num Expr Call NameLoad NameLoad NameLoad BinOpAdd NameLoad Str BinOpAdd NameLoad Str
N/A FileReadWrite * py4j.java_gateway JavaGateway N/A numpy np lda_run N/A N/A corp corpfile ctx_type iterations K metafile alpha beta N/A 0.01 0.01 N/A N/A 
    corp : `vsm.Corpus`
    corpfile : fname, '
' indicates ctx breaks (tokenizaiton).
    ctx_type : a context type in corp.context_types
    
     N/A gw N/A JavaGateway auto_field True N/A N/A N/A N/A gw entry_point sample iterations K alpha beta N/A N/A N/A N/A gw entry_point writeMeta iterations K alpha beta metafile N/A lda N/A N/A N/A gw entry_point getLda N/A N/A gw lda N/A save N/A N/A lda ctx_type fname metafile N/A N/A N/A 
    lda : LdaGibbsSampler obj
    fname : output file
    metafile : contains log_probs, top_doc,,and such 
     N/A top_word N/A nested_arr_to_np N/A N/A lda getPhi N/A doc_top N/A nested_arr_to_np N/A N/A lda getTheta N/A W N/A nested_arr_to_np N/A N/A lda getDocuments arrarr True N/A Z N/A nested_arr_to_np N/A N/A lda getZ arrarr True N/A dic N/A file_to_dict metafile N/A arrays_out N/A dict N/A N/A arrays_out N/A W_corpus N/A N/A np array N/A N/A np hstack W N/A N/A arrays_out N/A W_indices N/A N/A np cumsum N/A N/A a size N/A a W N/A N/A arrays_out N/A V N/A N/A lda getV N/A N/A arrays_out N/A iterations N/A int N/A dic N/A iteration N/A N/A arrays_out N/A Z_corpus N/A N/A np array N/A N/A np hstack Z dtype N/A np int32 N/A N/A arrays_out N/A Z_indices N/A N/A np cumsum N/A N/A a size N/A a Z N/A N/A arrays_out N/A doc_top doc_top N/A N/A arrays_out N/A top_word top_word N/A N/A arrays_out N/A sum_word_top N/A N/A N/A N/A lda getV N/A float N/A dic N/A doc_prior N/A N/A np zeros N/A N/A lda getK N/A N/A arrays_out N/A context_type ctx_type N/A N/A arrays_out N/A K N/A int N/A dic N/A K N/A N/A arrays_out N/A alpha N/A float N/A dic N/A top_prior N/A N/A arrays_out N/A beta N/A float N/A dic N/A doc_prior N/A N/A arrays_out N/A log_prob_init False N/A 
    # log_prob_init = False for now
    dt = [('i', np.int), ('v', np.float)]
    logs = [float(dic['log_probs'])] * int(dic['iteration'])
    indices = range(0, int(dic['iteration']))
    arrays_out['log_prob_init'] = np.array(zip(indices, logs), dtype=dt)
     N/A Saving LDA model to fname N/A N/A N/A np savez fname arrays_out N/A nested_arr_to_np N/A N/A arr arrarr N/A False N/A N/A outli N/A N/A r arr N/A N/A inli N/A N/A c r N/A N/A N/A N/A inli append c N/A arrarr N/A N/A inli N/A N/A np array inli N/A N/A N/A outli append inli N/A N/A N/A np array outli N/A N/A N/A __name__ __main__ N/A vsm.corpus Corpus N/A path ../org/knowceans/gibbstest/ N/A c N/A N/A Corpus load N/A path church_corp.npz N/A writepath /home/doori/inpho/org/knowceans/gibbstest/ N/A ctx document N/A N/A gw m N/A lda_run c N/A path churchcorp.txt ctx 10000 2 N/A writepath church-meta.txt 0.01 0.01 N/A N/A save m ctx N/A writepath church_lda.npz N/A writepath church-meta.txt