Skip to content

Latest commit

 

History

History
66 lines (50 loc) · 2.43 KB

File metadata and controls

66 lines (50 loc) · 2.43 KB

Contributing to Similarity Ensemble

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.

Ways to contribute

  • 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.

Adding a new similarity measure

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 value

Adding a new ensemble

Subclass 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).

Scientific integrity rules (please read)

This repository's credibility depends on these:

  1. Never commit fabricated results. Every number must be produced by code in this repo, on a real, citable dataset.
  2. Never transcribe benchmark gold scores by hand. Use a downloader that fetches the original data from its distributor, with a citation.
  3. Report uncertainty. Prefer cross-validated scores and confidence intervals over single point estimates.
  4. Cite sources for every measure, dataset, and method.

Development setup

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

Pull request checklist

  • Code is documented and has a reference where relevant.
  • pytest -q passes.
  • 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.