Lambeq

Latest version: v0.4.1

Safety actively analyzes 638452 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 3 of 3

0.2.2

Added:
- Add support for Python 3.10.
- Unify class hierarchies for parsers and readers: `CCGParser` is now a subclass of `Reader` and placed in the common package `text2diagram`. The old packages `reader` and `ccg2discocat` are no longer available. Compatibility problems with previous versions should be minimal, since from Release 0.2.0 and onwards all `lambeq` classes can be imported from the global namespace.
- Add `CurryRewriteRule`, which uses map-state duality in order to remove adjoint types from the boxes of a diagram. When used in conjunction with `discopy.rigid.Diagram.normal_form()`, this removes cups from the diagram, eliminating post-selection.
- The `Bobcat` parser now updates automatically when new versions are made available online.
- Allow customising available root categories for the parser when using the command-line interface.

Fixed:
- Update grammar file of `Bobcat` parser to avoid problems with conflicting unary rules.

0.2.1

Added:
- A new `Checkpoint` class that implements pickling and file operations from `Trainer` and `Model`.

Changed:
- Improvements to the `training` module, allowing multiple diagrams to be accepted as input to the `SPSAOptimizer`.
- Updated documentation, including sub-package structures and class diagrams.

0.2.0

**Added:**
- A new state-of-the-art CCG parser, fully integrated with `lambeq`, which replaces depccg as the default parser of the toolkit. The new `Bobcat` parser has better performance, simplifies installation, and provides compatibility with Windows (which was not supported due to a depccg conflict). depccg is still supported as an alternative external dependency.
- A `training` package, providing a selection of trainers, models, and optimizers that greatly simplify supervised training for most of `lambeq`'s use cases, classical and quantum. The new package adds several new features to `lambeq`, such as the ability to save to and restore models from checkpoints.
- Furthermore, the `training` package uses `DisCoPy`'s tensor network capability to contract tensor diagrams efficiently. In particular, `DisCoPy` 0.4.1's new unitary and density matrix simulators in result in substantially faster training speeds compared to the previous version.
- A command-line interface, which provides most of `lambeq`'s functionality from the command line. For example, `lambeq` can now be used as a standard command-line pregroup parser.
- A web parser class that can send parsing queries to an online API, so that local installation of a parser is not strictly necessary anymore. The web parser is particularly helpful for testing purposes, interactive usage or when a local parser is unavailable, but should not be used for serious experiments.
- A new `lambeq.pregroups` package that provides methods for easy creation of pregroup diagrams, removal of cups, and printing of diagrams in text form (i.e. in a terminal).
- A new `TreeReader` class that exploits the biclosed structure of CCG grammatical derivations.
- Three new rewrite rules for relative pronouns and coordination.
- Tokenisation features have been added in all parsers and readers.
- Additional generator methods and minor improvements for the `CCGBankParser` class.

**Changed:**
- Improved and more detailed package structure.
- Most classes and functions can now be imported from `lambeq` directly, instead of having to import from the sub-packages.
- The `circuit` and `tensor` modules have been combined into an `lambeq.ansatz` package. (However, as mentioned above, the classes and functions they define can now be imported directly from `lambeq` and should continue to do so in future releases.)
- Improved documentation and additional tutorials.

0.1.2

Minor changes:
- Add URLs to setup file

Fixes:
- Fix logo link in README
- Fix missing version when building docs in GitHub action
- Fix typo to description keyword in setup file

0.1.1

Minor changes:
- Update install script to use PyPI package
- Add badges and link to documentation to README file
- Add lambeq logo and link to GitHub to documentation
- Allow documentation to automatically get package version
- Add keywords and classifiers to setup file

Fixes:
- Add `lambeq.circuit` submodule to top-level `lambeq` module
- Fix references to license file

0.1.0

Initial release of lambeq. This contains a lot of core material:

- converting sentences to string diagrams
- CCG parsing, including reading from CCGBank
- support for depccg parsing
- rewriting diagrams
- ansatze for circuits and tensors, including MPS ansatze
- support for JAX and PyTorch integration
- example notebooks and documentation

Page 3 of 3

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.