Finally implement the search
This commit is contained in:
parent
a0bba7173f
commit
a3d3305d4b
1 changed files with 1 additions and 3 deletions
|
@ -60,6 +60,4 @@ def scalar(a, b):
|
|||
|
||||
def find_best_quote(db, user_input):
|
||||
indexed_input = index(user_input)
|
||||
max_score = None
|
||||
for entry in db:
|
||||
score = scalar(indexed_input, entry
|
||||
return max(db, key=lambda row: scalar(indexed_input, row['index']))
|
||||
|
|
Loading…
Reference in a new issue