Skip to main content

swarmauri_parser_entityrecognition

Swarmauri SDK

swarmauri_parser_entityrecognition

spaCy-based named-entity recognition parser for Swarmauri with structured entity document output.

pypi: swarmauri_parser_entityrecognition Source version: 0.11.0 Python: >=3.10,<3.15 Layer: community Lifecycle: active License: Apache-2.0 Notice: attribution

Monthly PyPI downloads: swarmauri_parser_entityrecognition README hits: swarmauri_parser_entityrecognition

README standards: CI gate Tests: example source Certification: not certified Governance: repository policy Evidence: source and CI

Overview · Installation · Quick Start · Usage · API · Contributing · Governance · License


Overview

Summary

swarmauri_parser_entityrecognition is the Swarmauri named-entity recognition parser built on spaCy. It extracts named entities such as people, organizations, and geopolitical entities from unstructured text and returns Swarmauri Document objects containing the entity text and entity metadata.

Why This Package

  • Turn raw text into structured entity objects inside a Swarmauri parser workflow.
  • Preserve entity labels and entity ids in a predictable Document shape for downstream enrichment, filtering, or indexing.
  • Use spaCy's English NER pipeline when available, while still retaining a minimal fallback path for constrained environments.
  • Fit entity extraction into larger ingestion, retrieval, anonymization, and knowledge-graph workflows.

When to Use

Choose swarmauri_parser_entityrecognition when your integration needs spaCy-based named-entity recognition parser for Swarmauri with structured entity document output. Match the imports below to your application boundary and install its declared dependencies before using the example.

Features

  • Named-entity extraction via spaCy's English NER model.
  • Automatic attempt to download en_core_web_sm if the model is missing.
  • Best-effort fallback behavior for environments where the full model cannot be loaded.
  • Returns Swarmauri Document objects with entity label metadata.
  • Supports Python 3.10, 3.11, 3.12, 3.13, and 3.14.

Non-Goals

swarmauri_parser_entityrecognition owns spaCy-based named-entity recognition parser for Swarmauri with structured entity document output. Its imports do not by themselves configure credentials, deploy a service, or certify the behavior of its consumers. Dependencies and neighboring packages retain their own documented responsibilities.


Getting Started

Prerequisites

Python >=3.10,<3.15 is required. The manifest declares runtime dependencies including spacy, spacy-lookups-data, swarmauri-core, swarmauri-base, swarmauri-standard. Read the example’s inputs and service requirements before execution.

Installation

uv add swarmauri_parser_entityrecognition
pip install swarmauri_parser_entityrecognition

Optional model bootstrap:

python -m spacy download en_core_web_sm

uv

uv add swarmauri_parser_entityrecognition

pip

python -m pip install swarmauri_parser_entityrecognition

Poetry

poetry add swarmauri_parser_entityrecognition

Quick Start

Example

Source: docs/readme/quick_start.py.

from swarmauri_parser_entityrecognition import EntityRecognitionParser

text = (
    "Barack Obama was born in Hawaii and served as "
    "President of the United States."
)
parser = EntityRecognitionParser()
entities = parser.parse(text)

for entity in entities:
    print(entity.content, entity.metadata["entity_type"])

Expected Result

The example demonstrates the documented swarmauri_parser_entityrecognition source boundary or workflow. Complete its required configuration first. README CI checks the maintained source’s syntax and declarations; it does not claim that external services or the application workflow were exercised.


Usage

Common Workflows

Source: docs/readme/usage.py.

from swarmauri_parser_entityrecognition import EntityRecognitionParser

text = (
    "Barack Obama was born in Hawaii and served as "
    "President of the United States."
)
parser = EntityRecognitionParser()
entities = parser.parse(text)

for entity in entities:
    print(entity.content, entity.metadata["entity_type"])

Parse organizations, places, and people

from swarmauri_parser_entityrecognition import EntityRecognitionParser

parser = EntityRecognitionParser()
docs = parser.parse(
    "Apple Inc. is planning to open a new office in New York City, according to CEO Tim Cook."
)

for doc in docs:
    print(doc.content, doc.metadata)

Handle non-string input

from swarmauri_parser_entityrecognition import EntityRecognitionParser

parser = EntityRecognitionParser()
print(parser.parse(42))

Inspect fallback-compatible metadata

from swarmauri_parser_entityrecognition import EntityRecognitionParser

parser = EntityRecognitionParser()
entities = parser.parse("Tim Cook announced new products in New York City for Apple Inc.")
print([entity.metadata for entity in entities])

Configuration

Configure swarmauri_parser_entityrecognition through the APIs in package source; its manifest describes installation requirements, not an implicit service configuration. No additional package-global configuration contract is inferred from dependencies.

Error Handling

The inspected swarmauri_parser_entityrecognition source raises OSError. Handle these at the calling boundary and consult the implementation for the triggering conditions.

Best Practices

  • Preinstall en_core_web_sm in CI and production environments to avoid runtime downloads.
  • Treat the regex fallback as a compatibility path, not as production-quality entity recognition.
  • Strip markup or noisy boilerplate before parsing to improve entity quality.
  • Persist entity spans or link them to downstream IDs if you need durable knowledge-graph or indexing workflows.

Package Boundary

What It Owns

swarmauri_parser_entityrecognition is located in community and owns spaCy-based named-entity recognition parser for Swarmauri with structured entity document output. Source-declared APIs include EntityRecognitionParser. The manifest records its direct dependency boundary.

Public API and Import Surfaces

Import namespace: swarmauri_parser_entityrecognition.

Source-declared exports or types: EntityRecognitionParser.

Inspect package source for exact signatures; this inventory does not designate every internal module as stable.

Entry Points

  • swarmauri.parsers → EntityRecognitionParser → swarmauri_parser_entityrecognition.EntityRecognitionParser:EntityRecognitionParser

Injected Dependencies

The direct installation dependencies of swarmauri_parser_entityrecognition are spacy, spacy-lookups-data, swarmauri-core, swarmauri-base, swarmauri-standard. These declarations do not imply automatic provider selection. Pass collaborators through the explicit constructors or call signatures in package source.

Protocol Consumers

No direct package-manifest dependency on swarmauri_parser_entityrecognition was found in the audited three-repository inventory. External consumers may still use its documented imports or commands.

Extensions

For swarmauri_parser_entityrecognition, use the source-declared public interfaces (EntityRecognitionParser) when composing or extending behavior. Its entry-point section below is authoritative for registered plugins; no additional extension loader is inferred from the package name.


Operations and Readiness

Operational Requirements

Operate swarmauri_parser_entityrecognition according to its actual entry points and collaborators. The dependency and Python requirements in the manifest are prerequisites; deployment topology, credentials, and readiness remain the responsibility of the consuming application unless explicitly documented above.

Health and Observability

This README does not establish a standalone health endpoint for swarmauri_parser_entityrecognition. Observe the concrete caller’s results, exceptions, and existing test reports. An application that embeds this package must define its own health and telemetry contract.

Security and Resource Limits

Apply the input, credential, and resource constraints implemented in package source. The swarmauri_parser_entityrecognition README gate is a documentation check, not a security review or a substitute for the implementation’s limits and caller authorization.

Compatibility

This source version of swarmauri_parser_entityrecognition declares Python >=3.10,<3.15. Consult its dependency constraints before upgrading. Source-version and registry-version badges have separate meanings; this migration makes no additional platform or interoperability certification claim.


Verification

Tests

Run python -m pytest tests/unit/test_readme_sources.py from the swarmauri_parser_entityrecognition package directory for the maintained example source checks (Python compilation and non-Python file presence). Behavioral tests may live in the repository’s shared suites; the new README syntax test is not presented as runtime coverage for spaCy-based named-entity recognition parser for Swarmauri with structured entity document output.

The repository README gate also checks the required heading tree, metadata, managed fragments, and referenced files.

Certification Status

No external certification is asserted for swarmauri_parser_entityrecognition by this documentation migration. README conformance, example syntax, runtime tests, and protocol or security certification are distinct evidence scopes.

Evidence

The README standards CI records mechanical documentation results for its tested commit. The package source and example sources support the package-boundary description; external runtime behavior requires its own test evidence.


