https://github.com/cqcl/lambeq-docs

User manual and example notebooks for the lambeq QNLP library

https://github.com/cqcl/lambeq-docs

Science Score: 36.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
    Links to: arxiv.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (19.0%) to scientific vocabulary

Keywords

python qnlp
Last synced: 6 months ago · JSON representation

Repository

User manual and example notebooks for the lambeq QNLP library

Basic Info
Statistics
  • Stars: 4
  • Watchers: 2
  • Forks: 7
  • Open Issues: 4
  • Releases: 10
Topics
python qnlp
Created over 1 year ago · Last pushed 8 months ago
Metadata Files
Readme Contributing License Support

README.md

λambeq documentation

Build status License PyPI version PyPI downloads arXiv

About this repository

This repository holds the documentation of the lambeq Python library.

About lambeq

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

Getting started with lambeq

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) 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. 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 directory contains notebooks demonstrating usage of the various tools in lambeq.

Example - parsing a sentence into a diagram (see docs/examples/parser.ipynb):

```python from lambeq import BobcatParser

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

Testing lambeq

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.

Building documentation

To build the documentation, first clone locally this repository and install the required dependencies:

bash pip install -r requirements.txt

then run the command:

bash ./build-docs.sh

The docs will be under the build directory just under the repository root. To serve it locally:

bash cd build python -m http.server

and then go to http://localhost:8000 to load the index page.

License

Distributed under the Apache 2.0 license. See LICENSE for more details.

Citation

If you wish to attribute our work, please cite the accompanying paper:

@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}, }

Owner

  • Name: Cambridge Quantum
  • Login: CQCL
  • Kind: organization
  • Location: Cambridge, UK

Quantum Software and Technologies

GitHub Events

Total
  • Create event: 7
  • Issues event: 25
  • Release event: 4
  • Watch event: 4
  • Delete event: 2
  • Issue comment event: 9
  • Member event: 1
  • Push event: 30
  • Pull request review comment event: 3
  • Pull request review event: 18
  • Pull request event: 33
  • Fork event: 4
Last Year
  • Create event: 7
  • Issues event: 25
  • Release event: 4
  • Watch event: 4
  • Delete event: 2
  • Issue comment event: 9
  • Member event: 1
  • Push event: 30
  • Pull request review comment event: 3
  • Pull request review event: 18
  • Pull request event: 33
  • Fork event: 4

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 19
  • Total pull requests: 45
  • Average time to close issues: 19 days
  • Average time to close pull requests: 5 days
  • Total issue authors: 2
  • Total pull request authors: 6
  • Average comments per issue: 0.11
  • Average comments per pull request: 0.82
  • Merged pull requests: 33
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 15
  • Pull requests: 41
  • Average time to close issues: 24 days
  • Average time to close pull requests: 6 days
  • Issue authors: 2
  • Pull request authors: 6
  • Average comments per issue: 0.07
  • Average comments per pull request: 0.9
  • Merged pull requests: 29
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • dimkart (11)
  • neiljdo (9)
Pull Request Authors
  • neiljdo (26)
  • dimkart (17)
  • irfankhan10 (16)
  • goodship1 (6)
  • ouissal-moumou (3)
  • aidanCQ (2)
Top Labels
Issue Labels
fix (3) bug (1)
Pull Request Labels

Dependencies

.github/workflows/docs.yml actions
  • Timmy/plantuml-action v1 composite
  • actions/checkout v4 composite
  • actions/configure-pages v3 composite
  • actions/deploy-pages v1 composite
  • actions/upload-pages-artifact v2 composite
pyproject.toml pypi
requirements.txt pypi
  • alabaster ==0.7.16
  • annotated-types ==0.7.0
  • attrs ==24.2.0
  • babel ==2.16.0
  • beautifulsoup4 ==4.12.3
  • bleach ==6.1.0
  • blis ==0.7.11
  • catalogue ==2.0.10
  • certifi ==2024.7.4
  • charset-normalizer ==3.3.2
  • click ==8.1.7
  • cloudpathlib ==0.18.1
  • confection ==0.1.5
  • contourpy ==1.3.0
  • cycler ==0.12.1
  • cymem ==2.0.8
  • defusedxml ==0.7.1
  • docutils ==0.19
  • fastjsonschema ==2.20.0
  • filelock ==3.15.4
  • fonttools ==4.53.1
  • fsspec ==2024.6.1
  • furo ==2024.7.18
  • graphviz ==0.20.3
  • h5py ==3.11.0
  • huggingface-hub ==0.24.6
  • idna ==3.8
  • imagesize ==1.4.1
  • jinja2 ==3.1.4
  • jsonschema ==4.23.0
  • jsonschema-specifications ==2023.12.1
  • jupyter-client ==8.6.2
  • jupyter-core ==5.7.2
  • jupyterlab-pygments ==0.3.0
  • kiwisolver ==1.4.5
  • lambeq ==0.4.2
  • langcodes ==3.4.0
  • language-data ==1.2.0
  • lark ==1.2.2
  • marisa-trie ==1.2.0
  • markdown-it-py ==3.0.0
  • markupsafe ==2.1.5
  • matplotlib ==3.9.2
  • mdurl ==0.1.2
  • mistune ==2.0.5
  • mpmath ==1.3.0
  • murmurhash ==1.0.10
  • nbclient ==0.10.0
  • nbconvert ==7.16.4
  • nbformat ==5.7.3
  • nbsphinx ==0.8.12
  • networkx ==3.3
  • numpy ==2.1.0
  • numpydoc ==1.5.0
  • opt-einsum ==3.3.0
  • packaging ==24.1
  • pandocfilters ==1.5.1
  • pillow ==10.4.0
  • platformdirs ==4.2.2
  • preshed ==3.0.9
  • pydantic ==2.8.2
  • pydantic-core ==2.20.1
  • pygments ==2.18.0
  • pyparsing ==3.1.4
  • python-dateutil ==2.9.0.post0
  • pytket ==1.31.1
  • pyyaml ==6.0.2
  • pyzmq ==26.2.0
  • qwasm ==1.0.1
  • referencing ==0.35.1
  • regex ==2024.7.24
  • requests ==2.32.3
  • rich ==13.8.0
  • rpds-py ==0.20.0
  • safetensors ==0.4.4
  • scipy ==1.14.1
  • setuptools ==74.0.0
  • shellingham ==1.5.4
  • six ==1.16.0
  • smart-open ==7.0.4
  • snowballstemmer ==2.2.0
  • soupsieve ==2.6
  • spacy ==3.7.6
  • spacy-legacy ==3.0.12
  • spacy-loggers ==1.0.5
  • sphinx ==6.1.3
  • sphinx-argparse ==0.4.0
  • sphinx-basic-ng ==1.0.0b2
  • sphinx-mdinclude ==0.5.4
  • sphinxcontrib-applehelp ==2.0.0
  • sphinxcontrib-devhelp ==2.0.0
  • sphinxcontrib-htmlhelp ==2.1.0
  • sphinxcontrib-jquery ==4.1
  • sphinxcontrib-jsmath ==1.0.1
  • sphinxcontrib-qthelp ==2.0.0
  • sphinxcontrib-serializinghtml ==2.0.0
  • srsly ==2.4.8
  • sympy ==1.13.2
  • tensornetwork ==0.4.6
  • thinc ==8.2.4
  • tinycss2 ==1.3.0
  • tokenizers ==0.19.1
  • torch ==2.4.0
  • tornado ==6.4.1
  • tqdm ==4.66.5
  • traitlets ==5.14.3
  • transformers ==4.44.2
  • typer ==0.12.5
  • typing-extensions ==4.12.2
  • urllib3 ==2.2.2
  • wasabi ==1.1.3
  • weasel ==0.4.1
  • webencodings ==0.5.1
  • wrapt ==1.16.0