Thanks for your interest! This project aims to be a clean, reproducible reference for semantic similarity ensembles and a friendly place to learn. Contributions of all sizes are welcome — fixing a typo in the docs is just as valuable as adding a new similarity measure.
- Add a base similarity measure (lexical, knowledge-based, embedding-based).
- Add an ensemble / stacking strategy (e.g., a new aggregation function or optimizer).
- Add a dataset downloader to
similarity_ensemble/datasets.py. - Improve the docs, tutorials, or notebooks.
- Report a bug or a reproducibility issue.
A measure is just a function f(a: str, b: str) -> float returning a value in
[0, 1]. Add it to similarity_ensemble/measures.py, give it a docstring with
a one-line definition and a reference, and (if it has no heavy dependency) add it
to LEXICAL_MEASURES. Then add a bounds/identity test in tests/.
def my_measure(a: str, b: str) -> float:
"""One-line definition. Reference: Author (Year)."""
...
return valueSubclass BaseEnsemble in similarity_ensemble/ensembles.py and implement
fit(self, X, y) and predict(self, X). Set is_supervised = True if it needs
gold labels (it will then be evaluated with cross-validation by the harness).
This repository's credibility depends on these:
- Never commit fabricated results. Every number must be produced by code in this repo, on a real, citable dataset.
- Never transcribe benchmark gold scores by hand. Use a downloader that fetches the original data from its distributor, with a citation.
- Report uncertainty. Prefer cross-validated scores and confidence intervals over single point estimates.
- Cite sources for every measure, dataset, and method.
git clone https://github.com/jorge-martinez-gil/similarity-ensemble.git
cd similarity-ensemble
pip install -e ".[all]"
pytest -q # all tests run offline, no downloads- Code is documented and has a reference where relevant.
-
pytest -qpasses. - New measures/ensembles have a test.
- No fabricated numbers; results are reproducible.
By contributing you agree that your contributions are licensed under the MIT License of this repository.