Taxonomy Library README
This module provides functions for taxonomy creation, text classification, and header translation using AI models and vector similarity search.
Usage
Import the module with:
from bee_taxonomy import taxonomy
Installation
Install the library using pip:
pip install bee-taxonomy
Main Functions
1. taxonomy.propose_taxonomy(field: str, description: str, discrete_fields: list[str] = None)
Purpose: Generate taxonomy suggestions using OpenAI
Parameters:
field: Name of the field to categorizedescription: Description of the field's purposediscrete_fields: Optional specific values to consider
Example:
taxonomy.propose_taxonomy(
field="Color",
description="Vehicle paint color classification",
discrete_fields=["Red", "Blue", "Green", "Custom"]
)
# Returns: ["Red", "Blue", "Green", "Other"]
2. taxonomy.apply_taxonomy_similarity(discrete_fields: list[str], taxonomy: list[str], category_type: str = None)
Purpose: Classify values using semantic similarity with vector database
Parameters:
discrete_fields: Values to classifytaxonomy: List of allowed classification termscategory_type: Special processing for categories like 'streets'
Example:
taxonomy.apply_taxonomy_similarity(
discrete_fields=["Rd", "Street", "Ave"],
taxonomy=["Road", "Street", "Avenue"],
category_type="streets"
)
# Returns: {'Rd': {'match': 'Road', 'score': 0.92}, ...}
3. taxonomy.apply_taxonomy_reasoning(discrete_fields: list[str], taxonomy: list[str], classification_description: str, hash_file: str = None)
Purpose: Use AI reasoning to classify values into taxonomy
Parameters:
discrete_fields: List of values to classifytaxonomy: List of allowed categoriesclassification_description: Context for classificationhash_file: Optional file hash for progress tracking
Example:
taxonomy.apply_taxonomy_reasoning(
discrete_fields=["Quick Brown Fox", "Lazy Dog"],
taxonomy=["Animal", "Object", "Action"],
classification_description="Classify animal-related phrases"
)
# Returns: {'Quick Brown Fox': 'Animal', 'Lazy Dog': 'Animal'
4. taxonomy.translate_headers_reasoning(src_lang, dest_lang, headers)
Purpose: Translate headers between languages using AI reasoning
Parameters:
src_lang: Source language codedest_lang: Target language codeheaders: List of headers to translate
Example:
taxonomy.translate_headers_reasoning(
src_lang="en",
dest_lang="es",
headers=["Street Name", "Zip Code"]
)
# Returns: {'Street Name': 'Nombre de la Calle', 'Zip Code': 'Código Postal'
5. taxonomy.analyze_text_field(field_name: str, field_value: str, task: Literal["label", "summarize"] = "label")
Purpose: Analyze text fields for classification or summarization
Parameters:
field_name: Name of the text fieldfield_value: Text to analyzetask: "label" for classification or "summarize" for text summary
Example:
taxonomy.analyze_text_field(
field_name="Product Description",
field_value="This ergonomic chair provides lumbar support and adjustable height",
task="label"
)
# Returns: "Office Furniture"
Environment Variables
Users must rename .env.example to .env and fill in all the required fields with their specific values:
MODEL_NAME: Hugging Face model identifierSERVER_URL: Base URL for OpenAI-compatible APIAPI_KEY: Authentication token for the APIEMBEDDER_MODEL: Embedding model for semantic similarityEMBEDDER_SERVER_URL: Base URL for OpenAI-compatible API for embedder model
Features
- Validation workflow with Pydantic models
- Progress checkpointing for large datasets
- Google search integration for ambiguous classifications
Metadata
Release files for bee-taxonomy 0.0.17
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| bee_taxonomy-0.0.17.tar.gz | 28.1 kB | With provenance | Details for bee_taxonomy-0.0.17.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| bee_taxonomy-0.0.17-py3-none-any.whl | Python 3 | none | any | Details for bee_taxonomy-0.0.17-py3-none-any.whl |
Total release size: 42.9 kB
Release files / bee_taxonomy-0.0.17.tar.gz
| Download URL | bee_taxonomy-0.0.17.tar.gz |
|---|---|
| Size | 28.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2b6c134bbeeb7a8acc8cba6927254792e7ffb31d812e54fd3a863025848bf40a
|
|
BLAKE2b-256 checksum How to use checksums |
8f68f8e599d28b24daf8d609bc1521db422ab7bf162b5dfe9226256e19354887
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 23, 2026.
Transparency logRelease files / bee_taxonomy-0.0.17-py3-none-any.whl
| Download URL | bee_taxonomy-0.0.17-py3-none-any.whl |
|---|---|
| Size | 14.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c5f059cfc39b3590487abba33bf94461590174d21183c82bdadc2718a1c6855f
|
|
BLAKE2b-256 checksum How to use checksums |
26b514f1b304785e517723ae309fcbee8f29e19cb0a372be65b2aafa50fc0239
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 23, 2026.
Transparency logSecurity for bee-taxonomy 0.0.17
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for bee_taxonomy-0.0.17.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 23, 2026.
Transparency logA 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.