Skip to content

Commit

Permalink
Correct return in docstring for semantic_search()
Browse files Browse the repository at this point in the history
  • Loading branch information
aphedges committed Nov 9, 2021
1 parent 82bc9c9 commit 73ff89f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sentence_transformers/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ def semantic_search(query_embeddings: Tensor,
:param corpus_chunk_size: Scans the corpus 100k entries at a time. Increasing that value increases the speed, but requires more memory.
:param top_k: Retrieve top k matching entries.
:param score_function: Function for computing scores. By default, cosine similarity.
:return: Returns a sorted list with decreasing cosine similarity scores. Entries are dictionaries with the keys 'corpus_id' and 'score'
:return: Returns a list with one entry for each query. Each entry is a list of dictionaries with the keys 'corpus_id' and 'score', sorted by decreasing cosine similarity scores.
"""

if isinstance(query_embeddings, (np.ndarray, np.generic)):
Expand Down

0 comments on commit 73ff89f

Please sign in to comment.