CLARK is a natural language processing and machine learning application designed to make free-text data useful for computable phenotyping. CLARK takes free-text clinical notes as input and classifies those notes (and the associated patients) based on features (words and phrases) defined by the user. For each patient, CLARK outputs a classification (e.g., “Type 1 diabetic”), a confidence level, and significant features, essentially deriving structured “facts” from the contents of that patient’s unstructured notes. Thus far, CLARK has been applied at UNC to create computable phenotypes for diabetes, uterine fibroids, and primary ciliary dyskinesia (PCD).
CLARK was developed by NC TraCS and CoVar.
CLARK is a cross-platform desktop application leveraging Electron, a Python based machine learning engine and a React based user interface.
To download the CLARK executable without having to package it from source yourself, go to the NC TraCS website and download the CLARK zip file. (A demo dataset is also included.)
User documentation is available in the /docs folder in this repo, and can also be viewed at this link.
Python setup requires a python3 and several dependencies found in ./server/requirements.txt
. These requirements are best installed in a virtual environment
- Set up a virtual environment. Ex.
python3 -m virtualenv ~/.venv/clark
- Activate the virtual environment. Ex.
source ~/.venv/clark/bin/activate
- Install the requirements
cd server pip install -r requirements.txt cd ..
Building the user interface requires NPM. Dependencies can be installed by calling
npm install
The user interface is transpiled and bundled using webpack
npm run build_ui
From a command line with the activated python environment the application can be started using
npm start
Packaging is handled using PyInstaller to bundle the Python engine and Electron Builder to package everything together and build standalone applications and/or installers. Execution of each of these commands can be done using npm scripts.
- Bundles python libraries into standalone binary
npm run build_server
- Following calls to both
build_server
andbuild_ui
, a standalone application can be made usingnpm run build_standalone
- Following calls to both
build_server
andbuild_ui
, an installer can be made usingnpm run build_installer
Packages are best built on the native architecture.