Matheel: A CLI and Python package for source-code similarity detection.
Project description
Matheel
Matheel is a Python package and CLI for source-code similarity. It combines semantic embeddings, lexical similarity, chunking, preprocessing, and code evaluation metrics in one workflow.
Installation
Matheel supports Python 3.10 to 3.13.
Recommended install:
pip install "matheel[all]"
For a lightweight install without optional semantic, chunking, metrics, and Gradio dependencies:
pip install matheel
Installation options are covered in the usage guide.
Quick Start
python examples/sample_data.py --output sample_pairs.zip --overwrite
matheel compare sample_pairs.zip \
--feature-weight levenshtein=1.0 \
--num 10
from matheel.similarity import calculate_similarity
score = calculate_similarity(
"def add(a, b):\n return a + b\n",
"def add(x, y):\n return x + y\n",
feature_weights={"levenshtein": 1.0},
)
print(round(score, 4))
See the usage guide for semantic models, archives, comparison suites, custom algorithms, chunking, preprocessing, visualization, leaderboards, and code metrics.
Links
- Documentation: fahadebrahim.github.io/matheel
- Hugging Face Space demo: buelfhood/matheel-framework
- Core workflows Colab notebook: Open in Colab
- Dataset workflows Colab notebook: Open in Colab
- Custom algorithms Colab notebook: Open in Colab
- Gradio Colab notebook: Open in Colab
- Visualization and leaderboard Colab notebook: Open in Colab
- Examples folder: examples/
- Development: development docs
Development
Contributor setup, tests, linting, package checks, and release preparation are documented in the development docs.
License
This project is licensed under the MIT License.
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 matheel-0.5.3.tar.gz.
File metadata
- Download URL: matheel-0.5.3.tar.gz
- Upload date:
- Size: 170.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8cc52f24f8e7e4115f575918b283ada2c618cb29bd27008361b1596e3d758da9
|
|
| MD5 |
0fb73748b26ca34c8d934ce43d42f6e9
|
|
| BLAKE2b-256 |
a512013485c58aa7b723ed52b81a0f90403491603e25b8a93cf6fa57405405df
|
Provenance
The following attestation bundles were made for matheel-0.5.3.tar.gz:
Publisher:
publish.yml on FahadEbrahim/matheel
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
matheel-0.5.3.tar.gz -
Subject digest:
8cc52f24f8e7e4115f575918b283ada2c618cb29bd27008361b1596e3d758da9 - Sigstore transparency entry: 1438615066
- Sigstore integration time:
-
Permalink:
FahadEbrahim/matheel@172c67457fe7928c35ef7e7ef4c7cee99c36de4e -
Branch / Tag:
refs/tags/v0.5.3 - Owner: https://github.com/FahadEbrahim
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@172c67457fe7928c35ef7e7ef4c7cee99c36de4e -
Trigger Event:
release
-
Statement type:
File details
Details for the file matheel-0.5.3-py3-none-any.whl.
File metadata
- Download URL: matheel-0.5.3-py3-none-any.whl
- Upload date:
- Size: 127.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ccb55428971ee2178e3d3ef51d27c9e603101f2a42199c0de9df38cb92050689
|
|
| MD5 |
4ec2a57bc046fee90e35b554a6eb558c
|
|
| BLAKE2b-256 |
92882fd4eaa6c72fde5832b3462bf6f63bf0f76b2f8fe1d8753405f8c9aad7a5
|
Provenance
The following attestation bundles were made for matheel-0.5.3-py3-none-any.whl:
Publisher:
publish.yml on FahadEbrahim/matheel
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
matheel-0.5.3-py3-none-any.whl -
Subject digest:
ccb55428971ee2178e3d3ef51d27c9e603101f2a42199c0de9df38cb92050689 - Sigstore transparency entry: 1438615106
- Sigstore integration time:
-
Permalink:
FahadEbrahim/matheel@172c67457fe7928c35ef7e7ef4c7cee99c36de4e -
Branch / Tag:
refs/tags/v0.5.3 - Owner: https://github.com/FahadEbrahim
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@172c67457fe7928c35ef7e7ef4c7cee99c36de4e -
Trigger Event:
release
-
Statement type: