This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Import libraries | |
| import pandas as pd | |
| import numpy as np | |
| import matplotlib.pyplot as plt | |
| from wordcloud import WordCloud | |
| # Create combination metric and dictionary for wordcloud | |
| df_r2 = df_r[(df_r['Rating'] <= 2)] | |
| df_k2 = df_k.merge(df_r2, left_on = 'Key', right_on = 'Key')[['Keyword', 'Rating']] | |
| df_k2['Rating'] = df_k2['Rating'].map(lambda x: 5 - x) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Import libraries | |
| import pandas as pd | |
| import numpy as np | |
| import yake | |
| from yake.highlight import TextHighlighter | |
| # Set Yake Parameters | |
| language = "en" | |
| max_ngram_size = 3 | |
| deduplication_thresold = 0.9 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Import libraries | |
| import pandas as pd | |
| import numpy as np | |
| import requests | |
| import urllib.request | |
| import time | |
| from bs4 import BeautifulSoup | |
| import math | |
| import time | |
| import random |