Python-Flask stub for the NLP Sandbox Date Annotator API
This repository contains a Python-Flask stub for the NLP Sandbox Date Annotator API. A Date Annotator takes as input a clinical note and outputs a list of predicted date annotations found in the clinical note.
The stub available in the folder server has been generated from the OpenAPI specification of the NLP Sandbox Date Annotator API (openapi.json) using the OpenAPI generator -- just don't expect much from it as this API service will return the string "do some magic!" to all the requests it receives!
Important: The Docker image built using the CI/CD workflow of this repository is used as part of the documentation of the nlpsandbox.io. Please visit this website for more information and actual example implementations of this annotator.
- Date Annotator API version: 1.2.0
- Docker image: nlpsandbox/date-annotator-stub
- Node JS
- Java (required by OpenAPITools/openapi-generator)
The file package.json defines the version of the OpenAPI generator to use and provides an utility function to run the generator.
Install the generator:
npm ci
(Re-)generate the content of the folder server/ based on the latest OpenAPI specification of the NLP Sandbox Date Annotator API:
npm run generate:server
This command will start this API service stub:
docker-compose up --build
The web interface of this API service will be available at http://localhost/api/v1/ui.