Standard Classification Alignment & Local Enrichment - Automate audit and enrichment of industrial classifications
Project description
SCALE: Standard Classification Alignment & Local Enrichment
Automate the audit and enrichment of national classifications (e.g., KBLI) using international standards (e.g., ISIC, NACE), or other national standard classifications.
Features
- Bidirectional Asymmetric Retrieval: Captures hierarchical "entailment" relationships common in classifications
- Competitive Selection: Max-score + margin algorithm for controlled mapping while minimizing noise
- Multilingual E5-Large-Instruct Model: Instruction-tuned model optimized for asymmetric retrieval tasks
Installation
pip install scale-align
Google Colab
Using in Google Colab? Try our Colab Notebook.
Quick Start
scale-align \
--source-dir /path/to/isic5 \
--target-dir /path/to/nace21 \
--correspondence correspondence.json \
--output-dir ./output
Input Format
Classification Files
Text files with sentences separated by newlines:
/path/to/isic5/A.txt
/path/to/isic5/A0111.txt
Correspondence JSON
[["A","A"],["A0111","A01.11"],["A0112","A01.12"]]
Output Format
Each output file {source_code}_{target_code}.txt contains:
[0]:[0,1]:0.87439287
[1,2]:[2]:0.92
[3]:[]:0
[4]:[3]:0.9999999
[source_indices]:[target_indices]:score- Empty brackets
[]indicate no alignment (gap detected)
CLI Options
| Option | Default | Description |
|---|---|---|
--threshold |
0.7 | Minimum similarity score |
--margin |
0.05 | Margin from champion score |
--batch-size |
32 | Embedding batch size |
--device |
auto | Device (cuda/cpu/auto) |
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file scale_align-0.1.1.tar.gz.
File metadata
- Download URL: scale_align-0.1.1.tar.gz
- Upload date:
- Size: 14.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c9968df445ea4c8e2c3f7f1f69a40babc6111b4de122ac75579098e08f19869b
|
|
| MD5 |
576fe2b1d295a474614ca30bc7bb36a5
|
|
| BLAKE2b-256 |
01d933e5795283dc2310b2a20f343121d70d86dce2ffbcd5876dca376e312591
|
Provenance
The following attestation bundles were made for scale_align-0.1.1.tar.gz:
Publisher:
publish.yml on mdmahendri/scale-align
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
scale_align-0.1.1.tar.gz -
Subject digest:
c9968df445ea4c8e2c3f7f1f69a40babc6111b4de122ac75579098e08f19869b - Sigstore transparency entry: 787252611
- Sigstore integration time:
-
Permalink:
mdmahendri/scale-align@937ad8cd2b38843b7ca1250dee68ccd5ac25537d -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/mdmahendri
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@937ad8cd2b38843b7ca1250dee68ccd5ac25537d -
Trigger Event:
release
-
Statement type:
File details
Details for the file scale_align-0.1.1-py3-none-any.whl.
File metadata
- Download URL: scale_align-0.1.1-py3-none-any.whl
- Upload date:
- Size: 12.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f17e7b9619b6dc7ea16bbf4f53baa5583d402bb72abd78de197e71e0145f51ef
|
|
| MD5 |
a11064e5c56b0acee0c24a69450f5182
|
|
| BLAKE2b-256 |
32ab82f14969a85dfc8b986d54bfe1984b12e895f2ccc08a037d54cf7639e749
|
Provenance
The following attestation bundles were made for scale_align-0.1.1-py3-none-any.whl:
Publisher:
publish.yml on mdmahendri/scale-align
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
scale_align-0.1.1-py3-none-any.whl -
Subject digest:
f17e7b9619b6dc7ea16bbf4f53baa5583d402bb72abd78de197e71e0145f51ef - Sigstore transparency entry: 787252612
- Sigstore integration time:
-
Permalink:
mdmahendri/scale-align@937ad8cd2b38843b7ca1250dee68ccd5ac25537d -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/mdmahendri
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@937ad8cd2b38843b7ca1250dee68ccd5ac25537d -
Trigger Event:
release
-
Statement type: