diff --git a/milestoneP3.ipynb b/milestoneP3.ipynb index a9c2bfd..dd5516b 100644 --- a/milestoneP3.ipynb +++ b/milestoneP3.ipynb @@ -1005,7 +1005,7 @@ }, { "cell_type": "code", - "execution_count": 20, + "execution_count": null, "id": "9be1c937", "metadata": { "ExecuteTime": { @@ -1013,23 +1013,7 @@ "start_time": "2024-12-20T15:48:28.872234Z" } }, - "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "100%|██████████| 2048878/2048878 [01:09<00:00, 29625.17it/s]\n", - "/Users/eugeniecyrot/Documents/epfl/Master/MA3/ADA/ada-2024-project-databrewers/src/scripts/semantic_analysis.py:35: SettingWithCopyWarning:\n", - "\n", - "\n", - "A value is trying to be set on a copy of a slice from a DataFrame.\n", - "Try using .loc[row_indexer,col_indexer] = value instead\n", - "\n", - "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", - "\n" - ] - } - ], + "outputs": [], "source": [ "clean_reviews = sem_ana.get_cleaned_reviews(reviews)" ] @@ -1044,7 +1028,7 @@ }, { "cell_type": "code", - "execution_count": 21, + "execution_count": null, "id": "83d8112202a396e8", "metadata": { "ExecuteTime": { @@ -1052,19 +1036,7 @@ "start_time": "2024-12-20T13:10:22.588656Z" } }, - "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "[nltk_data] Downloading package stopwords to\n", - "[nltk_data] /Users/eugeniecyrot/nltk_data...\n", - "[nltk_data] Package stopwords is already up-to-date!\n", - "Processing: 100%|██████████| 2048878/2048878 [00:06<00:00, 333051.64it/s]\n", - "Processing: 100%|██████████| 253627098/253627098 [00:28<00:00, 8888480.07it/s]\n" - ] - } - ], + "outputs": [], "source": [ "top_20_words,word_freq = sem_ana.top_n_words(clean_reviews, 20)" ] @@ -1103,7 +1075,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 50, "id": "7ec3aaf3748fc17e", "metadata": {}, "outputs": [ @@ -1649,6 +1621,20 @@ "Additionally, consumers seem to like a \"creamy\" and \"smooth\" mouthfeel, which stays quite common across the seasons.\n", "Finally, \"sweet\" tastes are more favored during this time period." ] + }, + { + "cell_type": "markdown", + "id": "899e57f4", + "metadata": {}, + "source": [ + "## Conclusion\n", + "\n", + "Our analysis reveals significant seasonal trends in beer preferences, providing valuable insights for brewers and marketers. Lighter, fruitier styles such as Pale Lager and IPA are favoured in the warmer months, while richer, full-bodied styles such as Stout and Barleywine dominate in the colder seasons. Regional differences also play a role, with preferences for certain styles such as Lambic-Fruit or Wild Beer varying by state and season.\n", + "\n", + "Sentiment and semantic analysis shows that consumers value 'full-bodied' and 'dark chocolate' flavours in positive reviews, while terms such as 'light-bodied' and 'pale yellow' appear in negative reviews. Seasonal shifts in flavour and taste preferences - such as 'sweet' and 'citrus' in summer and 'rich' and 'creamy' in winter - reflect evolving consumer expectations.\n", + "\n", + "These insights enable brewers to tailor production and marketing strategies to seasonal demand, ensuring better alignment with consumer preferences and enhancing the overall beer experience." + ] } ], "metadata": {