Kazu

Latest version: v2.0.0

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

Scan your dependencies

Page 2 of 3

1.3.0

Features

- CurationProcessor no longer tries to handle curations with INHERIT_FROM_SOURCE_TERM behaviour, as this was causing confusion and conflicts. This is now the responsibility of the caller.
- Updated ontologies for October 2023.

Bugfixes

- Fixed a bug in MemoryEfficientStringMatchingStep where caseinsensitive overlaps caused ontology info to be lost.

1.2.0

Features

- added two new synonym generation routines, VerbPhraseVariantGenerator and TokenListReplacementGenerator
- synonym generators now cache results, and are thus much faster

1.1.2

Bugfixes

- fixed a deprecated Iterable import for python 3.10 compatibility.
- fixed an extra indent in RulesBasedEntityClassDisambiguationFilterStep that led to inappropriate matcher rules.

1.1.1

Bugfixes

- fixed a bug where steps depending on additional dependencies were imported in `steps.__init__.py`

1.1.0

Features

- A couple of easy, non-behaviour changing performance improvements that on their own sped up Kazu around 10% (but other changes in this release will affect this too, and speedup will be workload dependent)
- Added new OpsinStep which maps IUPAC drug strings to canonical SMILES - see the API docs for details.
This functionality is currently experimental and may be changed without making a new major release.
Please [open a GitHub issue](https://github.com/AstraZeneca/KAZU/issues/new) if you wish to use this functionality.
- Ensembl Gene IDs are now grouped by HGNC approved symbols, eliminating disambiguation problems for gene IDs belonging to the same gene.
- Entity produced by TransformersModelForTokenClassificationNerStep but without Mappings will be dropped by default now, in the same way as for other NER steps.
This was an exception to handle an AstraZeneca internal use case that wanted this different, but it could cause issues with MergeOverlappingEntsStep in some cases,
so it is safer to have this off by default.
- New SpacyPipelines abstraction, which allows using the same spaCy pipeline in different places, but only load it once and prevent uncontrolled memory growth.
On the uncontrolled memory growth, see https://github.com/explosion/spaCy/discussions/10015 for why this was happening - the 'fix' is to reload a spaCy pipeline after a certain number of calls.
- Slimmed down base dependencies by removing dependencies for steps not in the base pipeline.
These can be added back in manually in user projects, or use the new `kazu[all-steps]` dependency
group to install dependencies for all steps as before. The docs reflect this, and informative errors
are raised when trying to use these steps when dependencies aren't installed.
- Very large memory savings from an overhaul of the string matching process.
The new version should also be faster in general, but the priority was memory rather than speed (since previously, this step accounted for the majority of kazu's memory usage but only a fraction of its runtime)

Bugfixes

- Curated terms that drop the same normalised version of the term no longer report erroneous warnings.

Deprecations and Removals

- The API for building custom model packs has changed to be more flexible, and more simple.
This is a backwards-incompatible change, but we don't currently expect/know of any non-AstraZeneca users of this script, so won't do a major version bump for it.
Please let us know (in a [GitHub issue](https://github.com/AstraZeneca/KAZU/issues/new)) if you are using this and this change was problematic for you.

1.0.3

Features

- Improved spaCy tokenization for the ExplosionStringMatchingStep.
Previously, this caused us to miss entities that ended with a single-letter uppercase token at the end (like 'Haemophilia A') if it was at the end of a sentence.
- Make SpanFinder return found spans directly, rather than having to access `.closed_spans` after calling, which is easier. Note that `.closed_spans` remains, so this is backwards-compatible.
- Turned on 'strict' mypy checking (with some exceptions as to the exact flags used), and fixed issues that this raised.


Bugfixes

- Fix incorrect caching behaviour of Index TfidfVectorizer builds.
This meant they got rebuilt every time, which meant in turn that the cache and therefore the model pack size grew after use.


Improved Documentation

- Started using docformatter to automatically format docstrings, and tweak minor issues this brought up.
This will help us comply with PEP257 and be consistent across the codebase.


Deprecations and Removals

- Removed various pieces of dead code.
These are very unlikely to have been used by end users, so not deprecating/doing a major version bump.
- Rename Type Alias JsonDictType to JsonEncodable - which is more straightforward/correct what it actually means.
This was used internally to Kazu rather than being expected to be used by end users, so no deprecation/major version bump.

Page 2 of 3

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.