Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/baderlab/saber
Saber is a deep-learning based tool for information extraction in the biomedical domain. Pull requests are welcome! Note: this is a work in progress. Many things are broken, and the codebase is not stable.
https://github.com/baderlab/saber
bioinformatics biomedical-named-entity-recognition biomedical-text-mining deep-learning information-extraction machine-learning spacy
Last synced: 2 months ago
JSON representation
Saber is a deep-learning based tool for information extraction in the biomedical domain. Pull requests are welcome! Note: this is a work in progress. Many things are broken, and the codebase is not stable.
- Host: GitHub
- URL: https://github.com/baderlab/saber
- Owner: BaderLab
- License: mit
- Created: 2018-02-15T14:25:13.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2020-07-14T10:12:11.000Z (over 4 years ago)
- Last Synced: 2024-10-14T04:03:19.949Z (2 months ago)
- Topics: bioinformatics, biomedical-named-entity-recognition, biomedical-text-mining, deep-learning, information-extraction, machine-learning, spacy
- Language: Python
- Homepage: https://baderlab.github.io/saber/
- Size: 3.85 MB
- Stars: 102
- Watchers: 18
- Forks: 17
- Open Issues: 38
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.txt
Awesome Lists containing this project
README
SaberSaber (Sequence Annotator for Biomedical Entities and Relations) is a deep-learning based tool for information extraction in the biomedical domain.
Installation •
Quickstart •
Documentation## Installation
_Note! This is a work in progress. Many things are broken, and the codebase is not stable._
To install Saber, you will need `python3.6`.
### Latest PyPI stable release
[![PyPI-Status](https://img.shields.io/pypi/v/saber.svg?colorB=blue)](https://pypi.org/project/saber/)
[![PyPI-Downloads](https://img.shields.io/pypi/dm/saber.svg?colorB=blue&logo=python&logoColor=white)](https://pypi.org/project/saber)
[![Libraries-Dependents](https://img.shields.io/librariesio/dependent-repos/pypi/saber.svg?colorB=blue&logo=koding&logoColor=white)](https://github.com/baderlab/saber/network/dependents)```sh
(saber) $ pip install saber
```> The install from PyPI is currently broken, please install using the instructions below.
### Latest development release on GitHub
[![GitHub-Status](https://img.shields.io/github/tag-date/baderlab/saber.svg?logo=github)](https://github.com/baderlab/saber/releases)
[![GitHub-Stars](https://img.shields.io/github/stars/baderlab/saber.svg?logo=github&label=stars)](https://github.com/baderlab/saber/stargazers)
[![GitHub-Forks](https://img.shields.io/github/forks/baderlab/saber.svg?colorB=blue&logo=github&logoColor=white)](https://github.com/BaderLab/saber/network/members)
[![GitHub-Commits](https://img.shields.io/github/commit-activity/y/baderlab/saber.svg?logo=git&logoColor=white)](https://github.com/baderlab/saber/graphs/commit-activity)
[![GitHub-Updated](https://img.shields.io/github/last-commit/baderlab/saber.svg?colorB=blue&logo=github)](https://github.com/baderlab/saber/pulse)Pull and install straight from GitHub
```sh
(saber) $ pip install git+https://github.com/BaderLab/saber.git
```or install by cloning the repository
```sh
(saber) $ git clone https://github.com/BaderLab/saber.git
(saber) $ cd saber
```and then using either `pip`
```sh
(saber) $ pip install -e .
```
or `setuptools````sh
(saber) $ python setup.py install
```See the [documentation](https://baderlab.github.io/saber/installation/) for more detailed installation instructions.
## Quickstart
If your goal is to use Saber to annotate biomedical text, then you can either use the [web-service](#web-service) or a [pre-trained model](#pre-trained-models). If you simply want to check Saber out, without installing anything locally, try the [Google Colaboratory](#google-colaboratory) notebook.
### Google Colaboratory
The fastest way to check out Saber is by following along with the Google Colaboratory notebook ([![Colab](https://img.shields.io/badge/launch-Google%20Colab-orange.svg)](https://colab.research.google.com/drive/1WD7oruVuTo6p_908MQWXRBdLF3Vw2MPo)). In order to be able to run the cells, select "Open in Playground" or, alternatively, save a copy to your own Google Drive account (File > Save a copy in Drive).
### Web-service
To use Saber as a **local** web-service, run
```
(saber) $ python -m saber.cli.app
```or, if you prefer, you can pull & run the Saber image from **Docker Hub**
```sh
# Pull Saber image from Docker Hub
$ docker pull pathwaycommons/saber
# Run docker (use `-dt` instead of `-it` to run container in background)
$ docker run -it --rm -p 5000:5000 --name saber pathwaycommons/saber
```There are currently two endpoints, `/annotate/text` and `/annotate/pmid`. Both expect a `POST` request with a JSON payload, e.g.,
```json
{
"text": "The phosphorylation of Hdm2 by MK2 promotes the ubiquitination of p53."
}
```or
```json
{
"pmid": 11835401
}
```For example, running the web-service locally and using `cURL`
```sh
$ curl -X POST 'http://localhost:5000/annotate/text' \
--data '{"text": "The phosphorylation of Hdm2 by MK2 promotes the ubiquitination of p53."}'
```Documentation for the Saber web-service API can be found [here](https://baderlab.github.io/saber-api-docs/).
### Pre-trained models
First, import the `Saber` class. This is the interface to Saber
```python
from saber.saber import Saber
```then create a `Saber` object
```python
saber = Saber()
```and then load the model of our choice
```python
saber.load('PRGE')
```To annotate text with the model, just call the `Saber.annotate()` method
```python
saber.annotate("The phosphorylation of Hdm2 by MK2 promotes the ubiquitination of p53.")
```
See the [documentation](https://baderlab.github.io/saber/quick_start/#pre-trained-models) for more details on using pre-trained models.## Documentation
Documentation for the Saber package can be found [here](https://baderlab.github.io/saber/). The web-service API has its own documentation [here](https://baderlab.github.io/saber-api-docs/#introduction).
You can also call `help()` on any Saber method for more information
```python
from saber import Sabersaber = Saber()
help(saber.annotate)
```or pass the `--help` flag to any of the command-line interfaces
```
python -m src.cli.train --help
```Feel free to open an issue or reach out to us on our slack channel ([![Slack](https://img.shields.io/badge/[email protected]?logo=slack)](https://join.slack.com/t/saber-nlp/shared_invite/enQtNzE0MzY5ODM3MTc0LWZmY2VjMTY5MjllMmIzNDhkM2VhZjk5ODE1MDYyZjE5OGFjYWVhY2I2NDk5Yjk1N2Q3NTI4YTdhMTI5MjRiOGY)) for more help.