From ee1b57ec6197c554f3c011f9a648e2222d845994 Mon Sep 17 00:00:00 2001 From: jwansek Date: Fri, 29 Apr 2022 18:33:48 +0100 Subject: Added similariy metric --- Smarker/temp.py | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'Smarker/temp.py') diff --git a/Smarker/temp.py b/Smarker/temp.py index 60b1c18..491729f 100644 --- a/Smarker/temp.py +++ b/Smarker/temp.py @@ -1,6 +1,14 @@ -import json +import assessments +import sys +import os -with open("100301654_report.json", "r") as f: - tree = json.load(f)["class_tree"] +if __name__ == "__main__": + with open(sys.argv[1], "r") as f: + ft1 = f.read() -print(tree) \ No newline at end of file + with open(sys.argv[2], "r") as f: + ft2 = f.read() + + similarityMetric = assessments.SimilarityMetric(ft1, ft2, 1, 2) + print(similarityMetric.get_similarity()) + print(similarityMetric.details) \ No newline at end of file -- cgit v1.2.3