Rename 'embed' key to more generic 'compiled' for jsonl extracted results

- While it's true those strings are going to be used to generated
  embeddings, the more generic term allows them to be used elsewhere as
  well

- Their main property is that they are processed, compiled for
  usage by semantic search

- Unlike the 'raw' string which contains the external representation
  of the data, as is
This commit is contained in:
Debanjum Singh Solanky
2022-07-20 20:35:50 +04:00
parent c1369233db
commit 70e70d4b15
3 changed files with 12 additions and 12 deletions

View File

@@ -13,9 +13,9 @@ from src.search_filter import date_filter
def test_date_filter():
embeddings = torch.randn(3, 10)
entries = [
{'embed': '', 'raw': 'Entry with no date'},
{'embed': '', 'raw': 'April Fools entry: 1984-04-01'},
{'embed': '', 'raw': 'Entry with date:1984-04-02'}]
{'compiled': '', 'raw': 'Entry with no date'},
{'compiled': '', 'raw': 'April Fools entry: 1984-04-01'},
{'compiled': '', 'raw': 'Entry with date:1984-04-02'}]
q_with_no_date_filter = 'head tail'
ret_query, ret_entries, ret_emb = date_filter.date_filter(q_with_no_date_filter, entries.copy(), embeddings)