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.55
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.55.tar.gz | 20.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pyannotators_entityfishing-1.6.55-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 30.5 kB
Release files / pyannotators_entityfishing-1.6.55.tar.gz
| Download URL | pyannotators_entityfishing-1.6.55.tar.gz |
|---|---|
| Size | 20.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8d7468cb4215958746ed9d6c4316193b6926a6278e5f73acc4494b5ac8ad0ae3
|
|
BLAKE2b-256 checksum How to use checksums |
874abd84a6d8efd64d6b16a60c07ec76b0e527fd026092fee6337c2191e4d43b
|
| 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.55-py3-none-any.whl
| Download URL | pyannotators_entityfishing-1.6.55-py3-none-any.whl |
|---|---|
| Size | 10.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
371a43c438b04389a02cfc34421f46a78b4cdfec4b2f275c0da237457b497b87
|
|
BLAKE2b-256 checksum How to use checksums |
793c5467d3a2c785721989a5d09fc2f2b166c8bfc348c72c1f59c0f44ebb1c29
|
| 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}
|