Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -49,9 +49,9 @@ def preprocess_query(query):
|
|
49 |
doc = nlp(query)
|
50 |
tokens = set()
|
51 |
for token in doc:
|
52 |
-
tokens.add(token.text)
|
53 |
-
tokens.add(token.lemma_)
|
54 |
-
tokens.update(get_synonyms(token.text))
|
55 |
return tokens
|
56 |
|
57 |
def search_captions(query, captions):
|
|
|
49 |
doc = nlp(query)
|
50 |
tokens = set()
|
51 |
for token in doc:
|
52 |
+
tokens.add(token.text.lower())
|
53 |
+
tokens.add(token.lemma_.lower())
|
54 |
+
tokens.update(get_synonyms(token.text.lower()))
|
55 |
return tokens
|
56 |
|
57 |
def search_captions(query, captions):
|