shallowpavlov


Nameshallowpavlov JSON
Version 0.0.2 PyPI version JSON
download
home_pagehttps://github.com/deepmipt/DeepPavlov
SummaryAn open source library for building end-to-end dialog systems and training chatbots.
upload_time2023-05-20 21:23:54
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/deepmipt/DeepPavlov/blob/master/LICENSE)
![Python 3.6, 3.7, 3.8, 3.9](https://img.shields.io/badge/python-3.6%20%7C%203.7%20%7C%203.8%20%7C%203.9-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/deepmipt/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/deepmipt/DeepPavlov/issues)
* Forum [*forum.deeppavlov.ai*](https://forum.deeppavlov.ai/)
* Blogs [*medium.com/deeppavlov*](https://medium.com/deeppavlov)
* Tutorials [*examples/*](https://github.com/deepmipt/DeepPavlov/tree/master/examples) and [extended colab tutorials](https://github.com/deepmipt/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/classifiers.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) 

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

[Russian SuperGLUE](http://docs.deeppavlov.ai/en/master/features/models/superglue.html)

**Skills**

[Open Domain Questions Answering](http://docs.deeppavlov.ai/en/master/features/skills/odqa.html)

[Frequently Asked Questions Answering](http://docs.deeppavlov.ai/en/master/features/skills/faq.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. We support `Linux` platform, `Python 3.6`, `3.7`, `3.8` and `3.9`
    * **`Python 3.5` is not supported!**

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/deepmipt/DeepPavlov/blob/master/#command-line-interface-cli) and
* via [Python](https://github.com/deepmipt/DeepPavlov/blob/master/#python).

#### GPU requirements

To run supported DeepPavlov models on GPU you should have [CUDA](https://developer.nvidia.com/cuda-toolkit) compatible
with used GPU and [library PyTorch version](https://github.com/deepmipt/DeepPavlov/blob/master/deeppavlov/requirements/pytorch.txt).

### Command line interface (CLI)

To get predictions from a model interactively through CLI, run

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

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

You can train it in the same simple way:

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

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]
```

* `<action>` can be
    * `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


### Python

To get predictions from a model interactively through Python, run

```python
from deeppavlov import build_model

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

# get predictions for 'input_text1', 'input_text2'
model(['input_text1', 'input_text2'])
```

* where `download=True` downloads required data from web -- pretrained model
  files and embeddings (optional),
* `<config_path>` is 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>, download=True)
```

* `download=True` downloads pretrained model, therefore the pretrained
model will be, first, loaded and then train (optional).

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. 

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

```python
from deeppavlov import evaluate_model 

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


## License

DeepPavlov is Apache 2.0 - licensed.

##

<p align="center">
<img src="https://raw.githubusercontent.com/deepmipt/DeepPavlov/master/docs/_static/ipavlov_footer.png" width="50%" height="50%"/>
</p>

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/deepmipt/DeepPavlov",
    "name": "shallowpavlov",
    "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/c9/70/862f429b7a3e8933cdd2bb332840200949a6599c040357366b6d91bb3339/shallowpavlov-0.0.2.tar.gz",
    "platform": null,
    "description": "[![License Apache 2.0](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://github.com/deepmipt/DeepPavlov/blob/master/LICENSE)\n![Python 3.6, 3.7, 3.8, 3.9](https://img.shields.io/badge/python-3.6%20%7C%203.7%20%7C%203.8%20%7C%203.9-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/deepmipt/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/deepmipt/DeepPavlov/issues)\n* Forum [*forum.deeppavlov.ai*](https://forum.deeppavlov.ai/)\n* Blogs [*medium.com/deeppavlov*](https://medium.com/deeppavlov)\n* Tutorials [*examples/*](https://github.com/deepmipt/DeepPavlov/tree/master/examples) and [extended colab tutorials](https://github.com/deepmipt/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/classifiers.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[Automatic Spelling Correction](http://docs.deeppavlov.ai/en/master/features/models/spelling_correction.html) | [Entity Linking](http://docs.deeppavlov.ai/en/master/features/models/entity_linking.html)\n\n[Russian SuperGLUE](http://docs.deeppavlov.ai/en/master/features/models/superglue.html)\n\n**Skills**\n\n[Open Domain Questions Answering](http://docs.deeppavlov.ai/en/master/features/skills/odqa.html)\n\n[Frequently Asked Questions Answering](http://docs.deeppavlov.ai/en/master/features/skills/faq.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. We support `Linux` platform, `Python 3.6`, `3.7`, `3.8` and `3.9`\n    * **`Python 3.5` is not supported!**\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/deepmipt/DeepPavlov/blob/master/#command-line-interface-cli) and\n* via [Python](https://github.com/deepmipt/DeepPavlov/blob/master/#python).\n\n#### GPU requirements\n\nTo run supported DeepPavlov models on GPU you should have [CUDA](https://developer.nvidia.com/cuda-toolkit) compatible\nwith used GPU and [library PyTorch version](https://github.com/deepmipt/DeepPavlov/blob/master/deeppavlov/requirements/pytorch.txt).\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]\n```\n\n* `-d` downloads required data -- pretrained model files and embeddings\n  (optional).\n\nYou can train it in the same simple way:\n\n```bash\npython -m deeppavlov train <config_path> [-d]\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]\n```\n\n* `<action>` can be\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\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>, download=True)\n\n# get predictions for 'input_text1', 'input_text2'\nmodel(['input_text1', 'input_text2'])\n```\n\n* where `download=True` downloads required data from web -- pretrained model\n  files and embeddings (optional),\n* `<config_path>` is path to the chosen model's config file (e.g.\n  `\"deeppavlov/configs/ner/ner_ontonotes_bert_mult.json\"`) or\n  `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>, download=True)\n```\n\n* `download=True` downloads pretrained model, therefore the pretrained\nmodel will be, first, loaded and then train (optional).\n\nDataset will be downloaded regardless of whether there was ``-d`` flag or\nnot.\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>, download=True)\n```\n\n\n## License\n\nDeepPavlov is Apache 2.0 - licensed.\n\n##\n\n<p align=\"center\">\n<img src=\"https://raw.githubusercontent.com/deepmipt/DeepPavlov/master/docs/_static/ipavlov_footer.png\" width=\"50%\" height=\"50%\"/>\n</p>\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": "0.0.2",
    "project_urls": {
        "Download": "https://github.com/deepmipt/DeepPavlov/archive/1.0.0rc1.tar.gz",
        "Homepage": "https://github.com/deepmipt/DeepPavlov"
    },
    "split_keywords": [
        "nlp",
        "ner",
        "squad",
        "intents",
        "chatbot"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c76801dfa433447ad694863598a6ea4ce97e407e6277ee0fc9e268f8afd43a10",
                "md5": "69b43e8c37eefe29131fc7ed96953bf1",
                "sha256": "0d733811d8aa2b535758859997d18f1069503f6924d410454560e5f0572674db"
            },
            "downloads": -1,
            "filename": "shallowpavlov-0.0.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "69b43e8c37eefe29131fc7ed96953bf1",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 460261,
            "upload_time": "2023-05-20T21:23:52",
            "upload_time_iso_8601": "2023-05-20T21:23:52.667043Z",
            "url": "https://files.pythonhosted.org/packages/c7/68/01dfa433447ad694863598a6ea4ce97e407e6277ee0fc9e268f8afd43a10/shallowpavlov-0.0.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c970862f429b7a3e8933cdd2bb332840200949a6599c040357366b6d91bb3339",
                "md5": "120d99bff842707a7642d37471260c9e",
                "sha256": "ca52a52f25ead8f1b3b9a9b32ac516cf21e284c148805e3eb7bf6ae4bd2ee7a9"
            },
            "downloads": -1,
            "filename": "shallowpavlov-0.0.2.tar.gz",
            "has_sig": false,
            "md5_digest": "120d99bff842707a7642d37471260c9e",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 267127,
            "upload_time": "2023-05-20T21:23:54",
            "upload_time_iso_8601": "2023-05-20T21:23:54.683458Z",
            "url": "https://files.pythonhosted.org/packages/c9/70/862f429b7a3e8933cdd2bb332840200949a6599c040357366b6d91bb3339/shallowpavlov-0.0.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-05-20 21:23:54",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "deepmipt",
    "github_project": "DeepPavlov",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "lcname": "shallowpavlov"
}
        
Elapsed time: 0.23812s