lambeq


Namelambeq JSON
Version 0.4.3 PyPI version JSON
download
home_pagehttps://cqcl.github.io/lambeq-docs
SummaryA QNLP toolkit
upload_time2024-09-02 14:16:08
maintainerNone
docs_urlNone
authorCambridge Quantum QNLP team
requires_python>=3.10
licenseApache-2.0
keywords category theory ccg circuits combinatory categorial grammar diagrams discocat language linguistics natural language processing nlp qnlp quantum quantum computing quantum natural language processing quantum nlp
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # lambeq

[![lambeq logo](https://cqcl.github.io/lambeq-docs/_static/lambeq_logo.png)](//cqcl.github.io/lambeq-docs)

![Build status](https://github.com/CQCL/lambeq/actions/workflows/build_test.yml/badge.svg)
[![License](https://img.shields.io/github/license/CQCL/lambeq)](LICENSE)
[![PyPI version](https://img.shields.io/pypi/v/lambeq)](//pypi.org/project/lambeq)
[![PyPI downloads](https://img.shields.io/pypi/dm/lambeq)](//pypi.org/project/lambeq)
[![arXiv](https://img.shields.io/badge/arXiv-2110.04236-green)](//arxiv.org/abs/2110.04236)

## About

lambeq is a toolkit for quantum natural language processing (QNLP).

- Documentation: https://cqcl.github.io/lambeq-docs/
- User support: <lambeq-support@cambridgequantum.com>
- Contributions: Please read [our guide](https://cqcl.github.io/lambeq-docs/CONTRIBUTING.html).
- If you want to subscribe to lambeq's mailing list, let us know by sending an email to <lambeq-support@cambridgequantum.com>.

## Getting started

### Prerequisites

- Python 3.10+

### Installation

lambeq can be installed with the command:

```bash
pip install lambeq
```

The default installation of lambeq includes Bobcat parser, a state-of-the-art statistical parser (see [related paper](https://arxiv.org/abs/2109.10044)) fully integrated with the toolkit.

To install lambeq with optional dependencies for extra features, run:

```bash
pip install lambeq[extras]
```

To enable DepCCG support, you will need to install the external parser separately.

---
**Note:** The DepCCG-related functionality is no longer actively supported in `lambeq`, and may not work as expected. We strongly recommend using the default Bobcat parser which comes as part of `lambeq`.

---

If you still want to use DepCCG, for example because you plan to apply ``lambeq`` on Japanese, you can install DepCCG separately following the instructions on the [DepCCG homepage](//github.com/masashi-y/depccg). After installing DepCCG, you can download its model by using the script provided in the `contrib` folder of this repository:

```bash
python contrib/download_depccg_model.py
```

## Usage

The [docs/examples](//github.com/CQCL/lambeq-docs/tree/main/docs/examples)
directory in lambeq's [documentation repository](https://github.com/CQCL/lambeq-docs) contains notebooks demonstrating usage of the various tools in lambeq.

Example - parsing a sentence into a diagram (see
[docs/examples/parser.ipynb](//github.com/CQCL/lambeq-docs/blob/main/docs/examples/parser.ipynb)):

```python
from lambeq import BobcatParser

parser = BobcatParser()
diagram = parser.sentence2diagram('This is a test sentence')
diagram.draw()
```

## Testing

Run all tests with the command:

```bash
pytest
```

Note: if you have installed lambeq in a virtual environment, remember to
install pytest in the same environment using pip.

## License

Distributed under the Apache 2.0 license. See [`LICENSE`](LICENSE) for
more details.

## Citation

If you wish to attribute our work, please cite
[the accompanying paper](//arxiv.org/abs/2110.04236):

```
@article{kartsaklis2021lambeq,
   title={lambeq: {A}n {E}fficient {H}igh-{L}evel {P}ython {L}ibrary for {Q}uantum {NLP}},
   author={Dimitri Kartsaklis and Ian Fan and Richie Yeung and Anna Pearson and Robin Lorenz and Alexis Toumi and Giovanni de Felice and Konstantinos Meichanetzidis and Stephen Clark and Bob Coecke},
   year={2021},
   journal={arXiv preprint arXiv:2110.04236},
}
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://cqcl.github.io/lambeq-docs",
    "name": "lambeq",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": "category theory, ccg, circuits, combinatory categorial grammar, diagrams, discocat, language, linguistics, natural language processing, nlp, qnlp, quantum, quantum computing, quantum natural language processing, quantum nlp",
    "author": "Cambridge Quantum QNLP team",
    "author_email": "lambeq-support@cambridgequantum.com",
    "download_url": "https://files.pythonhosted.org/packages/d0/cb/ec8bf15ac0e5a91d462e2bfcd7afb0b044810d0977cf1c7baf77944e7a1b/lambeq-0.4.3.tar.gz",
    "platform": null,
    "description": "# lambeq\n\n[![lambeq logo](https://cqcl.github.io/lambeq-docs/_static/lambeq_logo.png)](//cqcl.github.io/lambeq-docs)\n\n![Build status](https://github.com/CQCL/lambeq/actions/workflows/build_test.yml/badge.svg)\n[![License](https://img.shields.io/github/license/CQCL/lambeq)](LICENSE)\n[![PyPI version](https://img.shields.io/pypi/v/lambeq)](//pypi.org/project/lambeq)\n[![PyPI downloads](https://img.shields.io/pypi/dm/lambeq)](//pypi.org/project/lambeq)\n[![arXiv](https://img.shields.io/badge/arXiv-2110.04236-green)](//arxiv.org/abs/2110.04236)\n\n## About\n\nlambeq is a toolkit for quantum natural language processing (QNLP).\n\n- Documentation: https://cqcl.github.io/lambeq-docs/\n- User support: <lambeq-support@cambridgequantum.com>\n- Contributions: Please read [our guide](https://cqcl.github.io/lambeq-docs/CONTRIBUTING.html).\n- If you want to subscribe to lambeq's mailing list, let us know by sending an email to <lambeq-support@cambridgequantum.com>.\n\n## Getting started\n\n### Prerequisites\n\n- Python 3.10+\n\n### Installation\n\nlambeq can be installed with the command:\n\n```bash\npip install lambeq\n```\n\nThe default installation of lambeq includes Bobcat parser, a state-of-the-art statistical parser (see [related paper](https://arxiv.org/abs/2109.10044)) fully integrated with the toolkit.\n\nTo install lambeq with optional dependencies for extra features, run:\n\n```bash\npip install lambeq[extras]\n```\n\nTo enable DepCCG support, you will need to install the external parser separately.\n\n---\n**Note:** The DepCCG-related functionality is no longer actively supported in `lambeq`, and may not work as expected. We strongly recommend using the default Bobcat parser which comes as part of `lambeq`.\n\n---\n\nIf you still want to use DepCCG, for example because you plan to apply ``lambeq`` on Japanese, you can install DepCCG separately following the instructions on the [DepCCG homepage](//github.com/masashi-y/depccg). After installing DepCCG, you can download its model by using the script provided in the `contrib` folder of this repository:\n\n```bash\npython contrib/download_depccg_model.py\n```\n\n## Usage\n\nThe [docs/examples](//github.com/CQCL/lambeq-docs/tree/main/docs/examples)\ndirectory in lambeq's [documentation repository](https://github.com/CQCL/lambeq-docs) contains notebooks demonstrating usage of the various tools in lambeq.\n\nExample - parsing a sentence into a diagram (see\n[docs/examples/parser.ipynb](//github.com/CQCL/lambeq-docs/blob/main/docs/examples/parser.ipynb)):\n\n```python\nfrom lambeq import BobcatParser\n\nparser = BobcatParser()\ndiagram = parser.sentence2diagram('This is a test sentence')\ndiagram.draw()\n```\n\n## Testing\n\nRun all tests with the command:\n\n```bash\npytest\n```\n\nNote: if you have installed lambeq in a virtual environment, remember to\ninstall pytest in the same environment using pip.\n\n## License\n\nDistributed under the Apache 2.0 license. See [`LICENSE`](LICENSE) for\nmore details.\n\n## Citation\n\nIf you wish to attribute our work, please cite\n[the accompanying paper](//arxiv.org/abs/2110.04236):\n\n```\n@article{kartsaklis2021lambeq,\n   title={lambeq: {A}n {E}fficient {H}igh-{L}evel {P}ython {L}ibrary for {Q}uantum {NLP}},\n   author={Dimitri Kartsaklis and Ian Fan and Richie Yeung and Anna Pearson and Robin Lorenz and Alexis Toumi and Giovanni de Felice and Konstantinos Meichanetzidis and Stephen Clark and Bob Coecke},\n   year={2021},\n   journal={arXiv preprint arXiv:2110.04236},\n}\n```\n",
    "bugtrack_url": null,
    "license": "Apache-2.0",
    "summary": "A QNLP toolkit",
    "version": "0.4.3",
    "project_urls": {
        "Download": "https://pypi.org/project/lambeq",
        "Homepage": "https://cqcl.github.io/lambeq-docs",
        "Source Code": "https://github.com/CQCL/lambeq"
    },
    "split_keywords": [
        "category theory",
        " ccg",
        " circuits",
        " combinatory categorial grammar",
        " diagrams",
        " discocat",
        " language",
        " linguistics",
        " natural language processing",
        " nlp",
        " qnlp",
        " quantum",
        " quantum computing",
        " quantum natural language processing",
        " quantum nlp"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "63a7562ce1a102ea3cb1dfaa50a86741fbf5d56a583c0fcbdc3da47fa504c5c4",
                "md5": "5b84c40a4da55a37ca295563febb57d1",
                "sha256": "0070220f3feb4b64feb099d9cada7d83764446527d56232d7a82d37f88c21507"
            },
            "downloads": -1,
            "filename": "lambeq-0.4.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "5b84c40a4da55a37ca295563febb57d1",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 210304,
            "upload_time": "2024-09-02T14:16:06",
            "upload_time_iso_8601": "2024-09-02T14:16:06.146117Z",
            "url": "https://files.pythonhosted.org/packages/63/a7/562ce1a102ea3cb1dfaa50a86741fbf5d56a583c0fcbdc3da47fa504c5c4/lambeq-0.4.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d0cbec8bf15ac0e5a91d462e2bfcd7afb0b044810d0977cf1c7baf77944e7a1b",
                "md5": "b268713b40445aa4f045183cc341a7f0",
                "sha256": "84ab792eb49797bd7594288ff546535078c39f44311259db1700e54a7fbdf070"
            },
            "downloads": -1,
            "filename": "lambeq-0.4.3.tar.gz",
            "has_sig": false,
            "md5_digest": "b268713b40445aa4f045183cc341a7f0",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 236376,
            "upload_time": "2024-09-02T14:16:08",
            "upload_time_iso_8601": "2024-09-02T14:16:08.268469Z",
            "url": "https://files.pythonhosted.org/packages/d0/cb/ec8bf15ac0e5a91d462e2bfcd7afb0b044810d0977cf1c7baf77944e7a1b/lambeq-0.4.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-09-02 14:16:08",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "CQCL",
    "github_project": "lambeq",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "lambeq"
}
        
Elapsed time: 4.07585s