ListenBrainz matching tools
In the ListenBrainz project we've created a number of tools and techniques that allowed us to create the MBID Mapping sub-project. This project takes an artist name and a recording (track) name and attempts to find the best matching recording in MusicBrainz.
This library will contain code to facilitate matching non-MusicBrainz metadata to MusicBrainz (tag a music collection) and from MusicBrainz to non-MusicBrainz metadata (content resolution).
Metadata cleaner
One component in this toolkit is the metadata cleaner, which removes (often) useless gunk from a metadata recording string:
"Tabula Rasa (feat. Lorraine Weiss)" -> "Tabula Rasa"
"Don't Give up - 2001 remaster" -> "Don't Give up"
This library also supports artist name cleaning:
"Amy Winhouse, Lorraine Weiss" -> "Amy Winehouse"
When a piece of metadata fails to be identified the metadata should be run through the metadata cleaner in an effort to remove this useless gunk that might be preventing a match. If the cleaner sucessfully removes gunk, the cleaned metadata should be looked up again, hoping that a match will be found this time.
To use this class, instantiate the MetadataCleaner class and call the clean_recording or clean_artist methods:
from lb_matching_tools.cleaner import MetadataCleaner
mc = MetadataCleaner()
mc.clean_recording("Tabula Rasa (feat. Lorraine Weiss)")
mc.clean_artist("Amy Winhouse, Lorraine Weiss")
Installation
To install this python module, simply do:
pip install .
Development
Create virtual environment
python -m venv .venv
Install dependencies
pip install .
Running tests
To run the internal unit tests, run:
pip install .
./test.py
Metadata
Release files for lb-matching-tools 2024.1.30.1
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 |
|---|---|---|---|---|
| lb-matching-tools-2024.1.30.1.tar.gz | 15.5 kB | Without provenance | Details for lb-matching-tools-2024.1.30.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| lb_matching_tools-2024.1.30.1-py3-none-any.whl | Python 3 | none | any | Details for lb_matching_tools-2024.1.30.1-py3-none-any.whl |
Total release size: 27.5 kB
Release files / lb-matching-tools-2024.1.30.1.tar.gz
| Download URL | lb-matching-tools-2024.1.30.1.tar.gz |
|---|---|
| Size | 15.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6472a035edcca7da1cb88b463b1f8377943cdf39b5224ced680387223f873a8c
|
|
BLAKE2b-256 checksum How to use checksums |
a4545186e8be62ac2791b0ee6982ae05b8cf4404db8d57d59fa16ccd6c938b0b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/4.0.2 CPython/3.11.7
|
Release files / lb_matching_tools-2024.1.30.1-py3-none-any.whl
| Download URL | lb_matching_tools-2024.1.30.1-py3-none-any.whl |
|---|---|
| Size | 12.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
50aa957ee8f64dbcac6b738e3707a26a05e14af25f18ea0dce6b51c388cca3f0
|
|
BLAKE2b-256 checksum How to use checksums |
17c4565d2124cf73e5683758818c3a7767634c8e8a5a8e67bbc7a0da38f39f0c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/4.0.2 CPython/3.11.7
|
Security for lb-matching-tools 2024.1.30.1
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.