pyannotators-entityfishing
Annotator based on entity-fishing for named entity recognition and disambiguation against Wikidata.
Installation
pip install pyannotators-entityfishing
For noun-form filtering (optional):
pip install pyannotators-entityfishing[spacy]
python -m spacy download en_core_web_sm # or other language models
Usage
from pymultirole_plugins.v1.schema import Document
from pyannotators_entityfishing.entityfishing import EntityFishingAnnotator, EntityFishingParameters
annotator = EntityFishingAnnotator()
parameters = EntityFishingParameters(
default_label="ENTITY",
minSelectorScore=0.3,
)
docs = annotator.annotate(
[Document(text="Albert Einstein was born in Ulm.", metadata={"language": "en"})],
parameters,
)
for ann in docs[0].annotations:
print(f"{ann.start}:{ann.end} {ann.labelName} {ann.terms[0].identifier}")
Development
Install test dependencies:
uv pip install -e ".[test]"
Linting
uv run ruff check src/ tests/
uv run ruff format --check src/ tests/
Testing
uv run pytest
Coverage
uv run pytest --cov=src --cov-report=term-missing
SBOM & vulnerability check
Install the SBOM dependencies:
uv sync --extra sbom
Generate a CycloneDX SBOM from the current environment:
uv run cyclonedx-py environment -o sbom.cdx.json --output-format json
Audit dependencies for known vulnerabilities:
uv run pip-audit --format json --output audit-report.json
To fail on any known vulnerability (useful in CI):
uv run pip-audit --strict
Release files for pyannotators-entityfishing 1.6.57
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pyannotators_entityfishing-1.6.57.tar.gz | 20.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pyannotators_entityfishing-1.6.57-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 30.5 kB
Release files / pyannotators_entityfishing-1.6.57.tar.gz
| Download URL | pyannotators_entityfishing-1.6.57.tar.gz |
|---|---|
| Size | 20.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
732aecb9b58e33f0407048890643e4a6efc0e1de28a59cd59d0b063f16ee5355
|
|
BLAKE2b-256 checksum How to use checksums |
2d39f06d86585c97ea51c918ca0495caa52b7f1f9a3e2539b819b7f13511ff78
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.15 {"installer":{"name":"uv","version":"0.12.15","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"12","id":"bookworm","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / pyannotators_entityfishing-1.6.57-py3-none-any.whl
| Download URL | pyannotators_entityfishing-1.6.57-py3-none-any.whl |
|---|---|
| Size | 10.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
210776474ffec0979ef8541646e1bf2b7671f6bb266baa35a6728e967d97d212
|
|
BLAKE2b-256 checksum How to use checksums |
7d23c9fe3a1cbbd2613353844bc58dd627ac7c33bf7240f782ced00ca67e872c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.15 {"installer":{"name":"uv","version":"0.12.15","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"12","id":"bookworm","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|