{"id":3343,"date":"2024-02-21T13:52:10","date_gmt":"2024-02-21T08:22:10","guid":{"rendered":"https:\/\/www.rangakrish.com\/?p=3343"},"modified":"2024-02-21T13:52:10","modified_gmt":"2024-02-21T08:22:10","slug":"using-similarity-search-in-homeopathy-repertorization-software-part-2","status":"publish","type":"post","link":"https:\/\/www.rangakrish.com\/index.php\/2024\/02\/21\/using-similarity-search-in-homeopathy-repertorization-software-part-2\/","title":{"rendered":"Using Similarity Search in Homeopathy Repertorization Software &#8211; Part 2"},"content":{"rendered":"<p>In my earlier <a href=\"https:\/\/www.rangakrish.com\/index.php\/2024\/02\/11\/using-similarity-search-in-homeopathy-repertorization-software\/\" target=\"_blank\" rel=\"noopener\"><em><strong>article<\/strong><\/em><\/a>, I had explained how natural language text describing a symptom can be converted to a formal <em><strong>\u201crubric\u201d<\/strong><\/em> by using a <em><strong>vector database<\/strong><\/em>. In today\u2019s article, I will show how this can be extended to support multiple symptoms in the input text with automatic repertorisation to identify potential remedies.<\/p>\n<p>Let us consider this text:<\/p>\n<p><span style=\"color: #0000ff;\"><em><strong>A female patient 30 years old visited my clinic. An irritable person. She gets<span class=\"Apple-converted-space\">\u00a0 <\/span>bursting headache before menses. There is also drawing pain in sacral region.<span class=\"Apple-converted-space\">\u00a0<\/span><\/strong><\/em><\/span><\/p>\n<p>It is clear that this text has 4 sentences and 3 of them are symptom descriptions. How can we repertorise this? See this figure:<\/p>\n<figure id=\"attachment_3344\" aria-describedby=\"caption-attachment-3344\" style=\"width: 550px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2024\/02\/case1.png?ssl=1\"><img data-recalc-dims=\"1\" fetchpriority=\"high\" decoding=\"async\" data-attachment-id=\"3344\" data-permalink=\"https:\/\/www.rangakrish.com\/index.php\/2024\/02\/21\/using-similarity-search-in-homeopathy-repertorization-software-part-2\/case1-5\/\" data-orig-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2024\/02\/case1.png\" data-orig-size=\"1434,1038\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Example Case &amp;#8211; 1\" data-image-description=\"&lt;p&gt;Example Case &amp;#8211; 1&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;Example Case &amp;#8211; 1&lt;\/p&gt;\n\" data-large-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2024\/02\/case1-1024x741.png\" class=\"wp-image-3344\" src=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2024\/02\/case1.png?resize=550%2C398&#038;ssl=1\" alt=\"Example Case - 1\" width=\"550\" height=\"398\" srcset=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2024\/02\/case1.png?resize=300%2C217&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2024\/02\/case1.png?resize=1024%2C741&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2024\/02\/case1.png?resize=768%2C556&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2024\/02\/case1.png?w=1434&amp;ssl=1 1434w\" sizes=\"(max-width: 550px) 100vw, 550px\" \/><\/a><figcaption id=\"caption-attachment-3344\" class=\"wp-caption-text\"><strong>Example Case &#8211; 1<\/strong><\/figcaption><\/figure>\n<p>I modified my earlier <em><strong>Python<\/strong><\/em> program to support multiple sentences and also to identify appropriate remedies based on the encountered rubrics (I am using <em><strong>Kent Repertory<\/strong><\/em>). The program\u2019s output, as it appears in the <em><strong>\u201cRemedies\u201d<\/strong><\/em> area, clearly lists the identified rubrics and possible remedies. <span class=\"Apple-converted-space\">\u00a0<\/span><\/p>\n<p><em><strong>Chamomilla<\/strong><\/em> and <em><strong>Natrum Muriaticum<\/strong><\/em> are present in all three rubrics. <em><strong>Kali Carb<\/strong><\/em> and <em><strong>Nux Vomica<\/strong><\/em> are suggested based on their total weight. Of course, as is normally done, one has to go through the <em><strong>Materia Medica<\/strong><\/em> and select the best remedy after further study.<\/p>\n<p>Here is another example:<\/p>\n<p><span style=\"color: #0000ff;\"><em><strong>This is a 60 year old male patient. He complains of a distressing cough for the past two days. He additionally describes it as a whooping cough. Cough triggered when lying down.<span class=\"Apple-converted-space\">\u00a0<\/span><\/strong><\/em><\/span><\/p>\n<p>Here is the program\u2019s output:<\/p>\n<figure id=\"attachment_3345\" aria-describedby=\"caption-attachment-3345\" style=\"width: 550px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2024\/02\/case2.png?ssl=1\"><img data-recalc-dims=\"1\" decoding=\"async\" data-attachment-id=\"3345\" data-permalink=\"https:\/\/www.rangakrish.com\/index.php\/2024\/02\/21\/using-similarity-search-in-homeopathy-repertorization-software-part-2\/case2-4\/\" data-orig-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2024\/02\/case2.png\" data-orig-size=\"1410,1028\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Example Case &amp;#8211; 2\" data-image-description=\"&lt;p&gt;Example Case &amp;#8211; 2&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;Example Case &amp;#8211; 2&lt;\/p&gt;\n\" data-large-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2024\/02\/case2-1024x747.png\" class=\"wp-image-3345\" src=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2024\/02\/case2.png?resize=550%2C401&#038;ssl=1\" alt=\"Example Case - 2\" width=\"550\" height=\"401\" srcset=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2024\/02\/case2.png?resize=300%2C219&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2024\/02\/case2.png?resize=1024%2C747&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2024\/02\/case2.png?resize=768%2C560&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2024\/02\/case2.png?w=1410&amp;ssl=1 1410w\" sizes=\"(max-width: 550px) 100vw, 550px\" \/><\/a><figcaption id=\"caption-attachment-3345\" class=\"wp-caption-text\"><strong>Example Case &#8211; 2<\/strong><\/figcaption><\/figure>\n<p>Here also, the program has correctly identified the rubrics present in the natural language text and has given its repertorial analysis.<\/p>\n<p>This is indeed promising.<span class=\"Apple-converted-space\">\u00a0<\/span><\/p>\n<p>The two examples discussed here are deliberately simple and are meant to drive home the point that <em><strong>\u201csemantic similarity\u201d<\/strong><\/em> can be exploited when building such systems. Of course, no actual case (<em><strong>acute<\/strong><\/em> or <em><strong>chronic<\/strong><\/em>) is so trivial. The actual case text may run to multiple pages and additionally the homeopath might want to make use of multiple repertories (a rubric might not be present in a particular repertory). An intelligent software must also allow the homeopath to submit <em><strong>photos<\/strong><\/em> (for example,<em><strong> tongue picture<\/strong><\/em>) and include those in its analysis.<\/p>\n<p>I hope my <em><strong>dream<\/strong><\/em> becomes <em><strong>reality<\/strong><\/em>\u00a0soon, thus empowering homeopaths to cure complex cases without much trial-and-error.<\/p>\n<p>Have a nice week!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In my earlier article, I had explained how natural language text describing a symptom can be converted to a formal \u201crubric\u201d by using a vector database. In today\u2019s article, I will show how this can be extended to support multiple symptoms in the input text with automatic repertorisation to identify potential remedies. Let us consider [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"advanced_seo_description":"","jetpack_seo_html_title":"","jetpack_seo_noindex":false,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[22,103],"tags":[25,30,381,382],"class_list":["post-3343","post","type-post","status-publish","format-standard","hentry","category-homeopathy","category-python","tag-homeopathy","tag-repertorization","tag-semantic-similarity","tag-vector-database"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p9OLnF-RV","jetpack-related-posts":[{"id":3321,"url":"https:\/\/www.rangakrish.com\/index.php\/2024\/02\/11\/using-similarity-search-in-homeopathy-repertorization-software\/","url_meta":{"origin":3343,"position":0},"title":"Using Similarity Search in Homeopathy Repertorization Software","author":"admin","date":"February 11, 2024","format":false,"excerpt":"Homeopathy Repertorization software such as RadarOpus, MacRepertory, Vithoulkas Compass, and Synergy Homeopathic Software (SHS) are widely used by homeopaths to speed up case taking, repertorization and case analysis. All of them have a \u201cSearch\u201d feature, where the given text is searched (typically based on key words and synonyms) against one\u2026","rel":"","context":"In &quot;Homeopathy&quot;","block_context":{"text":"Homeopathy","link":"https:\/\/www.rangakrish.com\/index.php\/category\/homeopathy\/"},"img":{"alt_text":"Vithoulkas Compass Example","src":"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2024\/02\/VCompass-300x65.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2024\/02\/VCompass-300x65.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2024\/02\/VCompass-300x65.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":3421,"url":"https:\/\/www.rangakrish.com\/index.php\/2024\/07\/07\/building-an-intelligent-homeopathy-assistant\/","url_meta":{"origin":3343,"position":1},"title":"Building an Intelligent Homeopathy Assistant","author":"admin","date":"July 7, 2024","format":false,"excerpt":"I have written extensively about my initial work on developing homeopathy Repertorization software and more recently, on Case Analysis Using RAG\u00a0and using Semantic Search\u00a0to find rubrics. As a student of homeopathy, I have been continuously doing research on how to improve the quality of homeopathy case analysis and in particular,\u2026","rel":"","context":"In &quot;Homeopathy&quot;","block_context":{"text":"Homeopathy","link":"https:\/\/www.rangakrish.com\/index.php\/category\/homeopathy\/"},"img":{"alt_text":"Understanding Remedy Keynotes","src":"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2024\/07\/Screen1-300x222.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2024\/07\/Screen1-300x222.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2024\/07\/Screen1-300x222.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":3503,"url":"https:\/\/www.rangakrish.com\/index.php\/2024\/09\/18\/ihomeomate-intelligent-case-analysis\/","url_meta":{"origin":3343,"position":2},"title":"iHomeoMate: Intelligent Case Analysis","author":"admin","date":"September 18, 2024","format":false,"excerpt":"We have covered several interesting features of \u201ciHomoMate\u201d in the earlier articles. In this article, we will take a look at the most important and most useful feature: Intelligent Case Analysis. Decades ago, when computer repertories were not available, Homeopaths used hard copies of Repertories to study a case and\u2026","rel":"","context":"In &quot;Homeopathy&quot;","block_context":{"text":"Homeopathy","link":"https:\/\/www.rangakrish.com\/index.php\/category\/homeopathy\/"},"img":{"alt_text":"The Case","src":"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2024\/09\/Image2-1-300x152.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2024\/09\/Image2-1-300x152.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2024\/09\/Image2-1-300x152.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":81,"url":"https:\/\/www.rangakrish.com\/index.php\/2015\/11\/15\/themes-desirable-features-of-homeopathic-software-part-2\/","url_meta":{"origin":3343,"position":3},"title":"Themes: Desirable Features of Homeopathic Software &#8211; Part 2","author":"admin","date":"November 15, 2015","format":false,"excerpt":"In an earlier post, I started to enumerate some features that I would like to see in a good homeopathic software, and how some of those found their way in to iCure, my own software. In this post, I would like to share another interesting feature called Themes. Sometimes when\u2026","rel":"","context":"In &quot;Homeopathy&quot;","block_context":{"text":"Homeopathy","link":"https:\/\/www.rangakrish.com\/index.php\/category\/homeopathy\/"},"img":{"alt_text":"iCure Themes","src":"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2015\/11\/iCure-themes.jpg?resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2015\/11\/iCure-themes.jpg?resize=350%2C200 1x, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2015\/11\/iCure-themes.jpg?resize=525%2C300 1.5x"},"classes":[]},{"id":62,"url":"https:\/\/www.rangakrish.com\/index.php\/2015\/10\/28\/desirable-features-of-homeopathic-software\/","url_meta":{"origin":3343,"position":4},"title":"Desirable Features of Homeopathic Software","author":"admin","date":"October 28, 2015","format":false,"excerpt":"There are many good homeopathic programs today. RADAR, RADAROpus, MacRepertory, ISIS, Mercurius, and Complete Dynamics are among the popular ones (I have with me all but the last one). Among web-based programs, Vithoulkas Compass is one that I subscribe to. Most of these include a patient database feature in order\u2026","rel":"","context":"In &quot;Homeopathy&quot;","block_context":{"text":"Homeopathy","link":"https:\/\/www.rangakrish.com\/index.php\/category\/homeopathy\/"},"img":{"alt_text":"Disease symptoms","src":"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2015\/10\/Disease-symptoms.png?resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2015\/10\/Disease-symptoms.png?resize=350%2C200 1x, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2015\/10\/Disease-symptoms.png?resize=525%2C300 1.5x"},"classes":[]},{"id":2907,"url":"https:\/\/www.rangakrish.com\/index.php\/2022\/08\/27\/book-review-art-of-repertorisation\/","url_meta":{"origin":3343,"position":5},"title":"Book Review: Art of Repertorisation","author":"admin","date":"August 27, 2022","format":false,"excerpt":"Title: Art of Repertorisation: Rediscovering Old & Forgotten Repertories Author: Dr.Gaurang Gaikwad Publisher: Dr.Gaurang Gaikwad Year: 2021 This is Dr.Gaurang Gaikwad\u2019s latest book, published last year. As the title suggests, this is about the \u201cArt\u201d of repertorisation. Although there are several books on repertories and repertorisation, the author\u2019s unique contribution\u2026","rel":"","context":"In &quot;Book Review&quot;","block_context":{"text":"Book Review","link":"https:\/\/www.rangakrish.com\/index.php\/category\/book-review\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2022\/08\/BookCover2-200x300.jpg?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]}],"_links":{"self":[{"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/posts\/3343","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/comments?post=3343"}],"version-history":[{"count":0,"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/posts\/3343\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/media?parent=3343"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/categories?post=3343"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/tags?post=3343"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}