Harmony: Natural Language Processing Tool for Item Harmonisation is now on CRAN

Harmony: Natural Language Processing Tool for Item Harmonisation is now on CRAN

We are excited to announce that Harmony, a Natural Language Processing tool for data harmonisation, is now available on the Comprehensive R Archive Network CRAN!

Previously, Harmony R could be installed using devtools.

Harmony can be used to compare questionnaire items across studies, find the best match for a set of items, and identify different versions of the same questionnaire. Harmony is a collaboration project between Ulster University, University College London, the Universidade Federal de Santa Maria, and Fast Data Science. It is funded by Wellcome as part of the Wellcome Data Prize in Mental Health.

To install Harmony, you can use the following command in your R console or R Studio:


We encourage you to try Harmony and let us know what you think! You can also follow us on Twitter @harmonydata for updates.


Are you excited to use Harmony to harmonize your instruments?

Here is a quick walkthrough on how to do it:

  1. Import the Harmony library:
  1. Load the instruments from a file or URL:
instrument = load_instruments_from_file(path = "examples/GAD-7.pdf")
instrument_2 = load_instruments_from_file("https://medfam.umontreal.ca/wp-content/uploads/sites/16/GAD-7-fran%C3%A7ais.pdf") 
instruments = append(instrument, instrument_2)
  1. Match the instruments:
match = match_instruments(instruments)
  1. Get the results of the match:
#> [1] "questions"        "matches"          "query_similarity"

As you can see, the match object contains a lot of information about the best match for each question in the query instrument. This information can be used to harmonise the instruments and make them more comparable.

We hope this walkthrough is helpful. Let us know if you have any other questions.

I’m so excited to see what you can do with Harmony!

Related Posts

Making Harmony sustainable long-term

Making Harmony sustainable long-term

Longevity is a tricky topic in software development. We’ve been thinking about how we can make sure that Harmony continues to operate for a long time in the future, since Harmony is intended as a public good for researchers to use with no strings attached. Sustainability assessment In April 2023, we completed the software sustainability assessment with the Software Sustainability Institute, which gave us 29 recommended improvements to make Harmony more sustainable.

Harmony update: new features and bug fixes

Harmony update: new features and bug fixes

Harmony update: new features and bug fixes We are pleased to announce the release of a new update to Harmony, our online platform for harmonising questions. This update includes a number of new features and bug fixes, designed to improve the user experience and make Harmony even more useful for researchers. New features: Complete reworking of the search functionality: The search functionality in Harmony has been completely rewritten to support Lucene-like queries.