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.
pip install matheel
Optional semantic, chunking, metrics, and Gradio extras are covered in the usage guide.
Quick Start
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, chunking, preprocessing, and code metrics.
Links
- Documentation: fahadebrahim.github.io/matheel
- Hugging Face Space demo: buelfhood/matheel-framework
- Gradio Colab notebook: Open in Colab
- Examples 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.4.0.tar.gz.
File metadata
- Download URL: matheel-0.4.0.tar.gz
- Upload date:
- Size: 113.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4caeef27d5e509801e7630e957810ee58d2ea8161a1fb7b059ab57f2f48bee83
|
|
| MD5 |
063923fa325c75c7df59cf1cb19b1bab
|
|
| BLAKE2b-256 |
32be72c8681bbae358b0ddb466119ccdb264902af855ca37af63d59b9ee4b38d
|
Provenance
The following attestation bundles were made for matheel-0.4.0.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.4.0.tar.gz -
Subject digest:
4caeef27d5e509801e7630e957810ee58d2ea8161a1fb7b059ab57f2f48bee83 - Sigstore transparency entry: 1436054759
- Sigstore integration time:
-
Permalink:
FahadEbrahim/matheel@b39f0ad213fcf294acbc4f4b81fe3345e7bbd1aa -
Branch / Tag:
refs/tags/v0.4.0 - Owner: https://github.com/FahadEbrahim
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@b39f0ad213fcf294acbc4f4b81fe3345e7bbd1aa -
Trigger Event:
release
-
Statement type:
File details
Details for the file matheel-0.4.0-py3-none-any.whl.
File metadata
- Download URL: matheel-0.4.0-py3-none-any.whl
- Upload date:
- Size: 84.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
633c194be3537e08de7022c8feda0767fe825ebc3398cab257a4e7af59467a21
|
|
| MD5 |
30d0d055400910bc8d2dc7e8c8283185
|
|
| BLAKE2b-256 |
3838ac8ef6e69b49a7217a23b1e6fb049368ccca56d690d34312387040c36932
|
Provenance
The following attestation bundles were made for matheel-0.4.0-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.4.0-py3-none-any.whl -
Subject digest:
633c194be3537e08de7022c8feda0767fe825ebc3398cab257a4e7af59467a21 - Sigstore transparency entry: 1436054762
- Sigstore integration time:
-
Permalink:
FahadEbrahim/matheel@b39f0ad213fcf294acbc4f4b81fe3345e7bbd1aa -
Branch / Tag:
refs/tags/v0.4.0 - Owner: https://github.com/FahadEbrahim
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@b39f0ad213fcf294acbc4f4b81fe3345e7bbd1aa -
Trigger Event:
release
-
Statement type: