{"id":15014072,"url":"https://github.com/explosion/healthsea","last_synced_at":"2025-10-19T14:32:16.605Z","repository":{"id":66040075,"uuid":"436238627","full_name":"explosion/healthsea","owner":"explosion","description":"Healthsea is a spaCy pipeline for analyzing user reviews of supplementary products for their effects on health.","archived":false,"fork":false,"pushed_at":"2021-12-08T17:18:23.000Z","size":59721,"stargazers_count":90,"open_issues_count":1,"forks_count":16,"subscribers_count":9,"default_branch":"main","last_synced_at":"2025-01-29T18:38:17.710Z","etag":null,"topics":["healthcare","machine-learning","named-entity-recognition","natural-language-processing","pipeline","spacy","text-classification"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/explosion.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-12-08T12:25:37.000Z","updated_at":"2025-01-24T18:28:17.000Z","dependencies_parsed_at":null,"dependency_job_id":"e29c2078-a91a-44f7-8c87-1f7bab2b8a46","html_url":"https://github.com/explosion/healthsea","commit_stats":{"total_commits":51,"total_committers":4,"mean_commits":12.75,"dds":"0.27450980392156865","last_synced_commit":"4481488ed9fc85b89844ee872d0a8412a33f0b15"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/explosion%2Fhealthsea","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/explosion%2Fhealthsea/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/explosion%2Fhealthsea/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/explosion%2Fhealthsea/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/explosion","download_url":"https://codeload.github.com/explosion/healthsea/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":237152780,"owners_count":19263782,"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":["healthcare","machine-learning","named-entity-recognition","natural-language-processing","pipeline","spacy","text-classification"],"created_at":"2024-09-24T19:45:09.235Z","updated_at":"2025-10-19T14:32:07.667Z","avatar_url":"https://github.com/explosion.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Welcome to Healthsea ✨\n## Create better access to health with spaCy. \nHealthsea is a pipeline for analyzing user reviews to supplement products by extracting their effects on health. \n\n\u003e Learn more about Healthsea in our [blog post](https://explosion.ai/blog/healthsea)!\n\n![](img/healthsea_anim.gif)\n\n## 💉 Creating better access to health\nHealthsea aims to analyze user-written reviews of supplements in relation to their effects on health. Based on this analysis, we try to provide product recommendations.\nFor many people, supplements are an addition to maintaining health and achieving personal goals. Due to their rising popularity, consumers have increasing access to a variety of products.\n\nHowever, it's likely that most of the products on the market are redundant or produced in a \"quantity over quality\" fashion to maximize profit. The resulting white noise of products makes it hard to find the right supplements. \n\n**Healthsea automizes the analysis and provides information in a more digestible way.** ✨\n\n---\n\n## 🟢 Requirements\n\nTo run this project you need:\n```\nspacy\u003e=3.2.0\nbenepar\u003e=0.2.0\ntorch\u003e=1.6.0\nspacy-transformers\u003e=1.1.2\n```\nYou can install them in the project folder via `spacy project run install`\n\n## 📖 Documentation\n\n| Documentation              |                                                                |\n| -------------------------- | -------------------------------------------------------------- |\n| 🧭 **Usage**      | How to use the pipeline               |\n| ⚙️ **Pipeline**      | Learn more about the architecture of the pipeline               |\n| 🪐 **spaCy project**      | Introduction to the spaCy project               |\n| ✨ **Demos**                | Introduction to the Healthsea demos              |\n\n## 🧭 Usage\n\nThe pipeline processes reviews to supplements and returns health effects for every found health aspect. \n\nYou can either train the pipeline yourself with the provided datasets in the spaCy project or directly download the trained Healthsea pipeline from Huggingface via \n`pip install https://huggingface.co/explosion/en_healthsea/resolve/main/en_healthsea-any-py3-none-any.whl`\n\n```\nimport spacy\n\nnlp = spacy.load(\"en_healthsea\")\ndoc = nlp(\"This is great for joint pain.\")\n\n# Clause Segmentation \u0026 Blinding\nprint(doc._.clauses)\n\n\u003e    {\"split_indices\": [0, 7],\n\u003e    \"has_ent\": true,\n\u003e    \"ent_indices\": [4, 6],\n\u003e    \"blinder\": \"_CONDITION_\",\n\u003e    \"ent_name\": \"joint pain\",\n\u003e    \"cats\": {\n\u003e        \"POSITIVE\": 0.9824668169021606,\n\u003e        \"NEUTRAL\": 0.017364952713251114,\n\u003e        \"NEGATIVE\": 0.00002889777533710003,\n\u003e        \"ANAMNESIS\": 0.0001394189748680219\n\u003e    },\n\u003e    \"prediction_text\": [\"This\", \"is\", \"great\", \"for\", \"_CONDITION_\", \"!\"]}\n\n# Aggregated results\nprint(doc._.health_effects)\n\n\u003e    {\"joint_pain\": {\n\u003e        \"effects\": [\"POSITIVE\"],\n\u003e        \"effect\": \"POSITIVE\",\n\u003e        \"label\": \"CONDITION\",\n\u003e        \"text\": \"joint pain\"\n\u003e    }}\n\n```\n\n---\n\n## ⚙️ Pipeline\n\nThe pipeline consists of the following components:\n```\npipeline = [sentencizer, tok2vec, ner, benepar, segmentation, clausecat, aggregation]\n```\n\nIt uses Named Entity Recognition to detect two types of entities ```Condition``` and ```Benefit```.\n\n ```Condition``` entities are defined as health aspects that are improved by decreasing them. They include diseases, symptoms and general health problems (e.g. pain in back). ```Benefit``` entities on the other hand, are desired states of health (muscle recovery, glowing skin) that improve by increasing them.\n\n![](img/ner_guide.PNG)\n\nThe pipeline uses a modified model that performs Clause Segmentation based on the [benepar parser](https://github.com/nikitakit/self-attentive-parser), Entity Blinding and Text Classification. It predicts four exclusive effects: `Positive, Negative, Neutral, and Anamnesis`.\n\n![](img/clausecat_guide.PNG)\n\n---\n\n## 🪐 spaCy project\nThe ```project``` folder contains a [spaCy project](https://spacy.io/usage/projects) with all the training data and workflows.\n\nUse ```spacy project run``` inside the project folder to get an overview of all commands and assets. For more detailed documentation, visit the [project folders readme](https://github.com/thomashacker/healthsea/tree/main/project). \n\nUse ```spacy project run install``` to install dependencies needed for the pipeline.\n\n## ✨ Demo\n\n### Healthsea Demo\nA `demo` for exploring the results of Healthsea on real data can be found at [Hugging Face Spaces](https://huggingface.co/spaces/spacy/healthsea-demo).\n\n### Healthsea Pipeline\nA `demo` for exploring the Healthsea pipeline with its individual processing steps can be found at [Hugging Face Spaces](https://huggingface.co/spaces/spacy/healthsea-pipeline).\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexplosion%2Fhealthsea","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fexplosion%2Fhealthsea","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexplosion%2Fhealthsea/lists"}