Skip to content

Commit

Permalink
check_id for hashed_texts
Browse files Browse the repository at this point in the history
  • Loading branch information
blindsphynx committed Sep 9, 2024
1 parent 2a54e79 commit d395cc3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/db/db_methods.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ def add_parsed_text(check_id, parsed_text):


def add_hashed_text(check_id, hashed_text):
checks_id = hashed_texts_collection.insert_one(hashed_text.pack())
checks_id = hashed_texts_collection.insert_one(hashed_text.pack()).inserted_id
files_info_collection.update_one({'_id': check_id}, {"$push": {'hashed_texts': checks_id}})
return checks_id

Expand Down
5 changes: 5 additions & 0 deletions app/main/checks/report_checks/plagiarism_detection_check.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
import sys
import os
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
from ..antiplagiarism.TextPreprocessing import TextProcessing
from ..antiplagiarism.compareTexts import compareTexts
from ..base_check import BaseReportCriterion, answer
Expand All @@ -15,6 +18,8 @@ def __init__(self, file_info):

def check(self):
result_score = 1
self.get_texts()
self.collect_text_for_check()
suspect_text = []
for i in range(len(self.corpus)):
for j in range(len(self.corpus)):
Expand Down

0 comments on commit d395cc3

Please sign in to comment.