Show HN: CLI tool for detecting non-exact code duplication with embedding models
Slopo is a CLI tool that uses embedding models to detect non-exact code duplication — finding similar code blocks even when they differ in variable names, comments, or structure. It supports multiple programming languages and outputs results in a clean terminal format.
背景メモ
Slopoは、コードの完全一致(コピペ)だけでなく、セマンティック(意味的)に類似したコード片も検出するCLIツール。従来の重複検知ツールはトークンやASTの構造的マッチングが主流だが、Slopoは埋め込みモデル(sentence-transformers)を使い、意味が似ているが字面が異なるコードも「ニアデュープ」として扱う。開発者はRafał(rafal-qa)。重複コードは保守性を下げるため、リファクタリング前の棚卸しや、大規模コードベースの品質指標として使われる。埋め込みを使うアプローチはまだ実用段階にあり、精度や速度の課題が残る。