def url_summarize(url,k):
	html = urllib.urlopen(url).read()
	smaller_html = Document(html).summary()
	soup = BeautifulSoup(smaller_html)
	document = soup.get_text()
	s = Summarizer()
	summary = s.summarize(document,summary_size)
	return summary
def url_summarize(url, k):
    html = urllib.urlopen(url).read()
    smaller_html = Document(html).summary()
    soup = BeautifulSoup(smaller_html)
    document = soup.get_text()
    s = Summarizer()
    summary = s.summarize(document, summary_size)
    return summary
예제 #3
0
def serve_summary():
    text = request.form['input_text']
    s = Summarizer()
    summary = s.summarize(text, 5)
    return render_template('summary.html', summary=summary)
예제 #4
0
def serve_summary():
	text = request.form['input_text']
	s = Summarizer()
	summary = s.summarize(text,5)
	return render_template('summary.html',summary=summary)