0.2.7
Added:
- Added support for Japanese to
DepCCGParser
. (credit: KentaroAOKI #24) - Overhauled the
CircuitAnsatz
interface, and added three new ansätze. - Added helper methods to
CCGTree
to get the children of a tree.
Added a new.tree2diagram
method toTreeReader
, extracted fromTreeReader.sentence2diagram
. - Added a new
TreeReaderMode
namedHEIGHT
. - Added new methods to
Checkpoint
for creating, saving and loading checkpoints for training. - Documentation: added a section for how to select the right model and trainer for training.
- Documentation: added links to glossary terms throughout the documentation.
- Documentation: added UML class diagrams for the sub-packages in lambeq.
Changed:
- Dependencies: bumped the minimum versions of
discopy
andtorch
. IQPAnsatz
now post-selects in the Hadamard basis.PytorchModel
now initialises usingxavier_uniform
.CCGTree.to_json
can now be applied toNone
, returningNone
.- Several slow imports have been deferred, making lambeq much faster to import for the first time.
- In
CCGRule.infer_rule
, direction checks have been made explicit. UnarySwap
is now specified to be aunaryBoxConstructor
.BobcatParser
has been refactored for easier use with external evaluation tools.- Documentation: headings have been organised in the tutorials into subsections.
Fixed:
- Fixed how
CCGRule.infer_rule
assigns apunc + X
instance: if the result isX\X
the assigned rule isCONJUNCTION
, otherwise the rule isREMOVE_PUNCTUATION_LEFT
(similarly for punctuation on the right).
Removed:
- Removed unnecessary override of
.from_diagrams
inNumpyModel
. - Removed unnecessary
kwargs
parameters from several constructors. - Removed unused
special_cases
parameter and_ob
method fromCircuitAnsatz
.