Exemplo n.º 1
0
def analyze():
    user_name = "realDonaldTrump"
    # sentiment_url = analysis.get_sentiment_analysis(user_name=user_name)
    days_url = analysis.get_density_plot_days(user_name=user_name)
    time_url = analysis.get_density_plot_time(user_name=user_name)
    phone_url = analysis.get_density_plot_cell(user_name=user_name)
    wordmap_url = analysis.get_wordmap(user_name=user_name)

    return render_template("analysis.html", wordmap=wordmap_url, days=days_url, time=time_url, cell=phone_url)
Exemplo n.º 2
0
def analyze():
    url=request.form['url']
    text = scrape.scrape(url)
    # get end of url for naming pics
    i = url.rfind('/') + 1
    url = url[i:]
    polarity_url = analysis.get_sentiment_analysis(text, url)
    wordmap_url = analysis.get_wordmap(text, url)

    return render_template("analysis.html", polarity=polarity_url, wordmap=wordmap_url)