minko186 commited on
Commit
6897d4d
·
1 Parent(s): d3a205a

Update utils.py

Browse files
Files changed (1) hide show
  1. utils.py +0 -2
utils.py CHANGED
@@ -205,7 +205,6 @@ def matchingScore(sentence, content):
205
  else:
206
  n = 5
207
  ngrams = getQueries(sentence, n)
208
- print("ngrams done.......")
209
  if len(ngrams) == 0:
210
  return 0
211
  matched = [x for x in ngrams if " ".join(x) in content]
@@ -218,7 +217,6 @@ def matchingScoreWithTimeout(sentence, content):
218
 
219
  timer = threading.Timer(2, timeout_handler) # Set a timer for 2 seconds
220
  timer.start()
221
-
222
  try:
223
  score = matchingScore(sentence, content)
224
  timer.cancel() # Cancel the timer if calculation completes before timeout
 
205
  else:
206
  n = 5
207
  ngrams = getQueries(sentence, n)
 
208
  if len(ngrams) == 0:
209
  return 0
210
  matched = [x for x in ngrams if " ".join(x) in content]
 
217
 
218
  timer = threading.Timer(2, timeout_handler) # Set a timer for 2 seconds
219
  timer.start()
 
220
  try:
221
  score = matchingScore(sentence, content)
222
  timer.cancel() # Cancel the timer if calculation completes before timeout