def __init__(self,args):
'''
Initialize hsbm-instance
- create a folder where to save results: self.args.output
- make a bipartite word-doc graph from the corpus. save as self.graph
- do the hsbm inference. save the state as self.inference
'''
self.args = args
self.out_path = self.args.output
if not os.path.exists(self.out_path):
os.makedirs(self.out_path)
## get the graph-object
self.graph = self.make_graph()
## do the hsbm-inference
self.state = self.inference(self.graph)
评论列表
文章目录