diff --git a/thronetalk-game-of-thrones-summarizer/app.py b/thronetalk-game-of-thrones-summarizer/app.py index 5c48d86..045117c 100644 --- a/thronetalk-game-of-thrones-summarizer/app.py +++ b/thronetalk-game-of-thrones-summarizer/app.py @@ -96,8 +96,7 @@ def remove_zeros(lst): int(season_to), int(to_ep_no) ) - line_chart = vg.sentiment_analysis_visualization(characters) - print(characters) + line_chart = vg.sentiment_analysis_visualization(characters) chart = alt.Chart(line_chart).transform_fold( characters, as_=["character name", "value"] ).mark_line( diff --git a/thronetalk-game-of-thrones-summarizer/tests/test_visualization_generator.py b/thronetalk-game-of-thrones-summarizer/tests/test_visualization_generator.py index 136788b..a18e2cb 100644 --- a/thronetalk-game-of-thrones-summarizer/tests/test_visualization_generator.py +++ b/thronetalk-game-of-thrones-summarizer/tests/test_visualization_generator.py @@ -15,7 +15,7 @@ class TestVisualizationGenerator(unittest.TestCase): # side_effect=mock_functions.mocked_read_csv_ouput_dialogues) def test_smoke_test(self): '''Smoke test for VisualizationGenerator''' - top_3_characters = ["eddard 'ned' stark", "catelyn stark", "robert baratheon"] + top_3_characters = ["eddard ned stark", "catelyn stark", "robert baratheon"] v_g = VisualizationGenerator(1,1,1,3) v_g.multi_word_cloud(top_3_characters) v_g.sentiment_analysis_visualization(top_3_characters) diff --git a/thronetalk-game-of-thrones-summarizer/utils/visualization_generator.py b/thronetalk-game-of-thrones-summarizer/utils/visualization_generator.py index eb15434..7a1a861 100644 --- a/thronetalk-game-of-thrones-summarizer/utils/visualization_generator.py +++ b/thronetalk-game-of-thrones-summarizer/utils/visualization_generator.py @@ -120,7 +120,6 @@ def pre_process_data_for_character_per_episode(self, character: str) -> list[str data = self.data char_episode_wise_arr = [] character_mask = data[data['Character'].str.upper() == character.upper()] - print(self.season_from,self.episode_from,self.season_to,self.episode_to) for i in range(self.season_from, self.season_to + 1): season_mask_df = character_mask[character_mask['Season'] == "season-0" + str(i)] if self.season_from == self.season_to: @@ -265,10 +264,7 @@ def sentiment_analysis_visualization(self, char_arr: list[str]) -> pd.DataFrame: elif self.season_from < i < self.season_to: episode_wise_desc.append("S"+str(i)+":E"+str(j)) sentiment_arr.append(episode_wise_desc) - print(sentiment_arr) sentiment_arr = sentiment_arr + self.get_sentiment(char_arr) - print(sentiment_arr) - chart_data = pd.DataFrame(np.asarray(sentiment_arr).transpose(), columns=['season-episode']+char_arr) return chart_data