diff --git a/docs/semantic-search.ipynb b/docs/semantic-search.ipynb index 3f1b50a..57462de 100644 --- a/docs/semantic-search.ipynb +++ b/docs/semantic-search.ipynb @@ -185,7 +185,7 @@ }, "outputs": [], "source": [ - "search_string = 'symptoms of depression and anxiety'\n", + "search_string = 'terms related to smoking and respiration'\n", "search_embedding = embed_sentences([search_string,])" ] }, @@ -253,20 +253,38 @@ "sentences_sorted[sims > cutoff].tolist()" ] }, + { + "cell_type": "markdown", + "id": "cc540e55-606d-48d3-8407-6f79d979e0cc", + "metadata": {}, + "source": [ + "Reorder the dataframe according to the sorted index to retrieve variable names" + ] + }, { "cell_type": "code", "execution_count": null, "id": "1d2992a6-4597-4147-8096-378364c7e406", "metadata": {}, "outputs": [], + "source": [ + "rcdict.loc[sorted_index[sims > cutoff], :]" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "5f3973e5-b0f0-4084-9e31-e6119d299e87", + "metadata": {}, + "outputs": [], "source": [] } ], "metadata": { "kernelspec": { - "display_name": "Python 3 (ipykernel)", + "display_name": "Python (voice)", "language": "python", - "name": "python3" + "name": "voice" }, "language_info": { "codemirror_mode": {