{"id":1146,"date":"2018-11-04T10:59:52","date_gmt":"2018-11-04T05:29:52","guid":{"rendered":"https:\/\/www.rangakrish.com\/?p=1146"},"modified":"2018-11-13T07:09:35","modified_gmt":"2018-11-13T01:39:35","slug":"modeling-homeopathic-remedy-keynotes-in-flora-2","status":"publish","type":"post","link":"https:\/\/www.rangakrish.com\/index.php\/2018\/11\/04\/modeling-homeopathic-remedy-keynotes-in-flora-2\/","title":{"rendered":"Modeling Homeopathic Remedy Keynotes in Flora-2"},"content":{"rendered":"<p>In my <a href=\"https:\/\/www.rangakrish.com\/index.php\/2018\/10\/28\/flora-2-an-expressive-knowledge-representation-system\/\" target=\"_blank\" rel=\"noopener\"><em><strong>last post<\/strong><\/em><\/a>, I got started with <a href=\"http:\/\/flora.sourceforge.net\" target=\"_blank\" rel=\"noopener\"><em><strong>Flora-2<\/strong><\/em><\/a> and showed how we can model homeopathic remedies from a <b><i>therapeutics<\/i><\/b> perspective. Although such a limited view of remedies can be helpful in treating <a href=\"https:\/\/www.homeopathycenter.org\/homeopathy-today\/dynamic-medicine-acute-and-chronic-prescribing-whats-difference\" target=\"_blank\" rel=\"noopener\"><em><strong>acute ailments<\/strong><\/em><\/a>, for treating <a href=\"https:\/\/www.homeopathycenter.org\/homeopathy-today\/dynamic-medicine-acute-and-chronic-prescribing-whats-difference\" target=\"_blank\" rel=\"noopener\"><em><strong>chronic diseases<\/strong><\/em><\/a>, a comprehensive understanding of the various remedies from the perspective of <a href=\"http:\/\/www.wholehealthnow.com\/homeopathy_pro\/keynotes.html\" target=\"_blank\" rel=\"noopener\"><em><strong>keynotes<\/strong><\/em><\/a>, <a href=\"https:\/\/www.nhp.gov.in\/introduction-to-homeopathic-pharmacopeia_mtl\" target=\"_blank\" rel=\"noopener\"><em><strong>kingdom classification<\/strong><\/em><\/a> and <a href=\"https:\/\/www.homeopathycenter.org\/homeopathy-today\/thought-behind-action-what-are-miasms\" target=\"_blank\" rel=\"noopener\"><em><strong>miasms<\/strong><\/em><\/a> is absolutely essential. This information is available in various materia medica and published clinical cases. If a knowledge representation system such as <em><strong>Flora-2<\/strong><\/em> can help us in converting the available natural language descriptions of remedies into a formal model, that would help us tremendously in implementing much better computer programs to recommend appropriate remedies for patients who require homeopathic care (homeopathy is quite popular in some countries, especially India). Although there are several widely used computer programs such as <a href=\"http:\/\/www.wholehealthnow.com\/homeopathy_software\/macrepertory.html\" target=\"_blank\" rel=\"noopener\"><em><strong>MacRepertory<\/strong><\/em><\/a>\u00a0and <a href=\"http:\/\/www.radaropus.com\" target=\"_blank\" rel=\"noopener\"><em><strong>RadarOpus<\/strong><\/em><\/a>, they all use electronic <a href=\"https:\/\/homeopathic.com\/how-to-learn-homeopathy-repertories\/\" target=\"_blank\" rel=\"noopener\"><em><strong>repertories<\/strong><\/em><\/a>. Repertories are <a href=\"http:\/\/www.wholehealthnow.com\/homeopathy_pro\/repertory-language.html\" target=\"_blank\" rel=\"noopener\"><em><strong>prepared manually<\/strong><\/em><\/a> from the natural language descriptions of materia medica and other sources, and they contain remedy information in a semi-structured form (better than natural language, but not formal). They are then converted to an electronic form suitable for use with specific software. Understandably, there are significant variations across the different repertories supported by the homeopathic software. What is required is a concerted effort to model the original source material in a KR system such as <em><strong>Flora-2<\/strong><\/em> so that we get precise and unambiguous models of remedies. This is a challenging problem that requires serious attention by the community.<\/p>\n<p>In today\u2019s post, I want to continue my exploration of <em><strong>Flora-2,<\/strong><\/em> but this time focus on how to capture the key features of remedies <em><strong>independently<\/strong><\/em>, devoid of the therapeutics bias. Note that homeopathy remedy pictures are quite detailed and comprehensive, but what I am showing here is just a tiny fragment, for obvious practical reasons.<\/p>\n<h2><b>Modeling Requirements<\/b><\/h2>\n<p>Two important modeling requirements became apparent to me as I waded through the huge volume of information available on homeopathic remedies<\/p>\n<blockquote><p><span style=\"color: #0000ff;\">1. We need a way to model inheritance of properties that are available across remedy classification hierarchies. For instance, remedies can be prepared from Minerals, Plants, Animals, etc. Some remedies in the Mineral kingdom inherit the traits of multiple minerals. As an example, the remedy \u201cKali Carbonicum\u201d is supposed to have some traits of the \u201cKali\u201d as well as \u201cCarbon\u201d family. We would like our model to capture these ideas without being redundant and verbose.<\/span><\/p>\n<p><span style=\"color: #0000ff;\">2. Remedy descriptions must be \u201copen\u201d, that is, it should be possible to describe the same remedy, in parts, in multiple source files. Assuming we have captured certain properties of a remedy R1 in File1, we should be able to add to this remedy information by providing additional details for R1 in File2, File3, and so on. We should not be forced to alter the original file File1 in order to add to the remedy (we might have to modify File1 to make changes to the descriptions in that file, but that is different). For this to be possible, the formal system must consider the different descriptions of the same remedy as a \u201cunion\u201d. When we work with large knowledge bases that are managed and maintained by many authors, this requirement becomes quite crucial.<span class=\"Apple-converted-space\">\u00a0<\/span><\/span><\/p><\/blockquote>\n<p>If the second requirement seems obvious and straightforward, it is worth pointing out that in modern programming languages, this is not possible in <em><strong>Java<\/strong><\/em> or <em><strong>C++<\/strong><\/em> but is supported in <em><strong>C#<\/strong><\/em> (through <a href=\"https:\/\/docs.microsoft.com\/en-us\/dotnet\/csharp\/programming-guide\/classes-and-structs\/partial-classes-and-methods\" target=\"_blank\" rel=\"noopener\"><em><strong>partial<\/strong><\/em><\/a> keyword).<\/p>\n<p><em><strong>Flora-2<\/strong><\/em>, fortunately, satisfies the second requirement. We can define multiple <em><strong>Frames<\/strong><\/em> for the same predicate symbol either in the same source file or different source files.<span class=\"Apple-converted-space\">\u00a0See this example:<\/span><\/p>\n<figure id=\"attachment_1175\" aria-describedby=\"caption-attachment-1175\" style=\"width: 658px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2018\/11\/Multiple-defn.png?ssl=1\"><img data-recalc-dims=\"1\" fetchpriority=\"high\" decoding=\"async\" data-attachment-id=\"1175\" data-permalink=\"https:\/\/www.rangakrish.com\/index.php\/2018\/11\/04\/modeling-homeopathic-remedy-keynotes-in-flora-2\/multiple-defn\/\" data-orig-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2018\/11\/Multiple-defn.png\" data-orig-size=\"658,337\" 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=\"Multiple Frames for Same Remedy\" data-image-description=\"&lt;p&gt;Multiple Frames for Same Remedy&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;Multiple Frames for Same Remedy&lt;\/p&gt;\n\" data-large-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2018\/11\/Multiple-defn.png\" class=\"size-full wp-image-1175\" src=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2018\/11\/Multiple-defn.png?resize=658%2C337&#038;ssl=1\" alt=\"Multiple Frames for Same Remedy\" width=\"658\" height=\"337\" srcset=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2018\/11\/Multiple-defn.png?w=658&amp;ssl=1 658w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2018\/11\/Multiple-defn.png?resize=300%2C154&amp;ssl=1 300w\" sizes=\"(max-width: 658px) 100vw, 658px\" \/><\/a><figcaption id=\"caption-attachment-1175\" class=\"wp-caption-text\"><strong>Multiple Frames for Same Remedy<\/strong><\/figcaption><\/figure>\n<p>Coming to requirement (1), <em><strong>Flora-2<\/strong><\/em> supports both <em><strong>structural<\/strong><\/em> and <em><strong>behavioral<\/strong><\/em> inheritance (see the <a href=\"http:\/\/flora.sourceforge.net\/docs\/floraManual.pdf\" target=\"_blank\" rel=\"noopener\"><em><strong>manual<\/strong><\/em><\/a>). In fact, it is possible to inherit from multiple base classes too! However, just as in the traditional OO languages such as C++, if the same name appears in a frame across multiple parent classes in <em><strong>Flora-2<\/strong><\/em>, this will result in conflict, and the name will not be inherited (additional rules can be defined to customize this behavior).<\/p>\n<p>To understand this, see the example below:<\/p>\n<figure id=\"attachment_1150\" aria-describedby=\"caption-attachment-1150\" style=\"width: 391px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2018\/11\/Inheritance-code.png?ssl=1\"><img data-recalc-dims=\"1\" decoding=\"async\" data-attachment-id=\"1150\" data-permalink=\"https:\/\/www.rangakrish.com\/index.php\/2018\/11\/04\/modeling-homeopathic-remedy-keynotes-in-flora-2\/inheritance-code\/\" data-orig-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2018\/11\/Inheritance-code.png\" data-orig-size=\"391,421\" 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=\"Inheritance in Flora-2\" data-image-description=\"&lt;p&gt;Inheritance in Flora-2&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;Inheritance in Flora-2&lt;\/p&gt;\n\" data-large-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2018\/11\/Inheritance-code.png\" class=\"size-full wp-image-1150\" src=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2018\/11\/Inheritance-code.png?resize=391%2C421&#038;ssl=1\" alt=\"Inheritance in Flora-2\" width=\"391\" height=\"421\" srcset=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2018\/11\/Inheritance-code.png?w=391&amp;ssl=1 391w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2018\/11\/Inheritance-code.png?resize=279%2C300&amp;ssl=1 279w\" sizes=\"(max-width: 391px) 100vw, 391px\" \/><\/a><figcaption id=\"caption-attachment-1150\" class=\"wp-caption-text\"><strong>Inheritance in Flora-2<\/strong><\/figcaption><\/figure>\n<p>Here, classes <em><strong>Base1<\/strong><\/em> and <em><strong>Base2<\/strong><\/em> have two attributes that have the same name. <em><strong>Derived<\/strong><\/em> is a subclass of both <em><strong>Base1<\/strong><\/em> and <em><strong>Base2<\/strong><\/em>. Take a look at the output for different queries in <em><strong>Flora-2:<\/strong><\/em><\/p>\n<figure id=\"attachment_1151\" aria-describedby=\"caption-attachment-1151\" style=\"width: 518px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2018\/11\/Inheritance-1.png?ssl=1\"><img data-recalc-dims=\"1\" decoding=\"async\" data-attachment-id=\"1151\" data-permalink=\"https:\/\/www.rangakrish.com\/index.php\/2018\/11\/04\/modeling-homeopathic-remedy-keynotes-in-flora-2\/inheritance-2\/\" data-orig-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2018\/11\/Inheritance-1.png\" data-orig-size=\"518,512\" 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=\"Flora-2 Output\" data-image-description=\"&lt;p&gt;Flora-2 Output&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;Flora-2 Output&lt;\/p&gt;\n\" data-large-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2018\/11\/Inheritance-1.png\" class=\"size-full wp-image-1151\" src=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2018\/11\/Inheritance-1.png?resize=518%2C512&#038;ssl=1\" alt=\"Flora-2 Output\" width=\"518\" height=\"512\" srcset=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2018\/11\/Inheritance-1.png?w=518&amp;ssl=1 518w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2018\/11\/Inheritance-1.png?resize=300%2C297&amp;ssl=1 300w\" sizes=\"(max-width: 518px) 100vw, 518px\" \/><\/a><figcaption id=\"caption-attachment-1151\" class=\"wp-caption-text\"><strong>Flora-2 Output<\/strong><\/figcaption><\/figure>\n<p>Notice how <em><strong>attrib1<\/strong><\/em> and <em><strong>attrib2<\/strong><\/em> are not inherited, where as <em><strong>attrib3<\/strong><\/em> and <em><strong>attrib4<\/strong><\/em> are inherited.<\/p>\n<p>In the context of homeopathic remedies, inheritance is common and even multiple inheritance occurs in a few places. in such cases, we want the remedy to inherit the <em><strong>union<\/strong><\/em> of behaviours from multiple remedy classes, instead of cancelling out. I could have tweaked some rules to get this working in <em><strong>Flora-2<\/strong><\/em>, but decided to follow a different strategy, by introducing an explicit attribute called <em><strong>group<\/strong><\/em> in the remedy description.<span class=\"Apple-converted-space\">\u00a0<\/span><\/p>\n<p>Here is an example of hierarchy seen our model.<\/p>\n<figure id=\"attachment_1174\" aria-describedby=\"caption-attachment-1174\" style=\"width: 589px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2018\/11\/Homeo-groups.png?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"1174\" data-permalink=\"https:\/\/www.rangakrish.com\/index.php\/2018\/11\/04\/modeling-homeopathic-remedy-keynotes-in-flora-2\/homeo-groups\/\" data-orig-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2018\/11\/Homeo-groups.png\" data-orig-size=\"589,675\" 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=\"Remedy Groups\" data-image-description=\"&lt;p&gt;Remedy Groups&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;Remedy Groups&lt;\/p&gt;\n\" data-large-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2018\/11\/Homeo-groups.png\" class=\"size-full wp-image-1174\" src=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2018\/11\/Homeo-groups.png?resize=589%2C675&#038;ssl=1\" alt=\"Remedy Groups\" width=\"589\" height=\"675\" srcset=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2018\/11\/Homeo-groups.png?w=589&amp;ssl=1 589w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2018\/11\/Homeo-groups.png?resize=262%2C300&amp;ssl=1 262w\" sizes=\"(max-width: 589px) 100vw, 589px\" \/><\/a><figcaption id=\"caption-attachment-1174\" class=\"wp-caption-text\"><strong>Remedy Groups<\/strong><\/figcaption><\/figure>\n<p>See the following description of the remedy <em><strong>lach, <\/strong><\/em>showing that it is a part of\u00a0<em><strong>Crotalidae <\/strong><\/em>group:<\/p>\n<figure id=\"attachment_1152\" aria-describedby=\"caption-attachment-1152\" style=\"width: 649px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2018\/11\/Group.png?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"1152\" data-permalink=\"https:\/\/www.rangakrish.com\/index.php\/2018\/11\/04\/modeling-homeopathic-remedy-keynotes-in-flora-2\/group\/\" data-orig-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2018\/11\/Group.png\" data-orig-size=\"649,173\" 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=\"Using Group Attribute\" data-image-description=\"&lt;p&gt;Using Group Attribute&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;Using Group Attribute&lt;\/p&gt;\n\" data-large-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2018\/11\/Group.png\" class=\"size-full wp-image-1152\" src=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2018\/11\/Group.png?resize=649%2C173&#038;ssl=1\" alt=\"Using Group Attribute\" width=\"649\" height=\"173\" srcset=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2018\/11\/Group.png?w=649&amp;ssl=1 649w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2018\/11\/Group.png?resize=300%2C80&amp;ssl=1 300w\" sizes=\"(max-width: 649px) 100vw, 649px\" \/><\/a><figcaption id=\"caption-attachment-1152\" class=\"wp-caption-text\"><strong>Using Group Attribute<\/strong><\/figcaption><\/figure>\n<p>The <em><strong>group<\/strong><\/em> attribute points to one or more remedy groups that this remedy belongs to.<\/p>\n<p>I define two rules to handle behavior inheritance from different groups:<\/p>\n<figure id=\"attachment_1153\" aria-describedby=\"caption-attachment-1153\" style=\"width: 611px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2018\/11\/Group-Rules.png?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"1153\" data-permalink=\"https:\/\/www.rangakrish.com\/index.php\/2018\/11\/04\/modeling-homeopathic-remedy-keynotes-in-flora-2\/group-rules\/\" data-orig-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2018\/11\/Group-Rules.png\" data-orig-size=\"611,219\" 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=\"Group Inheritance Rules\" data-image-description=\"&lt;p&gt;Group Inheritance Rules&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;Group Inheritance Rules&lt;\/p&gt;\n\" data-large-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2018\/11\/Group-Rules.png\" class=\"size-full wp-image-1153\" src=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2018\/11\/Group-Rules.png?resize=611%2C219&#038;ssl=1\" alt=\"Group Inheritance Rules\" width=\"611\" height=\"219\" srcset=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2018\/11\/Group-Rules.png?w=611&amp;ssl=1 611w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2018\/11\/Group-Rules.png?resize=300%2C108&amp;ssl=1 300w\" sizes=\"(max-width: 611px) 100vw, 611px\" \/><\/a><figcaption id=\"caption-attachment-1153\" class=\"wp-caption-text\"><strong>Group Inheritance Rules<\/strong><\/figcaption><\/figure>\n<p>The remarkable thing here is that <em><strong>Flora-2<\/strong><\/em> gives us the flexibility to define our concepts the way we want to model!<\/p>\n<p>Take a look at the remedy <a href=\"http:\/\/www.rangakrish.com\/downloads\/homeopathy-advanced.flr\" target=\"_blank\" rel=\"noopener\"><em><strong>model<\/strong><\/em><\/a>\u00a0I have developed for capturing a very small subset of features of some common homeopathic remedies.<span class=\"Apple-converted-space\">\u00a0<\/span><\/p>\n<h2><b>A Lisp Application to Access the Flora-2 Engine<\/b><\/h2>\n<p>When I was working on this model, I felt that the default <em><strong>Flora-2<\/strong><\/em> console, although quite functional, was not that appealing for extended use, so I decided to write a <em><strong>Lisp<\/strong><\/em> application to directly use the <em><strong>Flora-2<\/strong> <\/em>engine through the published <em><strong>Java API<\/strong><\/em>! To keep things simple and manageable, I restricted the scope to loading multiple knowledge bases and then querying the engine (functionality that is available in <a href=\"http:\/\/coherentknowledge.com\/ergo-documentation\/\" target=\"_blank\" rel=\"noopener\"><em><strong>ErgoAI<\/strong><\/em><\/a> IDE, but that is a priced product). Fortunately, <a href=\"http:\/\/www.lispworks.com\" target=\"_blank\" rel=\"noopener\"><em><strong>LispWorks<\/strong><\/em><\/a>\u00a0comes with Java support, so it was not hard to build the application (the application is still evolving, so I am not uploading it now). The examples that follow are shown in the context of my <em><strong>Lisp<\/strong><\/em> application.<\/p>\n<p>Here is the application at startup:<\/p>\n<figure id=\"attachment_1155\" aria-describedby=\"caption-attachment-1155\" style=\"width: 702px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2018\/11\/Startup.png?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"1155\" data-permalink=\"https:\/\/www.rangakrish.com\/index.php\/2018\/11\/04\/modeling-homeopathic-remedy-keynotes-in-flora-2\/startup\/\" data-orig-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2018\/11\/Startup.png\" data-orig-size=\"702,552\" 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=\"Application Initial Screen\" data-image-description=\"&lt;p&gt;Application Initial Screen&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;Application Initial Screen&lt;\/p&gt;\n\" data-large-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2018\/11\/Startup.png\" class=\"size-full wp-image-1155\" src=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2018\/11\/Startup.png?resize=702%2C552&#038;ssl=1\" alt=\"Application Initial Screen\" width=\"702\" height=\"552\" srcset=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2018\/11\/Startup.png?w=702&amp;ssl=1 702w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2018\/11\/Startup.png?resize=300%2C236&amp;ssl=1 300w\" sizes=\"(max-width: 702px) 100vw, 702px\" \/><\/a><figcaption id=\"caption-attachment-1155\" class=\"wp-caption-text\"><strong>Application Initial Screen<\/strong><\/figcaption><\/figure>\n<p>The application allows us to<span class=\"Apple-converted-space\">\u00a0<\/span><\/p>\n<blockquote><p><span style=\"color: #0000ff;\">* Load a KB file (module can be specified)<\/span><\/p>\n<p><span style=\"color: #0000ff;\">* Add more files into the same session<\/span><\/p>\n<p><span style=\"color: #0000ff;\">* Reload the last file<\/span><\/p>\n<p><span style=\"color: #0000ff;\">* Clear the current session and create a new one<\/span><\/p>\n<p><span style=\"color: #0000ff;\">* Edit KB files<\/span><\/p>\n<p><span style=\"color: #0000ff;\">* Query the Flora-2 engine<\/span><\/p><\/blockquote>\n<p>Here is the screen after loading the file <em><strong><a href=\"http:\/\/www.rangakrish.com\/downloads\/homeopathy-advanced.flr\" target=\"_blank\" rel=\"noopener\">homeopathy-advanced.flr<\/a><\/strong><\/em><\/p>\n<figure id=\"attachment_1156\" aria-describedby=\"caption-attachment-1156\" style=\"width: 702px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2018\/11\/After-loading.png?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"1156\" data-permalink=\"https:\/\/www.rangakrish.com\/index.php\/2018\/11\/04\/modeling-homeopathic-remedy-keynotes-in-flora-2\/after-loading\/\" data-orig-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2018\/11\/After-loading.png\" data-orig-size=\"702,552\" 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=\"After Loading KB File\" data-image-description=\"&lt;p&gt;After Loading KB File&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;After Loading KB File&lt;\/p&gt;\n\" data-large-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2018\/11\/After-loading.png\" class=\"size-full wp-image-1156\" src=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2018\/11\/After-loading.png?resize=702%2C552&#038;ssl=1\" alt=\"After Loading KB File\" width=\"702\" height=\"552\" srcset=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2018\/11\/After-loading.png?w=702&amp;ssl=1 702w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2018\/11\/After-loading.png?resize=300%2C236&amp;ssl=1 300w\" sizes=\"(max-width: 702px) 100vw, 702px\" \/><\/a><figcaption id=\"caption-attachment-1156\" class=\"wp-caption-text\"><strong>After Loading KB File<\/strong><\/figcaption><\/figure>\n<p>The loaded file can be opened for editing by clicking the <em><strong>Launch Editor<\/strong><\/em> button.<\/p>\n<figure id=\"attachment_1157\" aria-describedby=\"caption-attachment-1157\" style=\"width: 602px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2018\/11\/Editor.png?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"1157\" data-permalink=\"https:\/\/www.rangakrish.com\/index.php\/2018\/11\/04\/modeling-homeopathic-remedy-keynotes-in-flora-2\/editor\/\" data-orig-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2018\/11\/Editor.png\" data-orig-size=\"602,652\" 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=\"The Editor\" data-image-description=\"&lt;p&gt;The Editor&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;The Editor&lt;\/p&gt;\n\" data-large-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2018\/11\/Editor.png\" class=\"size-full wp-image-1157\" src=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2018\/11\/Editor.png?resize=602%2C652&#038;ssl=1\" alt=\"The Editor\" width=\"602\" height=\"652\" srcset=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2018\/11\/Editor.png?w=602&amp;ssl=1 602w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2018\/11\/Editor.png?resize=277%2C300&amp;ssl=1 277w\" sizes=\"(max-width: 602px) 100vw, 602px\" \/><\/a><figcaption id=\"caption-attachment-1157\" class=\"wp-caption-text\"><strong>The Editor<\/strong><\/figcaption><\/figure>\n<p>This is a <em><strong>no-frills<\/strong><\/em> editor. No syntax highlighting, etc., but supports basic editing and printing.<\/p>\n<p>OK. It is time to ask some queries on the KB file we just loaded:<\/p>\n<blockquote><p><span style=\"color: #0000ff;\">What are the mental keynotes of the remedy kali_c (Kali Carbonicum)?<\/span><\/p><\/blockquote>\n<figure id=\"attachment_1158\" aria-describedby=\"caption-attachment-1158\" style=\"width: 702px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2018\/11\/Query1.png?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"1158\" data-permalink=\"https:\/\/www.rangakrish.com\/index.php\/2018\/11\/04\/modeling-homeopathic-remedy-keynotes-in-flora-2\/query1-2\/\" data-orig-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2018\/11\/Query1.png\" data-orig-size=\"702,552\" 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=\"A Query\" data-image-description=\"&lt;p&gt;A Query&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;A Query&lt;\/p&gt;\n\" data-large-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2018\/11\/Query1.png\" class=\"size-full wp-image-1158\" src=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2018\/11\/Query1.png?resize=702%2C552&#038;ssl=1\" alt=\"A Query\" width=\"702\" height=\"552\" srcset=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2018\/11\/Query1.png?w=702&amp;ssl=1 702w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2018\/11\/Query1.png?resize=300%2C236&amp;ssl=1 300w\" sizes=\"(max-width: 702px) 100vw, 702px\" \/><\/a><figcaption id=\"caption-attachment-1158\" class=\"wp-caption-text\"><strong>A Query<\/strong><\/figcaption><\/figure>\n<p>The answer appears below the query \u2013 the variables in the query are matched with respective bindings.<\/p>\n<blockquote><p><span style=\"color: #0000ff;\">Another query: Which remedies have a quarrelsome mind?<\/span><\/p><\/blockquote>\n<figure id=\"attachment_1159\" aria-describedby=\"caption-attachment-1159\" style=\"width: 702px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2018\/11\/Query2.png?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"1159\" data-permalink=\"https:\/\/www.rangakrish.com\/index.php\/2018\/11\/04\/modeling-homeopathic-remedy-keynotes-in-flora-2\/query2\/\" data-orig-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2018\/11\/Query2.png\" data-orig-size=\"702,552\" 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=\"Another Query\" data-image-description=\"&lt;p&gt;Another Query&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;Another Query&lt;\/p&gt;\n\" data-large-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2018\/11\/Query2.png\" class=\"size-full wp-image-1159\" src=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2018\/11\/Query2.png?resize=702%2C552&#038;ssl=1\" alt=\"Another Query\" width=\"702\" height=\"552\" srcset=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2018\/11\/Query2.png?w=702&amp;ssl=1 702w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2018\/11\/Query2.png?resize=300%2C236&amp;ssl=1 300w\" sizes=\"(max-width: 702px) 100vw, 702px\" \/><\/a><figcaption id=\"caption-attachment-1159\" class=\"wp-caption-text\"><strong>Another Query<\/strong><\/figcaption><\/figure>\n<p>The remedy <em><strong>kali_c<\/strong> <\/em>matches the query.<\/p>\n<blockquote><p><span style=\"color: #0000ff;\">Next: Which class (or classes) does the family &#8220;Crotalidae&#8221; inherit from?<\/span><\/p><\/blockquote>\n<figure id=\"attachment_1160\" aria-describedby=\"caption-attachment-1160\" style=\"width: 648px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2018\/11\/Query3.png?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"1160\" data-permalink=\"https:\/\/www.rangakrish.com\/index.php\/2018\/11\/04\/modeling-homeopathic-remedy-keynotes-in-flora-2\/query3\/\" data-orig-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2018\/11\/Query3.png\" data-orig-size=\"648,552\" 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=\"Inheritance Question\" data-image-description=\"&lt;p&gt;Inheritance Question&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;Inheritance Question&lt;\/p&gt;\n\" data-large-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2018\/11\/Query3.png\" class=\"size-full wp-image-1160\" src=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2018\/11\/Query3.png?resize=648%2C552&#038;ssl=1\" alt=\"Inheritance Question\" width=\"648\" height=\"552\" srcset=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2018\/11\/Query3.png?w=648&amp;ssl=1 648w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2018\/11\/Query3.png?resize=300%2C256&amp;ssl=1 300w\" sizes=\"(max-width: 648px) 100vw, 648px\" \/><\/a><figcaption id=\"caption-attachment-1160\" class=\"wp-caption-text\"><strong>Inheritance Question<\/strong><\/figcaption><\/figure>\n<p><em><strong>Flora-2<\/strong><\/em> prints all the base classes, up to the root.<\/p>\n<blockquote><p><span style=\"color: #0000ff;\">Next query: Which remedy belongs to the Plant group?<\/span><\/p><\/blockquote>\n<figure id=\"attachment_1161\" aria-describedby=\"caption-attachment-1161\" style=\"width: 648px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2018\/11\/Query4.png?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"1161\" data-permalink=\"https:\/\/www.rangakrish.com\/index.php\/2018\/11\/04\/modeling-homeopathic-remedy-keynotes-in-flora-2\/query4\/\" data-orig-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2018\/11\/Query4.png\" data-orig-size=\"648,552\" 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=\"Query About Group\" data-image-description=\"&lt;p&gt;Query About Group&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;Query About Group&lt;\/p&gt;\n\" data-large-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2018\/11\/Query4.png\" class=\"size-full wp-image-1161\" src=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2018\/11\/Query4.png?resize=648%2C552&#038;ssl=1\" alt=\"Query About Group\" width=\"648\" height=\"552\" srcset=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2018\/11\/Query4.png?w=648&amp;ssl=1 648w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2018\/11\/Query4.png?resize=300%2C256&amp;ssl=1 300w\" sizes=\"(max-width: 648px) 100vw, 648px\" \/><\/a><figcaption id=\"caption-attachment-1161\" class=\"wp-caption-text\"><strong>Query About Group<\/strong><\/figcaption><\/figure>\n<p>We see two remedies, <em><strong>Lycopodium<\/strong><\/em> and <em><strong>Nux Vomica<\/strong><\/em> coming up as matches.<\/p>\n<p>To make it a little bit more interesting, let us load another KB into the same session, using the <em><strong>Add Rule<\/strong><\/em> button. The file <a href=\"http:\/\/www.rangakrish.com\/downloads\/homeo-pathology.flr\" target=\"_blank\" rel=\"noopener\"><em><strong>homeo-pathology.flr<\/strong><\/em><\/a>\u00a0is essentially the same example we discussed in the <a href=\"https:\/\/www.rangakrish.com\/index.php\/2018\/10\/28\/flora-2-an-expressive-knowledge-representation-system\/\" target=\"_blank\" rel=\"noopener\"><em><strong>last post<\/strong><\/em><\/a>, with minor changes to conform to the new model. Note that we are <em><strong>adding<\/strong><\/em> to the current session, not replacing the previously loaded KB.<span class=\"Apple-converted-space\">\u00a0<\/span><\/p>\n<p>The information available in the session is the <em><strong>union<\/strong><\/em> of the two KBs, as we discussed earlier. Let us ask a query that involves both information:<\/p>\n<blockquote><p><span style=\"color: #0000ff;\">Enumerate the Rheumatism remedies along with their full names<\/span><\/p><\/blockquote>\n<figure id=\"attachment_1162\" aria-describedby=\"caption-attachment-1162\" style=\"width: 648px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2018\/11\/Query5-after-loading-other-file.png?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"1162\" data-permalink=\"https:\/\/www.rangakrish.com\/index.php\/2018\/11\/04\/modeling-homeopathic-remedy-keynotes-in-flora-2\/query5-after-loading-other-file\/\" data-orig-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2018\/11\/Query5-after-loading-other-file.png\" data-orig-size=\"648,552\" 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=\"Combined Query\" data-image-description=\"&lt;p&gt;Combined Query&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;Combined Query&lt;\/p&gt;\n\" data-large-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2018\/11\/Query5-after-loading-other-file.png\" class=\"size-full wp-image-1162\" src=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2018\/11\/Query5-after-loading-other-file.png?resize=648%2C552&#038;ssl=1\" alt=\"Combined Query\" width=\"648\" height=\"552\" srcset=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2018\/11\/Query5-after-loading-other-file.png?w=648&amp;ssl=1 648w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2018\/11\/Query5-after-loading-other-file.png?resize=300%2C256&amp;ssl=1 300w\" sizes=\"(max-width: 648px) 100vw, 648px\" \/><\/a><figcaption id=\"caption-attachment-1162\" class=\"wp-caption-text\"><strong>Combined Query<\/strong><\/figcaption><\/figure>\n<p>This is a <em><strong>conjunctive<\/strong><\/em> query, and as expected, fetches the correct answers.<\/p>\n<p>One last query: Which remedies have psoric miasm in the second degree?<\/p>\n<figure id=\"attachment_1163\" aria-describedby=\"caption-attachment-1163\" style=\"width: 648px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2018\/11\/Query6.png?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"1163\" data-permalink=\"https:\/\/www.rangakrish.com\/index.php\/2018\/11\/04\/modeling-homeopathic-remedy-keynotes-in-flora-2\/query6\/\" data-orig-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2018\/11\/Query6.png\" data-orig-size=\"648,552\" 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=\"Query on Miasm\" data-image-description=\"&lt;p&gt;Query on Miasm&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;Query on Miasm&lt;\/p&gt;\n\" data-large-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2018\/11\/Query6.png\" class=\"size-full wp-image-1163\" src=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2018\/11\/Query6.png?resize=648%2C552&#038;ssl=1\" alt=\"Query on Miasm\" width=\"648\" height=\"552\" srcset=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2018\/11\/Query6.png?w=648&amp;ssl=1 648w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2018\/11\/Query6.png?resize=300%2C256&amp;ssl=1 300w\" sizes=\"(max-width: 648px) 100vw, 648px\" \/><\/a><figcaption id=\"caption-attachment-1163\" class=\"wp-caption-text\"><strong>Query on Miasm<\/strong><\/figcaption><\/figure>\n<p>Everything seems to be working well! When I get some free time, I plan to enhance the application to make it more usable.<\/p>\n<p>That brings us to the end of today&#8217;s discussion on modeling remedy keynotes. While converting from natural language description as in <em><strong>materia medica<\/strong><\/em> and other sources, we have to be careful in adopting and following a uniform terminology as well as a consistent frame structure (in the context of <em><strong>Flora-2<\/strong><\/em>). I found the whole exercise enjoyable, mainly due to the expressiveness of <em><strong>Flora-2<\/strong><\/em>. There is a lot more to learn!<\/p>\n<p>You can download the model files <a href=\"http:\/\/www.rangakrish.com\/downloads\/homeo-pathology.flr\" target=\"_blank\" rel=\"noopener\"><em><strong>homeo-pathology.flr<\/strong><\/em><\/a> and <a href=\"http:\/\/www.rangakrish.com\/downloads\/homeopathy-advanced.flr\" target=\"_blank\" rel=\"noopener\"><em><strong>homeopathy-advanced.flr<\/strong><\/em><\/a> and take a look. Suggestions for improvements are welcome.<\/p>\n<p>Have a great weekend!<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In my last post, I got started with Flora-2 and showed how we can model homeopathic remedies from a therapeutics perspective. Although such a limited view of remedies can be helpful in treating acute ailments, for treating chronic diseases, a comprehensive understanding of the various remedies from the perspective of keynotes, kingdom classification and miasms [&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_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},"jetpack_post_was_ever_published":false},"categories":[169,22,162,18,107,17],"tags":[164,25,163,99],"class_list":["post-1146","post","type-post","status-publish","format-standard","hentry","category-flora-2","category-homeopathy","category-knowledge-representation","category-lisp","category-natural-language-processing","category-programming","tag-flora-2","tag-homeopathy","tag-knowledge-representation","tag-lispworks"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p9OLnF-iu","jetpack-related-posts":[{"id":1109,"url":"https:\/\/www.rangakrish.com\/index.php\/2018\/10\/28\/flora-2-an-expressive-knowledge-representation-system\/","url_meta":{"origin":1146,"position":0},"title":"Flora-2: An Expressive Knowledge Representation System","author":"admin","date":"October 28, 2018","format":false,"excerpt":"I am always on the lookout for a good Knowledge Representation (KR) system that facilitates modeling and reasoning about real-world knowledge. I have experience with\u00a0KnowledgeWorks\u00a0available in LispWorks\u00a0since I have used it in a few projects. I have also taken a cursory look at PowerLoom\u00a0and Racer. Last week, I came across\u2026","rel":"","context":"In &quot;Flora-2&quot;","block_context":{"text":"Flora-2","link":"https:\/\/www.rangakrish.com\/index.php\/category\/flora-2\/"},"img":{"alt_text":"Quitting Flora-2 Session","src":"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2018\/10\/quitting.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2018\/10\/quitting.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2018\/10\/quitting.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":2119,"url":"https:\/\/www.rangakrish.com\/index.php\/2020\/08\/30\/book-review-homeopathy-in-intensive-care-and-emergency-medicine\/","url_meta":{"origin":1146,"position":1},"title":"Book Review &#8211; Homeopathy in Intensive Care and Emergency Medicine","author":"admin","date":"August 30, 2020","format":false,"excerpt":"Title: Homeopathy in Intensive Care and Emergency Medicine Author: Michael Frass and Martin Bundner (Ed.) Publisher: Narayana Verlag Year: 2017 (2nd English Edition) This book is somewhat unique in that it shows, through a good number of cases, that homeopathy can be used alongside allopathy in treating serious disorders in\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":"Book cover image","src":"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2020\/08\/book-218x300.jpg?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":90,"url":"https:\/\/www.rangakrish.com\/index.php\/2015\/11\/25\/book-review-homeopathy-through-the-chinese-looking-glass-homeosiniatry-revisited\/","url_meta":{"origin":1146,"position":2},"title":"Book Review &#8211; Homeopathy through the Chinese Looking Glass: Homeosiniatry Revisited","author":"admin","date":"November 25, 2015","format":false,"excerpt":"Title: Homeopathy through the Chinese Looking Glass: Homeosiniatry Revisited Author: Dr. Joe Rozencwajg, NMD, Publisher: Emryss Publishers Year: 2011 Though I had purchased this book a few months ago, I could not finish reading it until last week. Thanks to the heavy rains in Chennai, I got some extra spare\u2026","rel":"","context":"In &quot;Acupuncture&quot;","block_context":{"text":"Acupuncture","link":"https:\/\/www.rangakrish.com\/index.php\/category\/acupuncture\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":3297,"url":"https:\/\/www.rangakrish.com\/index.php\/2024\/01\/10\/book-review-homeopathic-strategies-and-maps-for-acute-conditions-part-1\/","url_meta":{"origin":1146,"position":3},"title":"Book Review: Homeopathic Strategies and Maps for Acute Conditions (Part-1)","author":"admin","date":"January 10, 2024","format":false,"excerpt":"Title: Homeopathic Strategies and Maps for Acute Conditions (Part-1) Author: Dr.Gaurang Gaikwad Publisher: Dr.Gaurang Gaikwad Year: 2024 This is the fourth and newest book by Dr.Gaurang Gaikwad of Mumbai. I have reviewed two of his other books earlier. There are hundreds of books on treating acute cases in homeopathy, but\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\/2024\/01\/Cover-2-204x300.jpg?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":484,"url":"https:\/\/www.rangakrish.com\/index.php\/2017\/02\/20\/book-review-homeopathic-remedy-pictures\/","url_meta":{"origin":1146,"position":4},"title":"Book Review &#8211; Homeopathic Remedy Pictures","author":"admin","date":"February 20, 2017","format":false,"excerpt":"Title: Homeopathic Remedy Pictures - The 65 most important remedies in words and pictures Author: Vicki Mathison\u00a0and\u00a0Frans Kusse Publisher:\u00a0Narayana Verlag Year: 2014 This is a great book that will appeal to all beginners in homeopathy. Experienced doctors might not finding anything new, but would definitely find it interesting to read.\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":"","width":0,"height":0},"classes":[]},{"id":3660,"url":"https:\/\/www.rangakrish.com\/index.php\/2025\/04\/11\/using-claude-to-generate-rdf-triples\/","url_meta":{"origin":1146,"position":5},"title":"Using Claude to Generate RDF Triples","author":"admin","date":"April 11, 2025","format":false,"excerpt":"We all know that LLMs are now capable of generating structured data. I have used OpenAI models earlier to generate Tables and JSON data, but this time I wanted to try a more complex example.\u00a0 As someone interested in Homeopathy, I wanted to generate remedy descriptions as RDF triples, in\u2026","rel":"","context":"In &quot;Homeopathy&quot;","block_context":{"text":"Homeopathy","link":"https:\/\/www.rangakrish.com\/index.php\/category\/homeopathy\/"},"img":{"alt_text":"Lycopodium TTL Format","src":"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2025\/04\/Lyco-300x232.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2025\/04\/Lyco-300x232.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2025\/04\/Lyco-300x232.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]}],"_links":{"self":[{"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/posts\/1146","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=1146"}],"version-history":[{"count":0,"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/posts\/1146\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/media?parent=1146"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/categories?post=1146"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/tags?post=1146"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}