Skip to content

HumanBehaviourChangeProject/Info-extract

Repository files navigation

Human Behaviour Change Project (HBCP)

The Human Behaviour-Change Project (HBCP) is a collaboration between behavioral scientists, computer scientists and system architects that aims to revolutionize methods for synthesizing evidence in real time and generate new insights on behavior change.

This repository includes code for two important tasks in the project: behavior change entity extraction and prediction for behavior change (e.g., outcome value given a set of population and intervention entities).

Getting Started

These instructions will get you a copy of the project up and running on your local machine, with a REST API ready to use.

Prerequisite

Docker is the only requirement.

⚠️ Make sure that your Docker runtime memory option is set to at least 8GB.

Make sure your version of Docker (e.g. Docker Desktop on Mac) is running.

Running the API

After cloning the project, open a terminal in the root hbcpIE directory and simply type this command:

docker-compose up

Docker will set up our API and install all of its requirements for you. This may take a while as this also trains some of the machine learning models we use. When it's over the last line you should see in your terminal should be something like:

hbcp-core | 17-Feb-2021 13:21:37.079 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in [60,591] milliseconds

Example Usage

The easiest way to try the API is to extract all the entities in a behavior change article in PDF format.

Here is a study of Lou et al. (2013) to get you started: https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3704267/pdf/1471-2296-14-91.pdf. You can download this file and feed it to the API through the interface. Of course, you can use any other PDF of behavior change literature.

  1. Open a web browser and go to http://127.0.0.1:8080/swagger-ui.html.
  2. Look at the bottom of the page and click on extractor-controller to view its calls.
  3. Click on the first call: /api/extract/all.
  4. Find the file parameter and click on Choose file to select your PDF.
  5. Click on Try it out! and wait for 1-2 minutes.
  6. You can then view all the extracted entities in JSON format in the Response Body.

Publications

If you use the system please cite:

Other Related Publications

Team Members

  • Francesca Bonin
  • Martin Gleize
  • Yufang Hou
  • Pierpaolo Tommasi

Acknowledgments

Thanks to the UCL annotators that developed the Behaviour Change Intervention Ontology.

License

This program is free software; you can redistribute it and/or modify it under the terms of the Apache License Version 2.0.