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.ipynbfor practical examples and common configurations. - See the docstrings in
AffiliationRegexParserand 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)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| affiliation_regex_parser-0.1.0.tar.gz | 3.5 MB | Without provenance | Details for affiliation_regex_parser-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| affiliation_regex_parser-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for affiliation_regex_parser-0.1.0-py3-none-any.whl |
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
|
Security for affiliation-regex-parser 0.1.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.