FAQ

What does this parser return? A list of Swarmauri Document objects, usually one per detected entity.

Which metadata fields are included? entity_type, entity_id, and text.

What spaCy model does it use? It tries to load en_core_web_sm.

What happens if the model is unavailable? The parser attempts to download the model. If that fails, it falls back to a blank English pipeline plus a small regex-based fallback used as a best-effort compatibility path.

Why

Why select this package? swarmauri_parser_entityrecognition provides spaCy-based named-entity recognition parser for Swarmauri with structured entity document output; use its own API boundary rather than assuming neighboring packages are bundled or configured automatically.

How

How do I start? Install or synchronize the environment under Getting Started, follow the maintained example for swarmauri_parser_entityrecognition, and consult package source for the exact types and signatures involved.

When

When should I validate an upgrade? Recheck swarmauri_parser_entityrecognition whenever its source version, declared collaborators, configuration, or caller changes. Run relevant behavioral tests in addition to the README gate before promotion.


More Documentation


Contributing

How to Contribute

Follow the contribution guide and include a focused example or regression for changes to swarmauri_parser_entityrecognition. Keep package behavior, its documented boundary, and its tests aligned.

Development Setup

Work from the pkgs/50-community/swarmauri_parser_entityrecognition checkout. Synchronize its declared development environment with uv, then run the relevant package tests and python -m pytest tests/unit/test_readme_sources.py. The repository’s dedicated README job installs readme-standards==0.1.3 without resolving unrelated runtime packages.

Notes for Maintainers

Swarmauri Foundations


Governance

Ownership and Decision Making

Changes to swarmauri_parser_entityrecognition follow the maintainer review process of swarmauri/swarmauri-sdk and its contribution guide. Author attribution remains in the manifest; this README does not assign new publishing or administrative authority.

Standards and Policies

swarmauri_parser_entityrecognition follows the versioned package-guide-v1 outline. All fixed headings, hierarchy, order, separators, and package-specific branding are checked by CI; reviewers assess the accuracy and usefulness of authored claims.

Lifecycle and Migration

The swarmauri_parser_entityrecognition source version is 0.11.0.


License and Attribution

License

Licensed under Apache-2.0. See LICENSE.

This project is licensed under the Apache-2.0 License.

Notices

See NOTICE for attribution.

Metadata

Release files for swarmauri_parser_entityrecognition 0.11.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for swarmauri_parser_entityrecognition 0.11.0
File Size Uploaded Provenance Actions
swarmauri_parser_entityrecognition-0.11.0.tar.gz 17.9 kB Without provenance Details for swarmauri_parser_entityrecognition-0.11.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for swarmauri_parser_entityrecognition 0.11.0
File Interpreter ABI Platform Actions
swarmauri_parser_entityrecognition-0.11.0-py3-none-any.whl Python 3 none any Details for swarmauri_parser_entityrecognition-0.11.0-py3-none-any.whl

Total release size: 32.2 kB

Release files / swarmauri_parser_entityrecognition-0.11.0.tar.gz

Download URL swarmauri_parser_entityrecognition-0.11.0.tar.gz
Size 17.9 kB
Tags Source
SHA-256 checksum
How to use checksums
b365d410156cfadce84cddbf0d1fbf26f5d3c7139334653c86e1ed8355afe125
BLAKE2b-256 checksum
How to use checksums
9a50f18c72814213b085e5301e30d9d2d5738c024091b7eeb2bf8644df81329e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.10 {"installer":{"name":"uv","version":"0.13.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / swarmauri_parser_entityrecognition-0.11.0-py3-none-any.whl

Download URL swarmauri_parser_entityrecognition-0.11.0-py3-none-any.whl
Size 14.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f909b58814f0f99cb02f7b15b3c506201e24efa9f95951fa0f9fc9a235729a19
BLAKE2b-256 checksum
How to use checksums
d4ab46acb9ca1306a715b06d9a718dd8d40b2feb4f6ce43dbfa40d0ca73c36c3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.10 {"installer":{"name":"uv","version":"0.13.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for swarmauri_parser_entityrecognition 0.11.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.11.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page