deeppavlov


Namedeeppavlov JSON
Version 1.5.0 PyPI version JSON
download
home_pagehttps://github.com/deeppavlov/DeepPavlov
SummaryAn open source library for building end-to-end dialog systems and training chatbots.
upload_time2023-12-27 14:45:02
maintainer
docs_urlNone
authorNeural Networks and Deep Learning lab, MIPT
requires_python
licenseApache License, Version 2.0
keywords nlp ner squad intents chatbot
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            [![License Apache 2.0](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://github.com/deeppavlov/DeepPavlov/blob/master/LICENSE)
![Python 3.6, 3.7, 3.8, 3.9, 3.10](https://img.shields.io/badge/python-3.6%20%7C%203.7%20%7C%203.8%20%7C%203.9%20%7C%203.10-green.svg)
[![Downloads](https://pepy.tech/badge/deeppavlov)](https://pepy.tech/project/deeppavlov)
<img align="right" height="27%" width="27%" src="https://raw.githubusercontent.com/deeppavlov/DeepPavlov/master/docs/_static/deeppavlov_logo.png"/>

DeepPavlov is an open-source conversational AI library built on [PyTorch](https://pytorch.org/).

DeepPavlov is designed for
* development of production ready chat-bots and complex conversational systems,
* research in the area of NLP and, particularly, of dialog systems.

## Quick Links

* Demo [*demo.deeppavlov.ai*](https://demo.deeppavlov.ai/)
* Documentation [*docs.deeppavlov.ai*](http://docs.deeppavlov.ai/)
    * Model List [*docs:features/*](http://docs.deeppavlov.ai/en/master/features/overview.html)
    * Contribution Guide [*docs:contribution_guide/*](http://docs.deeppavlov.ai/en/master/devguides/contribution_guide.html)
* Issues [*github/issues/*](https://github.com/deeppavlov/DeepPavlov/issues)
* Forum [*forum.deeppavlov.ai*](https://forum.deeppavlov.ai/)
* Blogs [*medium.com/deeppavlov*](https://medium.com/deeppavlov)
* [Extended colab tutorials](https://github.com/deeppavlov/dp_tutorials)
* Docker Hub [*hub.docker.com/u/deeppavlov/*](https://hub.docker.com/u/deeppavlov/) 
    * Docker Images Documentation [*docs:docker-images/*](http://docs.deeppavlov.ai/en/master/intro/installation.html#docker-images)

Please leave us [your feedback](https://forms.gle/i64fowQmiVhMMC7f9) on how we can improve the DeepPavlov framework.

**Models**

[Named Entity Recognition](http://docs.deeppavlov.ai/en/master/features/models/NER.html) | [Intent/Sentence Classification](http://docs.deeppavlov.ai/en/master/features/models/classification.html) |

[Question Answering over Text (SQuAD)](http://docs.deeppavlov.ai/en/master/features/models/SQuAD.html) | [Knowledge Base Question Answering](http://docs.deeppavlov.ai/en/master/features/models/KBQA.html)

[Sentence Similarity/Ranking](http://docs.deeppavlov.ai/en/master/features/models/neural_ranking.html) | [TF-IDF Ranking](http://docs.deeppavlov.ai/en/master/features/models/tfidf_ranking.html)

[Syntactic Parsing](http://docs.deeppavlov.ai/en/master/features/models/syntax_parser.html) | [Morphological Tagging](http://docs.deeppavlov.ai/en/master/features/models/morpho_tagger.html)

[Automatic Spelling Correction](http://docs.deeppavlov.ai/en/master/features/models/spelling_correction.html) | [Entity Extraction](http://docs.deeppavlov.ai/en/master/features/models/entity_extraction.html)

[Open Domain Questions Answering](http://docs.deeppavlov.ai/en/master/features/models/ODQA.html) | [Russian SuperGLUE](http://docs.deeppavlov.ai/en/master/features/models/superglue.html)

[Relation Extraction](http://docs.deeppavlov.ai/en/master/features/models/relation_extraction.html)

**Embeddings**

[BERT embeddings for the Russian, Polish, Bulgarian, Czech, and informal English](http://docs.deeppavlov.ai/en/master/features/pretrained_vectors.html#bert)

[ELMo embeddings for the Russian language](http://docs.deeppavlov.ai/en/master/features/pretrained_vectors.html#elmo)

[FastText embeddings for the Russian language](http://docs.deeppavlov.ai/en/master/features/pretrained_vectors.html#fasttext)

**Auto ML**

[Tuning Models](http://docs.deeppavlov.ai/en/master/features/hypersearch.html)

**Integrations**

[REST API](http://docs.deeppavlov.ai/en/master/integrations/rest_api.html) | [Socket API](http://docs.deeppavlov.ai/en/master/integrations/socket_api.html)

[Amazon AWS](http://docs.deeppavlov.ai/en/master/integrations/aws_ec2.html)

## Installation

0. DeepPavlov supports `Linux`, `Windows 10+` (through WSL/WSL2), `MacOS` (Big Sur+) platforms, `Python 3.6`, `3.7`, `3.8`, `3.9` and `3.10`.
    Depending on the model used, you may need from 4 to 16 GB RAM.

1. Create and activate a virtual environment:
    * `Linux`
    ```
    python -m venv env
    source ./env/bin/activate
    ```
2. Install the package inside the environment:
    ```
    pip install deeppavlov
    ```

## QuickStart

There is a bunch of great pre-trained NLP models in DeepPavlov. Each model is
determined by its config file.

List of models is available on
[the doc page](http://docs.deeppavlov.ai/en/master/features/overview.html) in
the `deeppavlov.configs` (Python):

```python
from deeppavlov import configs
```

When you're decided on the model (+ config file), there are two ways to train,
evaluate and infer it:

* via [Command line interface (CLI)](https://github.com/deeppavlov/DeepPavlov/blob/master/#command-line-interface-cli) and
* via [Python](https://github.com/deeppavlov/DeepPavlov/blob/master/#python).

#### GPU requirements

By default, DeepPavlov installs models requirements from PyPI. PyTorch from PyPI could not support your device CUDA
capability. To run supported DeepPavlov models on GPU you should have [CUDA](https://developer.nvidia.com/cuda-toolkit)
compatible with used GPU and [PyTorch version](https://github.com/deeppavlov/DeepPavlov/blob/master/deeppavlov/requirements/pytorch.txt) required by DeepPavlov models.
See [docs](https://docs.deeppavlov.ai/en/master/intro/quick_start.html#using-gpu) for details.
GPU with Pascal or newer architecture and 4+ GB VRAM is recommended.

### Command line interface (CLI)

To get predictions from a model interactively through CLI, run

```bash
python -m deeppavlov interact <config_path> [-d] [-i]
```

* `-d` downloads required data - pretrained model files and embeddings (optional).
* `-i` installs model requirements (optional).

You can train it in the same simple way:

```bash
python -m deeppavlov train <config_path> [-d] [-i]
```

Dataset will be downloaded regardless of whether there was `-d` flag or not.

To train on your own data you need to modify dataset reader path in the
[train config doc](http://docs.deeppavlov.ai/en/master/intro/config_description.html#train-config).
The data format is specified in the corresponding model doc page. 

There are even more actions you can perform with configs:

```bash
python -m deeppavlov <action> <config_path> [-d] [-i]
```

* `<action>` can be
    * `install` to install model requirements (same as `-i`),
    * `download` to download model's data (same as `-d`),
    * `train` to train the model on the data specified in the config file,
    * `evaluate` to calculate metrics on the same dataset,
    * `interact` to interact via CLI,
    * `riseapi` to run a REST API server (see
    [doc](http://docs.deeppavlov.ai/en/master/integrations/rest_api.html)),
    * `predict` to get prediction for samples from *stdin* or from
      *<file_path>* if `-f <file_path>` is specified.
* `<config_path>` specifies path (or name) of model's config file
* `-d` downloads required data
* `-i` installs model requirements


### Python

To get predictions from a model interactively through Python, run

```python
from deeppavlov import build_model

model = build_model(<config_path>, install=True, download=True)

# get predictions for 'input_text1', 'input_text2'
model(['input_text1', 'input_text2'])
```
where
* `install=True` installs model requirements (optional),
* `download=True` downloads required data from web - pretrained model files and embeddings (optional),
* `<config_path>` is model name (e.g. `'ner_ontonotes_bert_mult'`), path to the chosen model's config file (e.g.
  `"deeppavlov/configs/ner/ner_ontonotes_bert_mult.json"`),  or `deeppavlov.configs` attribute (e.g.
  `deeppavlov.configs.ner.ner_ontonotes_bert_mult` without quotation marks).

You can train it in the same simple way:

```python
from deeppavlov import train_model 

model = train_model(<config_path>, install=True, download=True)
```

To train on your own data you need to modify dataset reader path in the
[train config doc](http://docs.deeppavlov.ai/en/master/intro/config_description.html#train-config).
The data format is specified in the corresponding model doc page. 

You can also calculate metrics on the dataset specified in your config file:

```python
from deeppavlov import evaluate_model 

model = evaluate_model(<config_path>, install=True, download=True)
```

DeepPavlov also [allows](https://docs.deeppavlov.ai/en/master/intro/python.html) to build a model from components for
inference using Python.

## License

DeepPavlov is Apache 2.0 - licensed.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/deeppavlov/DeepPavlov",
    "name": "deeppavlov",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "NLP,NER,SQUAD,Intents,Chatbot",
    "author": "Neural Networks and Deep Learning lab, MIPT",
    "author_email": "info@deeppavlov.ai",
    "download_url": "https://files.pythonhosted.org/packages/97/65/7300994ad59693f0195c7eaf701d6e418598ebcd9dcb386ceaf6fda45536/deeppavlov-1.5.0.tar.gz",
    "platform": null,
    "description": "[![License Apache 2.0](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://github.com/deeppavlov/DeepPavlov/blob/master/LICENSE)\n![Python 3.6, 3.7, 3.8, 3.9, 3.10](https://img.shields.io/badge/python-3.6%20%7C%203.7%20%7C%203.8%20%7C%203.9%20%7C%203.10-green.svg)\n[![Downloads](https://pepy.tech/badge/deeppavlov)](https://pepy.tech/project/deeppavlov)\n<img align=\"right\" height=\"27%\" width=\"27%\" src=\"https://raw.githubusercontent.com/deeppavlov/DeepPavlov/master/docs/_static/deeppavlov_logo.png\"/>\n\nDeepPavlov is an open-source conversational AI library built on [PyTorch](https://pytorch.org/).\n\nDeepPavlov is designed for\n* development of production ready chat-bots and complex conversational systems,\n* research in the area of NLP and, particularly, of dialog systems.\n\n## Quick Links\n\n* Demo [*demo.deeppavlov.ai*](https://demo.deeppavlov.ai/)\n* Documentation [*docs.deeppavlov.ai*](http://docs.deeppavlov.ai/)\n    * Model List [*docs:features/*](http://docs.deeppavlov.ai/en/master/features/overview.html)\n    * Contribution Guide [*docs:contribution_guide/*](http://docs.deeppavlov.ai/en/master/devguides/contribution_guide.html)\n* Issues [*github/issues/*](https://github.com/deeppavlov/DeepPavlov/issues)\n* Forum [*forum.deeppavlov.ai*](https://forum.deeppavlov.ai/)\n* Blogs [*medium.com/deeppavlov*](https://medium.com/deeppavlov)\n* [Extended colab tutorials](https://github.com/deeppavlov/dp_tutorials)\n* Docker Hub [*hub.docker.com/u/deeppavlov/*](https://hub.docker.com/u/deeppavlov/) \n    * Docker Images Documentation [*docs:docker-images/*](http://docs.deeppavlov.ai/en/master/intro/installation.html#docker-images)\n\nPlease leave us [your feedback](https://forms.gle/i64fowQmiVhMMC7f9) on how we can improve the DeepPavlov framework.\n\n**Models**\n\n[Named Entity Recognition](http://docs.deeppavlov.ai/en/master/features/models/NER.html) | [Intent/Sentence Classification](http://docs.deeppavlov.ai/en/master/features/models/classification.html) |\n\n[Question Answering over Text (SQuAD)](http://docs.deeppavlov.ai/en/master/features/models/SQuAD.html) | [Knowledge Base Question Answering](http://docs.deeppavlov.ai/en/master/features/models/KBQA.html)\n\n[Sentence Similarity/Ranking](http://docs.deeppavlov.ai/en/master/features/models/neural_ranking.html) | [TF-IDF Ranking](http://docs.deeppavlov.ai/en/master/features/models/tfidf_ranking.html)\n\n[Syntactic Parsing](http://docs.deeppavlov.ai/en/master/features/models/syntax_parser.html) | [Morphological Tagging](http://docs.deeppavlov.ai/en/master/features/models/morpho_tagger.html)\n\n[Automatic Spelling Correction](http://docs.deeppavlov.ai/en/master/features/models/spelling_correction.html) | [Entity Extraction](http://docs.deeppavlov.ai/en/master/features/models/entity_extraction.html)\n\n[Open Domain Questions Answering](http://docs.deeppavlov.ai/en/master/features/models/ODQA.html) | [Russian SuperGLUE](http://docs.deeppavlov.ai/en/master/features/models/superglue.html)\n\n[Relation Extraction](http://docs.deeppavlov.ai/en/master/features/models/relation_extraction.html)\n\n**Embeddings**\n\n[BERT embeddings for the Russian, Polish, Bulgarian, Czech, and informal English](http://docs.deeppavlov.ai/en/master/features/pretrained_vectors.html#bert)\n\n[ELMo embeddings for the Russian language](http://docs.deeppavlov.ai/en/master/features/pretrained_vectors.html#elmo)\n\n[FastText embeddings for the Russian language](http://docs.deeppavlov.ai/en/master/features/pretrained_vectors.html#fasttext)\n\n**Auto ML**\n\n[Tuning Models](http://docs.deeppavlov.ai/en/master/features/hypersearch.html)\n\n**Integrations**\n\n[REST API](http://docs.deeppavlov.ai/en/master/integrations/rest_api.html) | [Socket API](http://docs.deeppavlov.ai/en/master/integrations/socket_api.html)\n\n[Amazon AWS](http://docs.deeppavlov.ai/en/master/integrations/aws_ec2.html)\n\n## Installation\n\n0. DeepPavlov supports `Linux`, `Windows 10+` (through WSL/WSL2), `MacOS` (Big Sur+) platforms, `Python 3.6`, `3.7`, `3.8`, `3.9` and `3.10`.\n    Depending on the model used, you may need from 4 to 16 GB RAM.\n\n1. Create and activate a virtual environment:\n    * `Linux`\n    ```\n    python -m venv env\n    source ./env/bin/activate\n    ```\n2. Install the package inside the environment:\n    ```\n    pip install deeppavlov\n    ```\n\n## QuickStart\n\nThere is a bunch of great pre-trained NLP models in DeepPavlov. Each model is\ndetermined by its config file.\n\nList of models is available on\n[the doc page](http://docs.deeppavlov.ai/en/master/features/overview.html) in\nthe `deeppavlov.configs` (Python):\n\n```python\nfrom deeppavlov import configs\n```\n\nWhen you're decided on the model (+ config file), there are two ways to train,\nevaluate and infer it:\n\n* via [Command line interface (CLI)](https://github.com/deeppavlov/DeepPavlov/blob/master/#command-line-interface-cli) and\n* via [Python](https://github.com/deeppavlov/DeepPavlov/blob/master/#python).\n\n#### GPU requirements\n\nBy default, DeepPavlov installs models requirements from PyPI. PyTorch from PyPI could not support your device CUDA\ncapability. To run supported DeepPavlov models on GPU you should have [CUDA](https://developer.nvidia.com/cuda-toolkit)\ncompatible with used GPU and [PyTorch version](https://github.com/deeppavlov/DeepPavlov/blob/master/deeppavlov/requirements/pytorch.txt) required by DeepPavlov models.\nSee [docs](https://docs.deeppavlov.ai/en/master/intro/quick_start.html#using-gpu) for details.\nGPU with Pascal or newer architecture and 4+ GB VRAM is recommended.\n\n### Command line interface (CLI)\n\nTo get predictions from a model interactively through CLI, run\n\n```bash\npython -m deeppavlov interact <config_path> [-d] [-i]\n```\n\n* `-d` downloads required data - pretrained model files and embeddings (optional).\n* `-i` installs model requirements (optional).\n\nYou can train it in the same simple way:\n\n```bash\npython -m deeppavlov train <config_path> [-d] [-i]\n```\n\nDataset will be downloaded regardless of whether there was `-d` flag or not.\n\nTo train on your own data you need to modify dataset reader path in the\n[train config doc](http://docs.deeppavlov.ai/en/master/intro/config_description.html#train-config).\nThe data format is specified in the corresponding model doc page. \n\nThere are even more actions you can perform with configs:\n\n```bash\npython -m deeppavlov <action> <config_path> [-d] [-i]\n```\n\n* `<action>` can be\n    * `install` to install model requirements (same as `-i`),\n    * `download` to download model's data (same as `-d`),\n    * `train` to train the model on the data specified in the config file,\n    * `evaluate` to calculate metrics on the same dataset,\n    * `interact` to interact via CLI,\n    * `riseapi` to run a REST API server (see\n    [doc](http://docs.deeppavlov.ai/en/master/integrations/rest_api.html)),\n    * `predict` to get prediction for samples from *stdin* or from\n      *<file_path>* if `-f <file_path>` is specified.\n* `<config_path>` specifies path (or name) of model's config file\n* `-d` downloads required data\n* `-i` installs model requirements\n\n\n### Python\n\nTo get predictions from a model interactively through Python, run\n\n```python\nfrom deeppavlov import build_model\n\nmodel = build_model(<config_path>, install=True, download=True)\n\n# get predictions for 'input_text1', 'input_text2'\nmodel(['input_text1', 'input_text2'])\n```\nwhere\n* `install=True` installs model requirements (optional),\n* `download=True` downloads required data from web - pretrained model files and embeddings (optional),\n* `<config_path>` is model name (e.g. `'ner_ontonotes_bert_mult'`), path to the chosen model's config file (e.g.\n  `\"deeppavlov/configs/ner/ner_ontonotes_bert_mult.json\"`),  or `deeppavlov.configs` attribute (e.g.\n  `deeppavlov.configs.ner.ner_ontonotes_bert_mult` without quotation marks).\n\nYou can train it in the same simple way:\n\n```python\nfrom deeppavlov import train_model \n\nmodel = train_model(<config_path>, install=True, download=True)\n```\n\nTo train on your own data you need to modify dataset reader path in the\n[train config doc](http://docs.deeppavlov.ai/en/master/intro/config_description.html#train-config).\nThe data format is specified in the corresponding model doc page. \n\nYou can also calculate metrics on the dataset specified in your config file:\n\n```python\nfrom deeppavlov import evaluate_model \n\nmodel = evaluate_model(<config_path>, install=True, download=True)\n```\n\nDeepPavlov also [allows](https://docs.deeppavlov.ai/en/master/intro/python.html) to build a model from components for\ninference using Python.\n\n## License\n\nDeepPavlov is Apache 2.0 - licensed.\n",
    "bugtrack_url": null,
    "license": "Apache License, Version 2.0",
    "summary": "An open source library for building end-to-end dialog systems and training chatbots.",
    "version": "1.5.0",
    "project_urls": {
        "Download": "https://github.com/deeppavlov/DeepPavlov/archive/1.5.0.tar.gz",
        "Homepage": "https://github.com/deeppavlov/DeepPavlov"
    },
    "split_keywords": [
        "nlp",
        "ner",
        "squad",
        "intents",
        "chatbot"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2e5e43fecb430358d77021227eaf61d4f7c2f51d2e48355cdb1c643b0438abf0",
                "md5": "a9db0c5648c1325fdb69e184b113cdc3",
                "sha256": "d34e87a1973c6554980083d7ccf690b20e0a61fb4c4a46019f47276eff826483"
            },
            "downloads": -1,
            "filename": "deeppavlov-1.5.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "a9db0c5648c1325fdb69e184b113cdc3",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 489374,
            "upload_time": "2023-12-27T14:44:59",
            "upload_time_iso_8601": "2023-12-27T14:44:59.175502Z",
            "url": "https://files.pythonhosted.org/packages/2e/5e/43fecb430358d77021227eaf61d4f7c2f51d2e48355cdb1c643b0438abf0/deeppavlov-1.5.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "97657300994ad59693f0195c7eaf701d6e418598ebcd9dcb386ceaf6fda45536",
                "md5": "e1975429fbc8a233b38632b29b24a49e",
                "sha256": "0af2da0b334d765439099bdf77e08c8981d2f5c6d9d1c4d2359d24b1358b15ec"
            },
            "downloads": -1,
            "filename": "deeppavlov-1.5.0.tar.gz",
            "has_sig": false,
            "md5_digest": "e1975429fbc8a233b38632b29b24a49e",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 288166,
            "upload_time": "2023-12-27T14:45:02",
            "upload_time_iso_8601": "2023-12-27T14:45:02.836047Z",
            "url": "https://files.pythonhosted.org/packages/97/65/7300994ad59693f0195c7eaf701d6e418598ebcd9dcb386ceaf6fda45536/deeppavlov-1.5.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-12-27 14:45:02",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "deeppavlov",
    "github_project": "DeepPavlov",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "lcname": "deeppavlov"
}
        
Elapsed time: 0.15532s