{"id":16718752,"url":"https://github.com/planeshifter/node-chvocab","last_synced_at":"2025-04-10T08:54:02.009Z","repository":{"id":23344126,"uuid":"26704747","full_name":"Planeshifter/node-chvocab","owner":"Planeshifter","description":"Mapping texts to UMLS via the Consumer Health Vocabulary (CHV)","archived":false,"fork":false,"pushed_at":"2014-11-24T03:36:30.000Z","size":3932,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-24T08:08:40.796Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Planeshifter.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":"2014-11-16T05:18:40.000Z","updated_at":"2023-05-30T17:50:05.000Z","dependencies_parsed_at":"2022-09-16T14:11:46.385Z","dependency_job_id":null,"html_url":"https://github.com/Planeshifter/node-chvocab","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Planeshifter%2Fnode-chvocab","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Planeshifter%2Fnode-chvocab/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Planeshifter%2Fnode-chvocab/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Planeshifter%2Fnode-chvocab/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Planeshifter","download_url":"https://codeload.github.com/Planeshifter/node-chvocab/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248190407,"owners_count":21062277,"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":[],"created_at":"2024-10-12T21:38:21.344Z","updated_at":"2025-04-10T08:54:01.983Z","avatar_url":"https://github.com/Planeshifter.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![NPM version](https://badge.fury.io/js/chvocab.svg)](http://badge.fury.io/js/chvocab)\n[![Build Status](https://travis-ci.org/Planeshifter/node-chvocab.svg)](https://travis-ci.org/Planeshifter/node-chvocab)\n\nCHV Concept Extractor\n============\n\nThis is a small utility tool to extract UMLS concepts in supplied input texts via the Consumer Health Vocabulary (CHV). \n\n# Installation\n\nInstall via npm:\n\n```\nnpm install chvocab\n```\n\n## Getting Started\n\nThe packages exports a namespace with two functions:\n\n### analyze(string, [callback])\n\nThe first parameter expects the text to be analyzed, and the second parameter is a callback function which gets passed the result set of concepts identified in the CHV. The function chooses only one concept for each word phrase via the following algorithm: \n\n1. If there are different candidates for a word phrase in CHV, the longest one is picked pickd. For example, if the phrase \"heart attack\" appears in the supplied string, the candidate set of UMLS concepts would comprise the concepts `heart`, `attack` and `heart attack` with the latter concept being returned. \n2. For candidates of equal length, the one with the highest familiarity score in the CHV is chosen.\n\nExample:\n```\ninput = \"Chronic Kidney Disease is a progressive loss in renal function\" \nchvocab.analyze(input, function(err, data){\n  console.log(data)\n})\n```\n\nOutput: \n```\n[ { CUI: 'C0205191',\n    Term: 'chronic',\n    CHV_preferred_name: 'chronic (qualifier value)',\n    UMLS_preferred_name: 'chronic',\n    Explanation: '',\n    Count: 1,\n    Positions: [ 0 ] },\n  { CUI: 'C0022658',\n    Term: 'kidney disease',\n    CHV_preferred_name: 'kidney diseases',\n    UMLS_preferred_name: 'kidney disease',\n    Explanation: '',\n    Count: 1,\n    Positions: [ 8 ] },\n  { CUI: 'C0205329',\n    Term: 'progressive',\n    CHV_preferred_name: 'progressive (qualifier value)',\n    UMLS_preferred_name: 'progressive',\n    Explanation: '',\n    Count: 1,\n    Positions: [ 28 ] },\n  { CUI: 'C0232804',\n    Term: 'renal function',\n    CHV_preferred_name: 'renal function, nos',\n    UMLS_preferred_name: 'kidney function',\n    Explanation: '',\n    Count: 1,\n    Positions: [ 48 ] } ]\n```\n\n### getCHV([callback])\n\nIf one would like to use the CHV data for a different purpose, one can access it via this function. As soon as the data set is loaded, the callback function is invoked. This function has parameters `err, data`, of which the latter one holds the data set provided it was successfully loaded into memory. \n\nInstead of using the callback style, one can work with Promises since both functions also return a Promise implemented via the `bluebird` package. \n\n## Command Line Interface\n\nInstall the package globally to access the command line tool from everywhere:\n\n```\nnpm install chvocab -g\n```\n\nThen you can simply invoke `chvExtract` from the terminal. Type `chvExtract --help` to see the different options of how you can input data and retrieve the extracted results.\n\nIf you prefer to not install the package globally, you can access the command-line utility via\n\n```\nnode lib/chvExtract.js\n```\n\n### License \n\nThe Consumer Health Vocabulary (CHV) is developed by\n[Consumer Health Vocabulary Initiative](http://consumerhealthvocab.org/), an on-going collaboration among researchers from a number of institutions including the\nUniversity of Utah, Brigham and Women's Hospital, Harvard Medical School, National Library\nof Medicine, and University of Wisconsin. It is licensed under the GNU GENERAL PUBLIC LICENSE, Version 2 and\nconsequently this package is also licensed under GPL-2.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplaneshifter%2Fnode-chvocab","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fplaneshifter%2Fnode-chvocab","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplaneshifter%2Fnode-chvocab/lists"}