Metadata-Version: 2.1
Name: adeft
Version: 0.3.0
Summary: Acromine based Disambiguation of Entities From Text
Home-page: https://github.com/indralab/adeft
Author: adeft developers, Harvard Medical School
Author-email: albert_steppi@hms.harvard.edu
License: UNKNOWN
Download-URL: https://github.com/indralab/adeft/archive/0.3.0.tar.gz
Keywords: nlp,biology,disambiguation
Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Description-Content-Type: text/markdown
Requires-Dist: nltk
Requires-Dist: scikit-learn (>=0.20.0)
Requires-Dist: wget
Requires-Dist: requests
Requires-Dist: flask
Provides-Extra: test
Requires-Dist: nose ; extra == 'test'
Requires-Dist: coverage ; extra == 'test'

# Adeft
[![License](https://img.shields.io/badge/License-BSD%202--Clause-orange.svg)](https://opensource.org/licenses/BSD-2-Clause)
[![Build](https://travis-ci.org/indralab/adeft.svg)](https://travis-ci.org/indralab/adeft)
[![Documentation](https://readthedocs.org/projects/adeft/badge/?version=latest)](https://adeft.readthedocs.io/en/latest/?badge=latest)
[![PyPI version](https://badge.fury.io/py/adeft.svg)](https://badge.fury.io/py/adeft)
[![Python 3](https://img.shields.io/pypi/pyversions/adeft.svg)](https://www.python.org/downloads/release/python-357/)

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](http://www.chokkan.org/research/acromine/) algorithm developed
by the [NaCTeM](http://www.nactem.ac.uk/index.php) 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.

## 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

## 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

```python
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](http://adeft.readthedocs.io)

Jupyter notebooks illustrating Adeft workflows are available under `notebooks`:
- [Introduction](notebooks/introduction.ipynb)
- [Model building](notebooks/model_building.ipynb)


## 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

```bash
pip install adeft[test]
```

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



