algo change for SimilarityMatrix + python port of the reptrans package