コード例 #1
0
 def summarize(self):
     '''
     Performs cluster summarization. It returns a list of ranked documents.
     '''
     cs = LexRankSummarizer(self.document_dict)
     sorted_documents = cs.summarize()
     return sorted_documents
コード例 #2
0
 def test_cosine_matrix_creation(self): 
     lrs = LexRankSummarizer(doc_dict)
     res=lrs.summarize(threshold=0.1, tolerance=0.0001)
     for doc in res:
         print doc.dist, doc.raw