summaryrefslogtreecommitdiffstats
path: root/Smarker/temp.py
diff options
context:
space:
mode:
authorjwansek <eddie.atten.ea29@gmail.com>2022-04-29 18:33:48 +0100
committerjwansek <eddie.atten.ea29@gmail.com>2022-04-29 18:33:48 +0100
commitee1b57ec6197c554f3c011f9a648e2222d845994 (patch)
tree27d8aaa78d451efea3e2c72d81163f7b02602268 /Smarker/temp.py
parent2565fa419f37eee11fbad1cccbabde5b8baa24cd (diff)
downloadSmarker-ee1b57ec6197c554f3c011f9a648e2222d845994.tar.gz
Smarker-ee1b57ec6197c554f3c011f9a648e2222d845994.zip
Added similariy metric
Diffstat (limited to 'Smarker/temp.py')
-rw-r--r--Smarker/temp.py16
1 files changed, 12 insertions, 4 deletions
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