{"id":20173008,"url":"https://github.com/humansignal/brand-sentiment-analysis","last_synced_at":"2025-05-07T01:34:33.303Z","repository":{"id":35263328,"uuid":"189342701","full_name":"HumanSignal/brand-sentiment-analysis","owner":"HumanSignal","description":"Scripts utilizing Heartex platform to build brand sentiment analysis from the news","archived":false,"fork":false,"pushed_at":"2022-07-06T20:10:47.000Z","size":1957,"stargazers_count":21,"open_issues_count":3,"forks_count":3,"subscribers_count":6,"default_branch":"master","last_synced_at":"2023-07-25T05:23:39.972Z","etag":null,"topics":["lstm-sentiment-analysis","natural-language-processing","nlp","nlp-machine-learning","nlp-sentiment-classifier","nlp-tutorial","sentiment","sentiment-analyser","sentiment-analysis","sentiment-classification","tensorflow-text-classifiers","transfer-learning"],"latest_commit_sha":null,"homepage":"https://go.heartex.net/demo/sentiment/","language":"CSS","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/HumanSignal.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-05-30T03:59:08.000Z","updated_at":"2021-02-01T22:36:25.000Z","dependencies_parsed_at":"2022-08-25T21:50:08.540Z","dependency_job_id":null,"html_url":"https://github.com/HumanSignal/brand-sentiment-analysis","commit_stats":null,"previous_names":["humansignal/brand-sentiment-analysis"],"tags_count":0,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HumanSignal%2Fbrand-sentiment-analysis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HumanSignal%2Fbrand-sentiment-analysis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HumanSignal%2Fbrand-sentiment-analysis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HumanSignal%2Fbrand-sentiment-analysis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HumanSignal","download_url":"https://codeload.github.com/HumanSignal/brand-sentiment-analysis/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224552086,"owners_count":17330237,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["lstm-sentiment-analysis","natural-language-processing","nlp","nlp-machine-learning","nlp-sentiment-classifier","nlp-tutorial","sentiment","sentiment-analyser","sentiment-analysis","sentiment-classification","tensorflow-text-classifiers","transfer-learning"],"created_at":"2024-11-14T01:33:08.226Z","updated_at":"2024-11-14T01:33:08.829Z","avatar_url":"https://github.com/HumanSignal.png","language":"CSS","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Brand Sentiment\n\nA set of scripts that makes sentiment analysis of your brand\nbased on Google News and Twitter news streams. It utilizes Heartex\nplatform to create a custom neural network to do the study\nspecifically for your brand\n\n[Tutorial](https://heartex.net/use-case/sentiment)\n\n![](https://github.com/heartexlabs/brand-sentiment-analysis/raw/master/demo.png)\n\n# Installation \n\n\u003e Important. To make it work you need to obtain **Heartex token**, to do so [signup here](https://go.heartex.net/business/signup/?ref=github). We give you a free account with 10k API requests (with above\nlink only!).\n\n```sh\n# install\npython3 -m venv bsa-env\nsource bsa-env/bin/active\npip install -r requirements\n```\n\n```sh\n# configure\nexport TOKEN=\"\"\nexport BRAND=\"\"\n```\n\n# Create Sentiment Model\n\n```sh\n# first we need to grab news data\npython src/get_google_news.py --pages=10 --query=$BRAND --output=news.csv\n```\n\n```sh\n#  create project on heartex\npython src/create_sentiment_project.py --token=$TOKEN --input=news.csv\n\n# you will get project id, save it here\nexport SENTIMENT_PROJECT_ID=\"\"\n```\n\nOpen up `src/config.json` and put **$TOKEN** and **$SENTIMENT_PROJECT_ID** there\n\n# Run\n\nExecute ``` python3 service.py config.json```\n\n# Add your own data\n\n\u003e [TBD]\n\n# Advanced: Filter Results\n\nIn case your brand may appear in different contexts, for example, with\nthe name of one of your products (ex: Apple Watch), you may want to\nfilter those occurrences first. \n\nTo do that we will use another type of model which is called a tagger\nmodel. It learns when you tag relevant occurrences.\n\n```sh\nPRODUCTS=\"Apple,iOS,iPadOS,watchOS,macOS,MacPro,Pro Display\"\n```\n\n```sh\n# create Heartex project to filter news that are only relevent to your brand name\n\n# you will get back a link where you need to train a neural network a little bit to make it understand what is relevent to you\npython src/create_filter_project.py --token=$TOKEN --input=news.csv --labels=$PRODUCTS\n\n# set project here\nexport FILTER_PROJECT=\"\"\n```\n\nNow you have what is called a smart filter, edit config.json and include it there. You will see smart filter buttons on the index page.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhumansignal%2Fbrand-sentiment-analysis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhumansignal%2Fbrand-sentiment-analysis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhumansignal%2Fbrand-sentiment-analysis/lists"}