Ensure good values for given similarity threshold

This commit is contained in:
Yohann D'ANELLO 2021-10-29 14:38:57 +02:00
parent 310b43483e
commit 6eba4961f3
Signed by: ynerant
GPG Key ID: 3A75C55819C8CF85

View File

@ -137,4 +137,8 @@ def parse(stream, similarity: float, display_tqdm: bool = False) -> None:
def main(): def main():
ns = parse_args() ns = parse_args()
if not (0 < ns.similarity <= 1):
raise ValueError(f"Invalid similiarity value: {ns.similarity}")
parse(ns.input, ns.similarity, ns.progress) parse(ns.input, ns.similarity, ns.progress)