minko186 commited on
Commit
d7650b8
1 Parent(s): c10af95

Update utils.py

Browse files
Files changed (1) hide show
  1. utils.py +3 -3
utils.py CHANGED
@@ -116,8 +116,8 @@ def googleSearch(
116
  )
117
  if "items" in results and len(results["items"]) > 0:
118
  for count, link in enumerate(results["items"]):
119
- # stop after 5 pages
120
- if count > 4:
121
  break
122
  # skip user selected domains
123
  if any(
@@ -203,7 +203,7 @@ def matchingScore(sentence, content):
203
  if sentence in content:
204
  return 1
205
  else:
206
- n = 5
207
  ngrams = getQueries(sentence, n)
208
  if len(ngrams) == 0:
209
  return 0
 
116
  )
117
  if "items" in results and len(results["items"]) > 0:
118
  for count, link in enumerate(results["items"]):
119
+ # stop after 3 pages
120
+ if count >= 3:
121
  break
122
  # skip user selected domains
123
  if any(
 
203
  if sentence in content:
204
  return 1
205
  else:
206
+ n = 7
207
  ngrams = getQueries(sentence, n)
208
  if len(ngrams) == 0:
209
  return 0