Skip to main content

Affiliation Regex Parser

A lightweight, regex-based Python library for parsing academic author affiliation strings into structured fields (departments, institutes, universities, organizations, cities, countries, emails, postcodes, and unknown segments).

Examples and usage patterns are documented in cookbook.ipynb.

Install

Core install:

pip install affiliation-regex-parser

Optional Excel support (for worldcities.xlsx-based city→country inference):

pip install affiliation-regex-parser[excel]

Features

  • Regex-first, deterministic parsing (no ML dependencies).
  • Pluggable architecture via providers (e.g., custom city lists, custom inference).
  • Optional city→country inference using a world cities dataset.
  • Designed for batch parsing (reuse one parser instance).

Data attribution (worldcities.xlsx)

This project can use a worldcities.xlsx dataset sourced from SimpleMaps World Cities (free version), licensed under Creative Commons Attribution 4.0 (CC BY 4.0).

Source:

https://simplemaps.com/data/world-cities

If you redistribute the dataset with this package, ensure attribution is preserved per CC BY 4.0.

Documentation

  • See cookbook.ipynb for practical examples and common configurations.
  • See the docstrings in AffiliationRegexParser and provider classes for API details.

License

MIT License. See LICENSE.

Project status

This package is under active development; the public API aims to remain stable, but outputs may improve over time as patterns and fixtures evolve.

Metadata

Release files for affiliation-regex-parser 0.1.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 affiliation-regex-parser 0.1.0
File Size Uploaded
affiliation_regex_parser-0.1.0.tar.gz 3.5 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for affiliation-regex-parser 0.1.0
File Interpreter ABI Platform
affiliation_regex_parser-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 7.0 MB

Release files / affiliation_regex_parser-0.1.0.tar.gz

Download URL affiliation_regex_parser-0.1.0.tar.gz
Size 3.5 MB
Tags Source
SHA-256 checksum
How to use checksums
06fd594fcefab55cbaf6fda59840cb4aa02dace2e2d35fe6ca13fb731ae7cc09
BLAKE2b-256 checksum
How to use checksums
09b25bbcdf9ce852b97d455c67fac02772465c317f37c49afd31b663afc74ebf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.9

Release files / affiliation_regex_parser-0.1.0-py3-none-any.whl

Download URL affiliation_regex_parser-0.1.0-py3-none-any.whl
Size 3.5 MB
Tags Python 3
SHA-256 checksum
How to use checksums
8587171ddfbd382560f7743bcf445bc636cd9ac7a532b9265f7cbd2fab0c0bfe
BLAKE2b-256 checksum
How to use checksums
d603876f638dbe746c9848c10328f0d5bcdb4cd460bd847acf8b07f68781d2f4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.9

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

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