Skip to main content

JobTitleTransformer

JobTitleTransformer is an enterprise-grade, hybrid NLP pipeline designed to ingest, sanitize, and normalize highly unstructured, multi-lingual healthcare job titles into a standardized corporate taxonomy.

Built for seamless integration into broader ETL workflows, this library ensures high-quality Data Modeling for Downstream Platforms , including Data Lakes, Data Hubs, Data Warehouses, Data Marts, and Semantic Models.

🏗️ Pipeline Architecture

The transformation engine operates in a deterministic-to-probabilistic cascading sequence to balance execution speed with high recall:

  1. Vectorized Text Preprocessing: Utilizes Pandas vectorized string operations for high-performance HTML entity decoding (html.unescape), Unicode normalization (NFKD), and automated noise/garbage character removal via compiled Regular Expressions.

  2. Deterministic Rules Engine: Executes 100+ modular taxonomy scripts utilizing exact-match dictionary hashing and complex RegEx patterns for rapid, precise mapping of known variants, typos, and edge cases.

  3. Machine Learning Semantic Search (Fallback): Unmatched string records are passed to an AI fallback layer. The pipeline generates vector embeddings using SBERT (all-MiniLM-L6-v2) and performs an L2 distance vector search via Facebook AI Similarity Search (FAISS) to semantically map unmatched job titles to the closest valid business category.

  4. Automated Data Integrity Gates: Implements strict pre- and post-execution dataframe row-count validations to guarantee idempotency and zero data loss during transformations.

⚠️ Domain Constraint:** The taxonomy dictionary and ML embeddings are strictly optimized for the Healthcare and Medical sectors.


⚙️ Installation

pip install jobtitletransformer

⚠️ Requirements:

  • Python 3.9+
  • pandas
  • sentence-transformers
  • faiss-cpu

All dependencies install automatically with pip install jobtitletransformer


🚀 Integration & Usage

Critical Dataframe Contract: This library currently expects the input dataframe to be instantiated as df and the target text column to be explicitly named speciality.

# Environment & Installation Diagnostics
# The following checks verify that the package is correctly installed 
# and accessible within your active Python environment.

import sys
import importlib.util

print("sys.path:", sys.path)

# Verify the package specification exists before attempting import

spec = importlib.util.find_spec("JobTitleTransformer")
print("JobTitleTransformer found at:", spec.origin if spec else "NOT FOUND")

# Import the core package

import JobTitleTransformer  # note: the import name is case-sensitive

print("JobTitleTransformer loaded from:", JobTitleTransformer.__file__)

# Data Ingestion

import pandas as pd

# Load your raw dataset. 
# Note: This can be adapted for SQL queries, JSON, or any Pandas-supported format.

raw_data = pd.read_csv("raw_healthcare_contacts.csv")

# Schema Enforcement
# The pipeline relies on a strict schema contract: 
# The dataframe must be named 'df' and the target column must be 'speciality'.
# We append .copy() to ensure we are working with a fresh dataframe in memory 
# and to prevent Pandas 'SettingWithCopy' warnings downstream.

df = raw_data.rename(columns={"job_title": "speciality"}).copy()

# Pipeline Execution
# Pass the dataframe into the transformation hub.
# The engine will sequentially execute RegEx dictionaries -> SBERT embeddings -> FAISS matching.
# It prints CLI diagnostics during execution and returns the fully normalized dataframe.

enriched_df = JobTitleTransformer.run_pipeline(df)

🧠 Author & Maintainer

Prasanna - Senior Data Engineer & Analytics Specialist

📧 prasannadatabuss@gmail.com

🌐 GitHub: PrasannaDataBus

Metadata

Release files for jobtitletransformer 0.1.22

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

Source distribution (sdist)

Source distribution for jobtitletransformer 0.1.22
File Size Uploaded Provenance
jobtitletransformer-0.1.22.tar.gz 87.0 kB Without provenance Details

Built distribution (wheel)

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

Total release size: 271.6 kB

Release files / jobtitletransformer-0.1.22.tar.gz

Download URL jobtitletransformer-0.1.22.tar.gz
Size 87.0 kB
Tags Source
SHA-256 checksum
How to use checksums
a2b0ed9d1557b5c0cacb0cee65d2d4f67da1ceaf7182dce60341339acc9fb4dd
BLAKE2b-256 checksum
How to use checksums
474db7198d88ad5b827706678de933796cc8266d6ef810588e0e10d9236b96fa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.10

Release files / jobtitletransformer-0.1.22-py3-none-any.whl

Download URL jobtitletransformer-0.1.22-py3-none-any.whl
Size 184.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e25a8ddb89ba85b5f1ad44cedbc9b7acab91dd7cf8ea2b1e6117fc818d46937f
BLAKE2b-256 checksum
How to use checksums
af7d938a8fdfb816985a5b4ab5d0f372b01e99b9e3a98c8ed9b57d478dccd7ff
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.10

Security for jobtitletransformer 0.1.22

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.1.22 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