Spaces:
Running
Running
Update utils.py
Browse files
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
|
120 |
-
if count
|
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 =
|
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
|