Skip to main content

Acromine based Disambiguation of Entities From Text

Project description

Adeft

DOI DOI License Build 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.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 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 nosetests for unit testing, and is integrated with the Travis 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 nosetests in the top-level adeft folder.

Funding

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

adeft-0.7.0.tar.gz (117.7 kB view details)

Uploaded Source

File details

Details for the file adeft-0.7.0.tar.gz.

File metadata

  • Download URL: adeft-0.7.0.tar.gz
  • Upload date:
  • Size: 117.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.2

File hashes

Hashes for adeft-0.7.0.tar.gz
Algorithm Hash digest
SHA256 8d6e6f9550457182bd028c1504b24c6481fb0f34b779c1f0be7c55f95c6c2e90
MD5 67b9e66c7b1e563d1866b78efa349376
BLAKE2b-256 1162297f4cadd6d77bd6477cd1b770e5369892d2d155ecfba39e46dd197d659b

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page