Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sentence sentiment analysis #29

Open
wants to merge 14 commits into
base: dev
Choose a base branch
from
Open

Sentence sentiment analysis #29

wants to merge 14 commits into from

Conversation

sofiapinto
Copy link
Contributor

@sofiapinto sofiapinto commented Apr 23, 2024


Description

Using Flair's model to compute sentence based sentiment analysis for sentences mentioning HPs/boilers in MSE and Buildhub (but script also allows for other sources to be read). Then we create a count of pos/neg sentences per year.

Fixes #28

Instructions for Reviewer

Hey Aidan, could please check if the logic makes sense on the following scripts:

  • sentiment_analysis.py - main script to review
  • sentiment_analysis_utils.py - utils for computing sentiment. This consists of one function for now (but my guess is that this will get bigger, because we want to use a different model in the future that also outputs a neutral category);
  • getter_utils.py - updated with a function that allows for reading BH/MSE or another source of data
  • text_cleaning_utils.py - utils for cleaning text data prior to applying the sentiment model. A lot of these will be useful for other parts of the codebase too.
  • README.md - readme markdown for this subfolder.

Thanks a lot.

Checklist:

  • I have refactored my code out from notebooks/
  • I have checked the code runs
  • I have tested the code
  • I have run pre-commit and addressed any issues not automatically fixed
  • I have merged any new changes from dev
  • I have documented the code
    • Major functions have docstrings
    • Appropriate information has been added to READMEs
  • I have explained this PR above
  • I have requested a code review

@sofiapinto sofiapinto linked an issue Apr 23, 2024 that may be closed by this pull request
@sofiapinto sofiapinto self-assigned this Apr 23, 2024
@sofiapinto sofiapinto marked this pull request as ready for review April 24, 2024 13:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant