Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time


DOI DOI License Tests Documentation PyPI version Python 3

Adeft (Acromine based Disambiguation of Entities From Text context) is a utility for building models to disambiguate acronyms and other abbreviations of biological terms in the scientific literature. It makes use of an implementation of the Acromine algorithm developed by the NaCTeM at the University of Manchester to identify possible longform expansions for shortforms in a text corpus. It allows users to build disambiguation models to disambiguate shortforms based on their text context. A growing number of pretrained disambiguation models are publicly available to download through adeft.


If you use Adeft in your research, please cite the paper in the Journal of Open Source Software:

Steppi A, Gyori BM, Bachman JA (2020). Adeft: Acromine-based Disambiguation of Entities from Text with applications to the biomedical literature. Journal of Open Source Software, 5(45), 1708,


Adeft works with Python versions 3.5 and above. It is available on PyPi and can be installed with the command

$ pip install adeft

Adeft's pretrained machine learning models can then be downloaded with the command

$ python -m

If you choose to install by cloning this repository

$ git clone

You should also run

$ python build_ext --inplace

at the top level of your local repository in order to build the extension module for alignment based longform detection and scoring.

Using Adeft

A dictionary of available models can be imported with from adeft import available_models

The dictionary maps shortforms to model names. It's possible for multiple equivalent shortforms to map to the same model.

Here's an example of running a disambiguator for ER on a list of texts

from adeft.disambiguate import load_disambiguator

er_dd = load_disambiguator('ER')



Users may also build and train their own disambiguators. See the documention for more info.


Documentation is available at

Jupyter notebooks illustrating Adeft workflows are available under notebooks:


Adeft uses pytest for unit testing, and uses Github Actions as a continuous integration environment. To run tests locally, make sure to install the test-specific requirements listed in as

pip install adeft[test]

and download all pre-trained models as shown above. Then run pytest in the top-level adeft folder.


Development of this software was supported by the Defense Advanced Research Projects Agency under awards W911NF018-1-0124 and W911NF-15-1-0544, and the National Cancer Institute under award U54-CA225088.