{"id":28590314,"url":"https://github.com/antoniopaya22/covid19-entity-recognition","last_synced_at":"2025-06-11T08:13:45.321Z","repository":{"id":112335601,"uuid":"263580426","full_name":"antoniopaya22/COVID19-Entity-Recognition","owner":"antoniopaya22","description":"COVID19-Entity-Recognition uses scispaCy to locate symptoms and medications in the CORD-19 corpus.","archived":false,"fork":false,"pushed_at":"2020-05-21T07:32:37.000Z","size":56755,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-01-09T17:27:17.434Z","etag":null,"topics":["cord19","covid-19","medications","scispacy","symptoms"],"latest_commit_sha":null,"homepage":null,"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/antoniopaya22.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}},"created_at":"2020-05-13T09:10:54.000Z","updated_at":"2020-05-25T16:39:42.000Z","dependencies_parsed_at":"2023-05-13T06:30:12.719Z","dependency_job_id":null,"html_url":"https://github.com/antoniopaya22/COVID19-Entity-Recognition","commit_stats":null,"previous_names":["antoniopaya22/covid19-entity-recognition"],"tags_count":0,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antoniopaya22%2FCOVID19-Entity-Recognition","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antoniopaya22%2FCOVID19-Entity-Recognition/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antoniopaya22%2FCOVID19-Entity-Recognition/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antoniopaya22%2FCOVID19-Entity-Recognition/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/antoniopaya22","download_url":"https://codeload.github.com/antoniopaya22/COVID19-Entity-Recognition/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antoniopaya22%2FCOVID19-Entity-Recognition/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259227959,"owners_count":22824907,"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":["cord19","covid-19","medications","scispacy","symptoms"],"created_at":"2025-06-11T08:13:43.458Z","updated_at":"2025-06-11T08:13:45.306Z","avatar_url":"https://github.com/antoniopaya22.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# COVID19-Entity-Recognition\n\nCOVID19-Entity-Recognition uses [scispaCy](https://allenai.github.io/scispacy/) to locate entities in the\n[COVID-19 Open Research Dataset (CORD-19)](https://www.semanticscholar.org/cord19) corpus and \nthen searches these entities on [Wikidata](https://www.wikidata.org/wiki/Wikidata:Main_Page) to recognize whether \nit is a possible symptom or a medication.\n\n\n## 1. Install\n\n### 1.1. Run ElasticSearch \u0026 Kibana\n\n```docker\ndocker-compose -f docker-compose.yml up -d\n```\n\n### 1.2. Index CORD-19 Dataset in ElasticSearch\n\nTo create an ElasticSearch index and index the documents in the dataset\nyou can use the **index_manager.py** script.\n\n```\npython index_manager.py [-n NAME] [-d DATASET] [-r] [-c] --host HOST\n```\n\n#### 1.2.1. Example 1: Create index and index documents\n\n```commandline\npython index_manager.py -n covid19-index -d covid19_dataset -c --host localhost\n```\n\n#### 1.2.2. Example 2: Remove index\n\n```commandline\npython index_manager.py -n covid19-index -r --host localhost\n```\n\n\n## 2. Stop containers\n\n### 2.1. Stop ELasticSearch \u0026 Kibana\n\n```docker\ndocker-compose -f docker-compose.yml down\n```\n\n## 3. Search Entities\n\nTo search the entities of the CORD-19 corpus we can use the script **entity_recognition.py**.\n\n```commandline\npython entity_recognition.py -n INDEX_NAME --host HOST\n```\n\nThe output of this script is a file called **entities.txt** with the list of entities ordered by \nnumber of occurrences in the paragraphs.\n\n\n## 4. Search Symptoms and Medications\n\nUsing the script search.py we can search, once obtained the terms, \nwhich of those terms are a symptom or are a medication.\n\n```bash\npython search.py ENTITIES_FILE [-s] [-m] \n```\n\n### 4.1 Search symptoms\n\n```commandline\npython search.py entities.txt -s\n```\n\n\n### 4.1 Search medications\n\n```commandline\npython search.py entities.txt -m\n```\n\n\n## 5. Example outputs\n\n### 5.1. Entities\n\n```\ntime,1046\ndata,971\nmodel,917\nmodel-the',901\nnumber,893\ntime-and,876\ninfected,746\ncovid,724\ncovid-,724\ncovid',724\ncovid-19,666\ninfection,588\ncases,583\ncase,558\ndifferent,550\npopulation,545\ndisease,500\nepidemic,490\nrate,463\nindividuals,456\n```\n\n\n### 5.2. Symptoms\n\n[Original entity, Wikidata entity, Relevance]\n\n```\ncough,cough,19\nconfusion,mental confusion,18\nfever,fever,15\ncoughing,cough,12\ncollapse,collapse,7\nintermittent,intermittent claudication,4\ninflammation,inflammation,3\nfatigue,fatigue,3\nnostrils,nostrils distended,3\ncontraction,uterine contraction,2\nburnin,heartburn,1\n```\n\n\n### 5.3. Medications\n\n[Original entity, Wikidata entity, Relevance]\n\n```\nveneto,venetoclax,10\nserine,L-serine,4\narginine,L-Arginine,4\nnitrogen,nitrous oxide,3\nphyton,(E)-phytonadione,2\nantibacterial,antibiotic,1\nhydroxychloroquine,hydroxychloroquine,1\nmethionine,L-methionine,1\nbetax,betaxolol,0\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantoniopaya22%2Fcovid19-entity-recognition","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fantoniopaya22%2Fcovid19-entity-recognition","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantoniopaya22%2Fcovid19-entity-recognition/lists"}