Run explicit filter on raw entry, add more terms to split entries by

- With \t Last Word in Headings was suffixed by \t and so couldn't be
filtered by
- User interacts with raw entries, so run explicit filters on raw entry
   - For semantic search using the filtered entry is cleaner, still
This commit is contained in:
Debanjum Singh Solanky 2022-07-14 21:54:04 +04:00
parent 7640e2ab0c
commit 3aac3c7d52

View file

@ -18,8 +18,8 @@ def explicit_filter(raw_query, entries, embeddings):
entries_by_word_set = [set(word.lower()
for word
in re.split(
r',|\.| |\]|\[\(|\)|\{|\}', # split on fullstop, comma or any brackets
entry[0])
r',|\.| |\]|\[\(|\)|\{|\}|\t|\n|\:', # split on fullstop, comma or any brackets
entry[1])
if word != "")
for entry in entries]