Skip to main content

ResuLex

Turns plain resume text into structured JSON: contact details, work history, education, licenses, certifications, skills, languages, specialties and availability. It uses rules, reference vocabularies (O*NET, ESCO, CareerOneStop, NUCC) and the small spaCy English model. No LLM, no network at parse time, and a typical resume parses in tens of milliseconds.

The name is resume + lexicon: every value is found by matching text against a vocabulary of job titles, credentials and skills. That matching works on any text, such as a job description; the structural fields (name, experience, education) expect a resume.

Install

Requires Python 3.12+.

pip install resulex
python -m spacy download en_core_web_sm   # the spaCy model is not on PyPI; install it once

The package ships with a prebuilt index, so parsing works straight away.

Usage

Python

from datetime import date

import resulex

result = resulex.parse(text)  # dict; see Output below
result = resulex.parse(text, today=date(2026, 10, 30))

parser = resulex.Parser()  # loads the index and spaCy once
results = [parser.parse(t) for t in texts]

resulex.parse creates a shared Parser on its first call (about a second), after which each resume takes tens of milliseconds. A missing spaCy model raises resulex.ModelNotInstalledError, and an index that does not match config.toml and vocab/ raises resulex.IndexOutOfDateError; both messages say what to run.

Command line

resulex parse resume.txt                  # print JSON to stdout
cat resume.txt | resulex parse -          # read from stdin
resulex parse resume.txt --today 2026-10-30

--today is the date used for "Present" when computing job durations (default: today). Pass a fixed date to get reproducible output. python -m resulex works the same as resulex.

Browser UI

resulex serve                 # http://127.0.0.1:8000
resulex serve --port 9000

Paste text or drop a .txt file and press Extract (⌘/Ctrl + Enter). The page shows the extracted fields next to the source text, with every value linked to the place in the text it came from. The server listens on localhost only, since resumes are personal data.

Output

The top-level fields are:

Field What it holds
name, credentials, headline Name, post-nominal credentials ("RN, BSN") and headline lines from the top block
email / emails, phone / phones, urls Contact details; phones items have number and type
location {city, state, zip}
job_title, industry From labeled profile exports ("Job Title: ...")
summary, claimed_years Summary paragraph and any "10+ years" claim in it
experience Jobs: title, company, location, start, end, months, bullets
total_experience_months Sum of job intervals, overlaps counted once
education degree, level, field, school, location, year, gpa
occupation_group, occupations Inferred O*NET-SOC major group and up to three likely occupations
licenses, certifications name, acronym, issuer, state, status, year, kind, label, confidence
acronyms Acronym ↔ long form pairs found in the text
languages language and proficiency
skills, specialties text, type, label, confidence, highest confidence first
availability work_mode, shifts, employment_type lists
seniority Level of the latest job title or headline: intern, entry level, senior, lead, manager, director, ...
other_sections Lines of sections the parser recognizes but does not interpret (projects, awards, ...)

label is the canonical name from the vocabulary when a match was found; confidence is 0–1.

Evaluating

uv run resulex eval eval/ --today 2026-10-30

For every NAME.txt in the folder, eval compares the parse with the expected answers in NAME.json and prints what was missed or extra per resume, totals per field, and median/max parse time. Resumes without a matching .json are skipped.

Real resumes are personal data: eval/, resume.txt and *.resume.txt are gitignored. Keep them out of the repository.

How accuracy is calculated

No accuracy figures are published here: they depend on the labeled set in eval/, which stays private. Run eval on your own set to get them.

For each field, eval turns the expected and the parsed value into a set of strings and compares the sets. The strings are exact matches after this per-field normalization (from EVAL_FIELDS in src/resulex/cli.py):

Field Compared as
name, email, phone, total_experience_months the value itself
location "City, ST ZIP"
occupation_group the SOC code, e.g. 29-0000
experience "title @ company [start..end]" per job; a job counts only if all four parts match
education "degree @ school"
licenses, certifications name
specialties text
skills text, lowercased
languages language
availability "field:value", e.g. work_mode:remote

Summed over all resumes, per field:

  • found = |expected ∩ parsed|
  • missed = |expected − parsed|
  • extra = |parsed − expected|

eval prints these three counts. Precision, recall and F1 follow from them:

  • precision = found / (found + extra): how much of what the parser returned is right
  • recall = found / (found + missed): how much of what is in the resume the parser got
  • F1 = 2 · precision · recall / (precision + recall)

A field that is empty in the expected answers and empty in the parse adds nothing to any count.

How confidence is calculated

confidence (0–1) on skills, specialties, licenses and certifications is a score, not a measured probability. A match that links to a vocabulary entity scores (score in match.py):

confidence = min(1, base × specificity × section × (1 + coherence_boost × coherence))
Term Meaning Values (config.toml)
base How the phrase was found ([match.base]) inline list item 0.95, skills-list item 0.9, phrase in running text 0.8, object of a bullet's verb 0.8
specificity How telling the phrase is, computed at build time; 1.0 (cased_credential_spec) for a license or certification matched by its exact-case acronym, since "BLS" is not vague for being short see below
section Where it was found ([match.section]) skills, certifications 1.0; summary, experience 0.85; top 0.8; education, other 0.6
coherence How strongly the entity is linked to the resume's likely occupations: the highest (occupation weight × O*NET link weight) over those occupations 0–1
coherence_boost Weight of that link 0.3

Specificity rewards longer and rarer phrases (specificity in build.py):

rarity      = 1 − ln(df) / ln(N)
specificity = min(1, 0.35 + 0.25 × (words − 1) + 0.45 × rarity)

N is the number of phrases in the index, and df is how many index phrases contain this phrase (as itself or as a run of up to four words). A one-word phrase that appears nowhere else gets 0.35 + 0.45 = 0.8; any two-word phrase that appears nowhere else reaches the cap of 1.

