Summaries will greatly help the user in understanding “why the topic is trending”. We have proposed an algorithm which automatically generates summaries for trending topics/hashtags based on tweets and it's related news article.
Requirements:
1. pip install tweepy
2. pip install nltk
TrendingHashtags.py
Collect currently trending hashtags. To run: TrendingHashtags.py > hashtags.txtcrawl.py
Crawls Twitter for the trends in hashtags.txt To run: python crawl.py hashtags.txt path_to_store_tweets Output: will create a file for tweets crawled for each trending topic/hashtag.clean.py
Removes twitter specific stop words from the data To run: python clean.py path_to_tweets_folder path_to_store_tweets Output: a file for tweets pertaining to each topic/hashtagtag.py
Pre-process the data To run: python tag.py path_to_cleaned_data path_to_preprocess_data Output: a file for tweets pertaining to each topic/hashtag./tweet_summarizer.sh path_to_clean_tweets path_to_news_articles path_to_tagged_tweets path_to_tagged_news_articles path_to_predicted_folder
Output: Summary will be generated for the trending topics/hashtags in predicted foldercosine_similarity.py
Calculate cosine similarity between human picked and algorithm generated summary To run: python cosine_similarity.py path_to_actual_file path_to_predicted_file Output: average and max similaritysemantic_similarity.py
Calculate semantic similarity between human picked and algorithm generated summary To run: python semantic_similarity.py path_to_actual_file path_to_predicted_file Output: average and max similarity