Spaces:
Runtime error
Runtime error
Update utils.py
Browse files
utils.py
CHANGED
|
@@ -203,8 +203,9 @@ 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
|
| 210 |
matched = [x for x in ngrams if " ".join(x) in content]
|
|
|
|
| 203 |
if sentence in content:
|
| 204 |
return 1
|
| 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]
|