A skill that matches no vocabulary entity is kept only when it is an item of a skills section. It scores base × unlinked_spec × section, where unlinked_spec is 0.6, 0.8 or 0.9 for 1, 2 or 3+ words. Phrases from running text (bullets, summary) count only when they link to a vocabulary entity.

Example: "Outbound prospecting and lead generation" in a skills list matches no entity, so it scores 0.9 (list item) × 0.9 (five words) × 1.0 (skills section) = 0.81.

Results below min_confidence (0.45) are dropped. An entity tied only to other occupation groups than the resume's is not linked at all; one tied to no occupation (such as CPR) always can be. An acronym that names several unrelated entities with no occupation link is also not linked: "EMR" in a nurse's resume is not read as the EMT credential.

What the browser UI's numbers mean

The UI's text mapped and values located figures measure how well the output lines up with the text, not whether it is correct:

  • text mapped = non-blank characters covered by some located value ÷ all non-blank characters
  • values located = extracted values found verbatim in the text ÷ all extracted values (derived fields such as the occupation group are not counted)

How it works

  1. Sections — lines are split into sections by header words listed in [sections] of config.toml.
  2. Contact block — name, email, phone, URLs and location come from the top of the resume.
  3. Experience and education — entries are split on date ranges and parsed into fields; total experience is the union of the job intervals.
  4. Occupation profile — job titles and credentials are matched to O*NET-SOC codes and weighted, which gives the resume an occupation group.
  5. Credentials and skills — phrases are looked up in the index and scored by how they were found, which section they came from, how specific the phrase is and whether it fits the occupation group (so "EMR" in a nurse's resume is not read as the EMT credential).

The modules, in src/resulex/:

File Role
__init__.py Library API: parse, Parser and the error types
cli.py Command line: build, parse, eval, serve
parse.py Resume text → fields
match.py Tokenizer and normalization shared with the build, index lookup, confidence scoring
build.py Compiles vocab/ into index.pkl
config.toml Section headers, scoring weights, stoplists, occupation groups
ui/ Browser UI: server.py serves the page and a /api/parse endpoint

tools/import_vocab.py, outside the package, generates vocab/imported/ from raw reference data.

Development

Requires uv.

uv sync               # installs the package in editable mode, plus en_core_web_sm and openpyxl
uv run resulex build  # compiles src/resulex/vocab/ into src/resulex/index.pkl

index.pkl is not committed. Rebuild it whenever config.toml or anything under vocab/ changes; the parser refuses to run on an out-of-date index and tells you to rebuild.

Vocabulary

The index is built from JSON files in src/resulex/vocab/, one per entity type:

  • vocab/curated/ — hand-maintained lists. Edit these. For a given type, curated entries load before imported ones, so a curated label wins for a shared id.
  • vocab/imported/ — generated by tools/import_vocab.py. Do not edit by hand.

Each file looks like:

{
  "type": "cert",
  "entities": [
    {
      "id": "family nurse practitioner board certified",
      "label": "Family Nurse Practitioner - Board Certified",
      "source": "curated_certifications",
      "aliases": ["ANCC FNP"],
      "cased": ["FNP-BC"],
      "socs": {"29-1171.00": 1.0}
    }
  ]
}

aliases match case-insensitively; cased aliases (acronyms) must match exactly. socs links the entity to O*NET-SOC occupations with a weight. removals.json lists phrases to drop, per type.

After editing, run uv run resulex build.

Regenerating imported vocabulary

Only needed when the raw reference data changes, such as a new O*NET release:

uv run python tools/import_vocab.py --raw ../data

The raw data is not in this repository. tools/import.toml maps each raw source (TSV, CSV, JSON, SQL dumps, XLSX crosswalks) to entity types; paths in it are relative to --raw.

Formatting

uvx ruff format .

Releasing

The wheel includes index.pkl, so build the index before building the package:

uv run resulex build
uv build              # dist/resulex-<version>-py3-none-any.whl and .tar.gz
uv publish            # needs a PyPI token

Bump version in pyproject.toml for every release; PyPI never accepts the same version twice.

License

The code is under the MIT License. The files in src/resulex/vocab/imported/ are derived from third-party reference data (O*NET, ESCO, CareerOneStop, NUCC, GeoNames and others), which keeps its own terms of use.

Metadata

Release files for resulex 0.1.3

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

Source distribution (sdist)

Source distribution for resulex 0.1.3
File Size Uploaded Provenance Actions
resulex-0.1.3.tar.gz 10.7 MB Without provenance Details for resulex-0.1.3.tar.gz

Built distribution (wheel)

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

Total release size: 21.3 MB

Release files / resulex-0.1.3.tar.gz

Download URL resulex-0.1.3.tar.gz
Size 10.7 MB
Tags Source
SHA-256 checksum
How to use checksums
3e7f080b741e61a1d427921d49558a206959b1f7d01f3b2d128e371a64b36430
BLAKE2b-256 checksum
How to use checksums
15d20f1178ef2033ee2869164c7a2328f78ca60492c05a2b437fe9bcbc10bc85
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.6 {"installer":{"name":"uv","version":"0.11.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / resulex-0.1.3-py3-none-any.whl

Download URL resulex-0.1.3-py3-none-any.whl
Size 10.7 MB
Tags Python 3
SHA-256 checksum
How to use checksums
531311c0933f923bd435634908177acfc40cc8119ae056dd7475fbf4a529ce55
BLAKE2b-256 checksum
How to use checksums
74d5971dad275bfc11d537b71df820f4b8c6c7d9bcf9b38cb344b831a8749013
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.6 {"installer":{"name":"uv","version":"0.11.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for resulex 0.1.3

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.

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