Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

NLP text summarization with LSA

from sumy.summarizers.lsa
import LsaSummarizer
def lsa_method(text):
  parser = PlaintextParser.from_string(text, Tokenizer("english"))
summarizer_lsa = LsaSummarizer()
summary_2 = summarizer_lsa(parser.document, 2)
dp = []
for i in summary_2:
  lp = str(i)
dp.append(lp)
final_sentence = ' '.join(dp)
return final_sentence
4
0
Source by www.topcoder.com #
 
PREVIOUS NEXT
Tagged: #NLP #text #summarization #LSA
ADD COMMENT
Topic
Name
1+1 =