{"id":19860861,"url":"https://github.com/asyml/fortehealth","last_synced_at":"2025-05-02T04:30:27.668Z","repository":{"id":37088863,"uuid":"455440763","full_name":"asyml/ForteHealth","owner":"asyml","description":"The project is in the incubation stage and still under development. ForteHealth is a flexible and powerful ML workflow builder for biomedical and clinical scenarios. This is part of the CASL project: http://casl-project.ai/ ","archived":false,"fork":false,"pushed_at":"2023-03-22T01:41:39.000Z","size":2075,"stargazers_count":12,"open_issues_count":21,"forks_count":5,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-04-18T00:57:54.842Z","etag":null,"topics":["biomedical-named-entity-recognition","clinical-nlp","clinical-text-processing","data-processing","deep-learning","information-retrieval","machine-learning","natural-language","natural-language-processing","python"],"latest_commit_sha":null,"homepage":"","language":"Python","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/asyml.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2022-02-04T06:08:44.000Z","updated_at":"2025-03-10T14:09:26.000Z","dependencies_parsed_at":"2024-01-14T16:14:10.210Z","dependency_job_id":"a1a4be50-3582-4d1b-aac5-1bbe15d13352","html_url":"https://github.com/asyml/ForteHealth","commit_stats":{"total_commits":383,"total_committers":10,"mean_commits":38.3,"dds":0.629242819843342,"last_synced_commit":"8d463acbabf88f6bcd7096844e9dd20a87159de0"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asyml%2FForteHealth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asyml%2FForteHealth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asyml%2FForteHealth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asyml%2FForteHealth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/asyml","download_url":"https://codeload.github.com/asyml/ForteHealth/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251986621,"owners_count":21675950,"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":["biomedical-named-entity-recognition","clinical-nlp","clinical-text-processing","data-processing","deep-learning","information-retrieval","machine-learning","natural-language","natural-language-processing","python"],"created_at":"2024-11-12T15:07:24.321Z","updated_at":"2025-05-02T04:30:27.339Z","avatar_url":"https://github.com/asyml.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n\n\u003cp align=\"center\"\u003e\n   \u003ca href=\"https://github.com/asyml/ForteHealth/actions/workflows/main.yml\"\u003e\u003cimg src=\"https://github.com/asyml/ForteHealth/actions/workflows/main.yml/badge.svg\" alt=\"build\"\u003e\u003c/a\u003e\n      \u003ca href=\"https://codecov.io/gh/asyml/ForteHealth\"\u003e\u003cimg src=\"https://codecov.io/gh/asyml/ForteHealth/branch/master/graph/badge.svg\" alt=\"test coverage\"\u003e\u003c/a\u003e\n   \u003ca href=\"https://github.com/asyml/ForteHealth/blob/master/LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/badge/license-Apache%202.0-blue.svg\" alt=\"apache license\"\u003e\u003c/a\u003e\n   \u003ca href=\"https://gitter.im/asyml/community\"\u003e\u003cimg src=\"http://img.shields.io/badge/gitter.im-asyml/forte-blue.svg\" alt=\"gitter\"\u003e\u003c/a\u003e\n   \u003ca href=\"https://github.com/psf/black\"\u003e\u003cimg src=\"https://img.shields.io/badge/code%20style-black-000000.svg\" alt=\"code style: black\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"#installation\"\u003eDownload\u003c/a\u003e •\n  \u003ca href=\"#quick-start-guide\"\u003eQuick Start\u003c/a\u003e •\n  \u003ca href=\"#contributing\"\u003eContribution Guide\u003c/a\u003e •\n  \u003ca href=\"#license\"\u003eLicense\u003c/a\u003e •\n  \u003ca href=\"https://asyml-forte.readthedocs.io/en/latest\"\u003eDocumentation\u003c/a\u003e •\n  \u003ca href=\"https://aclanthology.org/2020.emnlp-demos.26/\"\u003ePublication\u003c/a\u003e\n\u003c/p\u003e\n\n-----------------\n**ForteHealth is in the incubation stage and still under development**\n\n**Bring good software engineering to your Biomedical/Clinical ML solutions, starting from Data!**\n\n**ForteHealth** is a biomedical and clinical domain centric framework designed to engineer complex ML workflows for several tasks including, but not limited to, Medical Entity Recognition, Negation Context Analysis and ICD Coding. ForteHealth allows practitioners to build ML components in a composable and modular way. It works in conjunction with Forte and Forte-wrappers project, and leverages the tools defined there to execute general  tasks vital in the biomedical and clinical use cases. \n\n## Installation\n\nTo install from source:\n\n```bash\ngit clone https://github.com/asyml/ForteHealth.git\ncd ForteHealth\npip install .\n```\n\nTo install some Forte adapter for some existing [libraries](https://github.com/asyml/forte-wrappers#libraries-and-tools-supported):\n\nInstall from PyPI:\n\n```bash\npip install forte.health\n```\n\nSome tools are pre-requisites to a few tasks in our pipeline. For example, forte.spacy and stave maybe needed \nfor a pipeline that implements NER with visualisation and so on, depending on the use case.\n ```bash\n# To install other tools. Check here https://github.com/asyml/forte-wrappers#libraries-and-tools-supported for available tools.\npip install forte.spacy\npip install stave\n```\n\nSome components or modules in forte may require some [extra requirements](https://github.com/asyml/forte/blob/master/setup.py#L45):\n\nInstall ScispaCyProcessor:\n```bash\npip install 'forte.health[scispacy_processor]'\n```\n\nInstall TemporalNormalizingProcessor:\n ```bash\n pip install 'forte.health[normalizer_processor]'\n ```\n\n## Quick Start Guide\nWriting biomedical NLP pipelines with ForteHealth is easy. The following example creates a simple pipeline that analyzes the sentences, tokens, and medical named entities from a discharge note.\n\nBefore we start, make sure the SpaCy wrapper is installed. \nAlso, make sure you have input text files in the ```input_path``` directory that are passed through to the processors.\n```bash\npip install forte.spacy\n```\nLet's look at an example of a full fledged medical pipeline:\n\n```python\nfrom fortex.spacy import SpacyProcessor\nfrom forte.data.data_pack import DataPack\nfrom forte.data.readers import PlainTextReader\nfrom forte.pipeline import Pipeline\nfrom ft.onto.base_ontology import Sentence, EntityMention\nfrom ftx.medical.clinical_ontology import NegationContext, MedicalEntityMention\nfrom fortex.health.processors.negation_context_analyzer import (\n    NegationContextAnalyzer,\n)\n\npl = Pipeline[DataPack]()\npl.set_reader(PlainTextReader())\npl.add(SpacyProcessor(), config={\n    \"processors\": [\"sentence\", \"tokenize\", \"pos\", \"ner\", \"umls_link\"],\n    \"medical_onto_type\": \"ftx.medical.clinical_ontology.MedicalEntityMention\",\n    \"umls_onto_type\": \"ftx.medical.clinical_ontology.UMLSConceptLink\",\n    \"lang\": \"en_ner_bc5cdr_md\"\n    })\n\npl.add(NegationContextAnalyzer())\npl.initialize()\n```\n\nHere we have successfully created a pipeline with a few components:\n* a `PlainTextReader` that reads data from text files, given by the `input_path`\n* a `SpacyProcessor` that calls SpaCy to split the sentences, create tokenization, \n  pos tagging, NER and umls_linking\n* finally, the processor `NegationContextAnalyzer` detects negated contexts\n\nLet's see it run in action!\n\n```python\nfor pack in pl.process_dataset(input_path):\n    for sentence in pack.get(Sentence):\n        medical_entities = []\n        for entity in pack.get(MedicalEntityMention, sentence):\n            for ent in entity.umls_entities:\n                medical_entities.append(ent)\n\n        negation_contexts = [\n             (negation_context.text, negation_context.polarity)\n             for negation_context in pack.get(NegationContext, sentence)\n        ]\n\n\tprint(\"UMLS Entity Mentions detected:\", medical_entities, \"\\n\")\n\tprint(\"Entity Negation Contexts:\", negation_contexts, \"\\n\")\n```\n\nWe have successfully created a simple pipeline. In the nutshell, the `DataPack`s are\nthe standard packages \"flowing\" on the pipeline. They are created by the reader, and\nthen pass along the pipeline.\n\nEach processor, such as our `SpacyProcessor` `NegationContextAnalyzer`,\ninterfaces directly with `DataPack`s and do not need to worry about the\nother part of the pipeline, making the engineering process more modular. \n\nThe above mentioned code snippet has been taken from the [Examples](https://github.com/asyml/ForteHealth/tree/master/examples/mimic_iii) folder.\n\nTo learn more about the details, check out of [documentation](https://asyml-forte.readthedocs.io/)!\nThe classes used in this guide can also be found in this repository or\n[the Forte Wrappers repository](https://github.com/asyml/forte-wrappers/tree/main/src/spacy)\n\n## And There's More\nThe data-centric abstraction of Forte opens the gate to many other opportunities.\nGo to [this](https://github.com/asyml/forte#and-theres-more) link for more information\n\nTo learn more about these, you can visit:\n* [Examples](https://github.com/asyml/ForteHealth/tree/master/examples)\n* [Documentation](https://asyml-forte.readthedocs.io/)\n* Currently we are working on some interesting [tutorials](https://asyml-forte.readthedocs.io/en/latest/index_toc.html), stay tuned for a full set of documentation on how to do NLP with Forte!\n\n\n## Contributing\nThis project is part of the [CASL Open Source](http://casl-project.ai/) family.\n\nIf you are interested in making enhancement to Forte, please first go over our [Code of Conduct](https://github.com/asyml/ForteHealth/master/CODE_OF_CONDUCT.md) and [Contribution Guideline](https://github.com/asyml/ForteHealth/master/CONTRIBUTING.md)\n\n## About\n\n### Supported By\n\n\u003cp align=\"center\"\u003e\n   \u003cimg src=\"https://user-images.githubusercontent.com/28021889/165799232-2bb9f819-f394-4ade-98b0-c55c751ec8b1.png\", width=\"180\" align=\"top\"\u003e\n      \u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\n   \u003cimg src=\"https://user-images.githubusercontent.com/28021889/165799272-9e51b864-04f6-432a-92e8-e0f84e091f72.png\" width=\"180\" align=\"top\"\u003e\n      \u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\n   \u003cimg src=\"https://user-images.githubusercontent.com/28021889/165802470-f478de54-6c44-4ec8-8cab-ba74ed1f0163.png\" width=\"180\" align=\"top\"\u003e\n   \u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\n\u003c/p\u003e\n\n![image](https://user-images.githubusercontent.com/28021889/165806563-1542aeac-9656-4ad4-bf9c-f9a2e083f5d8.png)\n\n### License\n\n[Apache License 2.0](https://github.com/asyml/forte/blob/master/LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasyml%2Ffortehealth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fasyml%2Ffortehealth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasyml%2Ffortehealth/lists"}