Skip to main content

Adeft

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.

Citation

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, https://doi.org/10.21105/joss.01708

Installation

Adeft works with Python versions 3.8 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 adeft.download

If you choose to install by cloning this repository

$ git clone https://github.com/indralab/adeft.git

You should also run

$ python setup.py 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')

    ...

er_dd.disambiguate(texts)

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

Documentation

Documentation is available at https://adeft.readthedocs.io

Jupyter notebooks illustrating Adeft workflows are available under notebooks:

Testing

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 setup.py as

pip install adeft[test]

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

Funding

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.

Release files for adeft 0.13.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for adeft 0.13.0
File Size Uploaded
adeft-0.13.0.tar.gz 192.3 kB Details

Release files / adeft-0.13.0.tar.gz

Download URL adeft-0.13.0.tar.gz
Size 192.3 kB
Tags Source
SHA-256 checksum
How to use checksums
cb9c31e8c8022bd63bd8a8b14487bc5f624e51a52e32b6c592f0b347cbbd8617
BLAKE2b-256 checksum
How to use checksums
468902f021847d2fe0b5c8df1d8a8f45737658af58dd984387a6a3b3d07caf97
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.10

Release history Release notifications | RSS feed

This release

0.13.0 This release

1 release file

0.12.3

1 release file

0.12.2

1 release file

0.12.1

1 release file

0.12.0

1 release file

0.11.2

1 release file

0.11.1

1 release file

0.11.0

1 release file

0.10.0

1 release file

0.9.0

1 release file

0.8.0

1 release file

0.7.0

1 release file

0.6.0

1 release file

0.5.5

1 release file

0.5.4

1 release file

0.5.3

1 release file

0.5.1

1 release file

0.5.0

0.4.0

2 release files

0.3.0

2 release files

0.2.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page