{"id":1349,"date":"2018-12-30T11:18:08","date_gmt":"2018-12-30T05:48:08","guid":{"rendered":"https:\/\/www.rangakrish.com\/?p=1349"},"modified":"2018-12-30T11:32:48","modified_gmt":"2018-12-30T06:02:48","slug":"natural-language-interaction-with-ilexicon-using-luis","status":"publish","type":"post","link":"https:\/\/www.rangakrish.com\/index.php\/2018\/12\/30\/natural-language-interaction-with-ilexicon-using-luis\/","title":{"rendered":"Natural Language Interaction with iLexicon Using LUIS"},"content":{"rendered":"<p>Some time ago, I had written a series of articles on my <a href=\"https:\/\/www.rangakrish.com\/index.php\/2018\/02\/11\/onomatopoeia-palindrome-and-semordnilap\/\" target=\"_blank\" rel=\"noopener\"><em><strong>iLexicon<\/strong><\/em><\/a> project. It is a Lisp package that supports many interesting queries on English words. When I was discussing this project with a client recently, she asked me if it was possible to query the system in natural language instead of through Lisp. That idea had never crossed my mind until then. Later, I started thinking about how I could build a simple NLP front-end to that system. I remembered a project that an intern did with me over a year ago using Microsoft <a href=\"https:\/\/www.luis.ai\/home\" target=\"_blank\" rel=\"noopener\"><em><strong>LUIS<\/strong><\/em><\/a>\u00a0and decided to explore that option.<\/p>\n<p>So, here is what we want: The user would pose queries such as <em><strong>\u201cGive me a list of pronouns\u201d<\/strong><\/em> or <em><strong>\u201cWhat are some verbs with 4 syllables?\u201d<\/strong><\/em>. The system needs to respond by returning the words that satisfy the query. The natural language communication is one way &#8211; from user to the system. The interaction is still in the context of Lisp, but it can be converted to an independent app with a little bit of extra effort.<\/p>\n<p>The three components of the system are shown in the following diagram.<\/p>\n<figure id=\"attachment_1351\" aria-describedby=\"caption-attachment-1351\" style=\"width: 504px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2018\/12\/Architecture.png?ssl=1\"><img data-recalc-dims=\"1\" fetchpriority=\"high\" decoding=\"async\" data-attachment-id=\"1351\" data-permalink=\"https:\/\/www.rangakrish.com\/index.php\/2018\/12\/30\/natural-language-interaction-with-ilexicon-using-luis\/architecture\/\" data-orig-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2018\/12\/Architecture.png\" data-orig-size=\"504,381\" 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=\"System Architecture\" data-image-description=\"&lt;p&gt;System Architecture&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;System Architecture&lt;\/p&gt;\n\" data-large-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2018\/12\/Architecture.png\" class=\"size-full wp-image-1351\" src=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2018\/12\/Architecture.png?resize=504%2C381&#038;ssl=1\" alt=\"System Architecture\" width=\"504\" height=\"381\" srcset=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2018\/12\/Architecture.png?w=504&amp;ssl=1 504w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2018\/12\/Architecture.png?resize=300%2C227&amp;ssl=1 300w\" sizes=\"(max-width: 504px) 100vw, 504px\" \/><\/a><figcaption id=\"caption-attachment-1351\" class=\"wp-caption-text\"><strong>System Architecture<\/strong><\/figcaption><\/figure>\n<p>As the above diagram shows, <em><strong>iLexicon<\/strong><\/em> runs as a server process, and exposes a REST API. The client app (Lisp environment) additionally interacts with <em><strong>LUIS<\/strong><\/em>.<\/p>\n<p>I have earlier built a C++ client application (written in <a href=\"https:\/\/www.embarcadero.com\/products\/cbuilder\" target=\"_blank\" rel=\"noopener\"><em><strong>C++ Builder 10.3<\/strong><\/em><\/a>) that interacts with the <em><strong>iLexicon<\/strong><\/em> server. But that app does not provide NLP front-end. Here is a sample session with that application:<\/p>\n<figure id=\"attachment_1352\" aria-describedby=\"caption-attachment-1352\" style=\"width: 649px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2018\/12\/CClient.png?ssl=1\"><img data-recalc-dims=\"1\" decoding=\"async\" data-attachment-id=\"1352\" data-permalink=\"https:\/\/www.rangakrish.com\/index.php\/2018\/12\/30\/natural-language-interaction-with-ilexicon-using-luis\/cclient\/\" data-orig-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2018\/12\/CClient.png\" data-orig-size=\"681,387\" 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=\"C++ Client\" data-image-description=\"&lt;p&gt;C++ Client&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;C++ Client&lt;\/p&gt;\n\" data-large-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2018\/12\/CClient.png\" class=\"wp-image-1352\" src=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2018\/12\/CClient.png?resize=649%2C369&#038;ssl=1\" alt=\"C++ Client\" width=\"649\" height=\"369\" srcset=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2018\/12\/CClient.png?w=681&amp;ssl=1 681w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2018\/12\/CClient.png?resize=300%2C170&amp;ssl=1 300w\" sizes=\"(max-width: 649px) 100vw, 649px\" \/><\/a><figcaption id=\"caption-attachment-1352\" class=\"wp-caption-text\"><strong>C++ Client<\/strong><\/figcaption><\/figure>\n<p>When the client app sends an NLP query to <em><strong>LUIS<\/strong><\/em>, it gets a JSON response in return. Here is an example of the JSON object from <em><strong>LUIS<\/strong><\/em> for the query <em><strong>\u201cgive me some verbs with 6 letters\u201d<\/strong><\/em>:<\/p>\n<figure id=\"attachment_1354\" aria-describedby=\"caption-attachment-1354\" style=\"width: 387px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2018\/12\/Result-JSON-1.png?ssl=1\"><img data-recalc-dims=\"1\" decoding=\"async\" data-attachment-id=\"1354\" data-permalink=\"https:\/\/www.rangakrish.com\/index.php\/2018\/12\/30\/natural-language-interaction-with-ilexicon-using-luis\/result-json-2\/\" data-orig-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2018\/12\/Result-JSON-1.png\" data-orig-size=\"387,704\" 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=\"Result JSON\" data-image-description=\"&lt;p&gt;Result JSON&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;Result JSON&lt;\/p&gt;\n\" data-large-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2018\/12\/Result-JSON-1.png\" class=\"size-full wp-image-1354\" src=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2018\/12\/Result-JSON-1.png?resize=387%2C704&#038;ssl=1\" alt=\"Result JSON\" width=\"387\" height=\"704\" srcset=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2018\/12\/Result-JSON-1.png?w=387&amp;ssl=1 387w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2018\/12\/Result-JSON-1.png?resize=165%2C300&amp;ssl=1 165w\" sizes=\"(max-width: 387px) 100vw, 387px\" \/><\/a><figcaption id=\"caption-attachment-1354\" class=\"wp-caption-text\"><strong>Result JSON<\/strong><\/figcaption><\/figure>\n<p>The Lisp client converts the result JSON to appropriate parameters compatible with <em><strong>iLexicon<\/strong><\/em> REST server and invokes that API. The returned result is parsed and presented as a Lisp expression.<\/p>\n<p>Working with <em><strong>LUIS<\/strong><\/em> to design the intents and entities was a straightforward task. As in any development effort, this is an iterative process. In this particular case, I started off with a handful of sample sentences and kept adding more as and when I found out some sentences were not parsed correctly. The <em><strong>Test<\/strong><\/em> console was quite helpful here. When I was confident that I had the right model, I <em><strong>Published<\/strong><\/em> the model and got an end-point for use from an external application.<\/p>\n<p>By the way, <em><strong>LUIS<\/strong><\/em> is typically used as part of a <em><strong>chatbot<\/strong><\/em> framework along with <a href=\"https:\/\/dev.botframework.com\" target=\"_blank\" rel=\"noopener\"><em><strong>Microsoft Bot Framework<\/strong><\/em><\/a>, but I did not need the latter since I was not building a chatbot. Although I could have used any other NLP parsing service such as <a href=\"https:\/\/www.meaningcloud.com\" target=\"_blank\" rel=\"noopener\"><em><strong>Meaningcloud.com<\/strong><\/em><\/a> or a library such as <a href=\"https:\/\/spacy.io\" target=\"_blank\" rel=\"noopener\"><em><strong>spaCy<\/strong><\/em><\/a>, that would have meant more work from my side.<\/p>\n<p>Here is the Lisp code fragment that talks to <em><strong>LUIS<\/strong><\/em>:<\/p>\n<figure id=\"attachment_1355\" aria-describedby=\"caption-attachment-1355\" style=\"width: 579px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2018\/12\/code.png?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"1355\" data-permalink=\"https:\/\/www.rangakrish.com\/index.php\/2018\/12\/30\/natural-language-interaction-with-ilexicon-using-luis\/code\/\" data-orig-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2018\/12\/code.png\" data-orig-size=\"579,532\" 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=\"Talking to LUIS\" data-image-description=\"&lt;p&gt;Talking to LUIS&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;Talking to LUIS&lt;\/p&gt;\n\" data-large-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2018\/12\/code.png\" class=\"size-full wp-image-1355\" src=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2018\/12\/code.png?resize=579%2C532&#038;ssl=1\" alt=\"Talking to LUIS\" width=\"579\" height=\"532\" srcset=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2018\/12\/code.png?w=579&amp;ssl=1 579w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2018\/12\/code.png?resize=300%2C276&amp;ssl=1 300w\" sizes=\"(max-width: 579px) 100vw, 579px\" \/><\/a><figcaption id=\"caption-attachment-1355\" class=\"wp-caption-text\"><strong>Talking to LUIS<\/strong><\/figcaption><\/figure>\n<p>And here is the function that talks to <em><strong>iLexicon<\/strong><\/em> REST server:<\/p>\n<figure id=\"attachment_1356\" aria-describedby=\"caption-attachment-1356\" style=\"width: 596px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2018\/12\/Code2.png?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"1356\" data-permalink=\"https:\/\/www.rangakrish.com\/index.php\/2018\/12\/30\/natural-language-interaction-with-ilexicon-using-luis\/code2-2\/\" data-orig-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2018\/12\/Code2.png\" data-orig-size=\"596,381\" 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=\"Talking to iLexicon\" data-image-description=\"&lt;p&gt;Talking to iLexicon&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;Talking to iLexicon&lt;\/p&gt;\n\" data-large-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2018\/12\/Code2.png\" class=\"size-full wp-image-1356\" src=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2018\/12\/Code2.png?resize=596%2C381&#038;ssl=1\" alt=\"Talking to iLexicon\" width=\"596\" height=\"381\" srcset=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2018\/12\/Code2.png?w=596&amp;ssl=1 596w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2018\/12\/Code2.png?resize=300%2C192&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2018\/12\/Code2.png?resize=140%2C90&amp;ssl=1 140w\" sizes=\"(max-width: 596px) 100vw, 596px\" \/><\/a><figcaption id=\"caption-attachment-1356\" class=\"wp-caption-text\"><strong>Talking to iLexicon<\/strong><\/figcaption><\/figure>\n<p>OK, let us look at some typical NLP queries and their responses.<\/p>\n<blockquote><p><span style=\"color: #0000ff;\">CL-USER 10 &gt; (execute-nlp-query &#8220;show me some 5 letter palindromes&#8221;)<\/span><br \/>\n<span style=\"color: #0000ff;\">(&#8220;aeaea&#8221; &#8220;alula&#8221; &#8220;aviva&#8221; &#8220;civic&#8221; &#8220;enone&#8221; &#8220;kaiak&#8221; &#8220;kayak&#8221; &#8220;kazak&#8221; &#8220;kelek&#8221; &#8220;kodok&#8221; &#8220;laval&#8221;<br \/>\n<\/span><span style=\"color: #0000ff;\">&#8220;level&#8221; &#8220;ma&#8217;am&#8221; &#8220;madam&#8221; &#8220;menem&#8221; &#8220;minim&#8221; &#8220;oruro&#8221; &#8220;radar&#8221; &#8220;refer&#8221; &#8220;rotor&#8221;<br \/>\n<\/span><span style=\"color: #0000ff;\">&#8220;seles&#8221; &#8220;senes&#8221; &#8220;sinis&#8221; &#8220;siris&#8221;\u00a0&#8220;tebet&#8221; &#8220;tenet&#8221; &#8220;tevet&#8221; &#8220;igigi&#8221;\u00a0&#8220;tibit&#8221; &#8220;xanax&#8221;<\/span><br \/>\n<span style=\"color: #0000ff;\">&#8220;malam&#8221; &#8220;noyon&#8221; &#8220;nomon&#8221; &#8220;reger&#8221;)<\/span><br \/>\n<span style=\"color: #0000ff;\">\u00a0<\/span><\/p><\/blockquote>\n<blockquote><p><span style=\"color: #0000ff;\">CL-USER 11 &gt; (execute-nlp-query &#8220;i would like some 4 syllable nouns that are a type of building &#8220;)<\/span><br \/>\n<span style=\"color: #0000ff;\">(&#8220;architecture&#8221; &#8220;aviary&#8221; &#8220;crenelation&#8221; &#8220;dormitory&#8221; &#8220;fabrication&#8221; &#8220;mortuary&#8221; &#8220;presbytery&#8221;<br \/>\n<\/span><span style=\"color: #0000ff;\">&#8220;rustication&#8221; &#8220;crenellation&#8221;)<\/span><\/p><\/blockquote>\n<blockquote><p><span style=\"color: #0000ff;\">CL-USER 12 &gt; (execute-nlp-query &#8220;what are some pronouns?&#8221;)<\/span><br \/>\n<span style=\"color: #0000ff;\">(&#8220;her&#8221; &#8220;herself&#8221; &#8220;him&#8221; &#8220;himself&#8221; &#8220;it&#8221; &#8220;itself&#8221; &#8220;myself&#8221; &#8220;oneself&#8221; &#8220;our&#8221; &#8220;ourselves&#8221; &#8220;she&#8221;<br \/>\n<\/span><span style=\"color: #0000ff;\">&#8220;that&#8221; &#8220;them&#8221; &#8220;themselves&#8221; &#8220;they&#8221; &#8220;this&#8221; &#8220;we&#8221; &#8220;whoever&#8221; &#8220;whom&#8221; &#8220;whomsoever&#8221;<br \/>\n<\/span><span style=\"color: #0000ff;\">\u00a0&#8220;whose&#8221; &#8220;ye&#8221; &#8220;you&#8221; &#8220;yourself&#8221;)<\/span><\/p><\/blockquote>\n<blockquote><p><span style=\"color: #0000ff;\">CL-USER 13 &gt; (execute-nlp-query &#8220;give me some verbs that have 6 letters and 3 syllables?&#8221;)<\/span><br \/>\n<span style=\"color: #0000ff;\">(&#8220;aerify&#8221; &#8220;argufy&#8221; &#8220;aurify&#8221; &#8220;aviate&#8221; &#8220;awaken&#8221; &#8220;basify&#8221; &#8220;canopy&#8221; &#8220;citify&#8221; &#8220;codify&#8221; &#8220;elicit&#8221;<br \/>\n&#8220;embody&#8221;\u00a0&#8220;enable&#8221; &#8220;enamel&#8221; &#8220;enamor&#8221; &#8220;gasify&#8221; &#8220;ideate&#8221; &#8220;intuit&#8221; &#8220;iodize&#8221; &#8220;ionise&#8221;<br \/>\n&#8220;ionize&#8221; &#8220;minify&#8221;\u00a0&#8220;modify&#8221;\u00a0&#8220;mutiny&#8221; &#8220;nazify&#8221; &#8220;notify&#8221; &#8220;occupy&#8221; &#8220;orient&#8221; &#8220;ossify&#8221;<br \/>\n&#8220;overdo&#8221; &#8220;pacify&#8221; &#8220;parody&#8221; &#8220;purify&#8221;\u00a0&#8220;ramify&#8221;\u00a0&#8220;rarefy&#8221; &#8220;ratify&#8221; &#8220;rebury&#8221; &#8220;refuel&#8221;<br \/>\n&#8220;remedy&#8221; &#8220;reopen&#8221; &#8220;resume&#8221; &#8220;salute&#8221; &#8220;tumefy&#8221; &#8220;typify&#8221; &#8220;vacuum&#8221;\u00a0&#8220;verify&#8221; &#8220;vilify&#8221;<br \/>\n<\/span><span style=\"color: #0000ff;\">&#8220;vivify&#8221; &#8220;iodise&#8221;\u00a0&#8220;recopy&#8221; &#8220;uglify&#8221;<\/span><\/p><\/blockquote>\n<p>I could go on and on with more examples, but that will suffice for now. I just wanted to show that it is possible to build simple NLP front-ends using tools such as <em><strong>LUIS<\/strong><\/em>. If you are interested in building chatbots, then <a href=\"https:\/\/aws.amazon.com\/lex\/\" target=\"_blank\" rel=\"noopener\"><em><strong>A<\/strong><strong>mazon Lex<\/strong><\/em> <\/a>\u00a0is another promising candidate.<\/p>\n<p>Thanks for your wonderful support all these years! Wish you all a fantastic 2019!!<\/p>\n<p><span class=\"Apple-converted-space\">\u00a0<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Some time ago, I had written a series of articles on my iLexicon project. It is a Lisp package that supports many interesting queries on English words. When I was discussing this project with a client recently, she asked me if it was possible to query the system in natural language instead of through Lisp. [&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":[18,107,17],"tags":[130,178],"class_list":["post-1349","post","type-post","status-publish","format-standard","hentry","category-lisp","category-natural-language-processing","category-programming","tag-ilexicon","tag-microsoft-luis"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p9OLnF-lL","jetpack-related-posts":[{"id":2366,"url":"https:\/\/www.rangakrish.com\/index.php\/2021\/03\/28\/implementing-ilexicon-using-litedb\/","url_meta":{"origin":1349,"position":0},"title":"Implementing iLexicon using LiteDB","author":"admin","date":"March 28, 2021","format":false,"excerpt":"iLexicon is an \"intelligent\" dictionary that can be used to build Natural Language applications. I have two implementations, one in Lisp and another in Prolog. Both implementations are memory-based, in order to speed up performance. I have written several articles referencing it, for example see this. \u00a0 LiteDB is a\u2026","rel":"","context":"In &quot;Natural Language Processing&quot;","block_context":{"text":"Natural Language Processing","link":"https:\/\/www.rangakrish.com\/index.php\/category\/natural-language-processing\/"},"img":{"alt_text":"Sample Commands","src":"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2021\/03\/Session1.jpg?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":1659,"url":"https:\/\/www.rangakrish.com\/index.php\/2019\/08\/04\/generating-poetry-in-prolog\/","url_meta":{"origin":1349,"position":1},"title":"Generating Poetry in Prolog","author":"admin","date":"August 4, 2019","format":false,"excerpt":"In an earlier article, I showed how we can generate poetry (with limitations, of course!) using my iLangGen framework. That implementation (in Lisp) made use of iLexicon, a large dictionary of English words, which I have been building over the years. I subsequently ported iLexicon to Prolog and it now\u2026","rel":"","context":"In &quot;Natural Language Processing&quot;","block_context":{"text":"Natural Language Processing","link":"https:\/\/www.rangakrish.com\/index.php\/category\/natural-language-processing\/"},"img":{"alt_text":"Generation Logic","src":"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2019\/08\/Code3.jpg?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2019\/08\/Code3.jpg?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2019\/08\/Code3.jpg?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":846,"url":"https:\/\/www.rangakrish.com\/index.php\/2018\/02\/11\/onomatopoeia-palindrome-and-semordnilap\/","url_meta":{"origin":1349,"position":2},"title":"Onomatopoeia, Palindrome and Semordnilap","author":"admin","date":"February 11, 2018","format":false,"excerpt":"I had earlier\u00a0briefly talked about the Ilexicon project that I have been working on for some time now. The goal is to build an intelligent dictionary\u00a0that will come in handy while implementing NLP applications such as recognizers and generators. In today's post, I want to demonstrate some cool features available\u2026","rel":"","context":"In &quot;LISP&quot;","block_context":{"text":"LISP","link":"https:\/\/www.rangakrish.com\/index.php\/category\/lisp\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":863,"url":"https:\/\/www.rangakrish.com\/index.php\/2018\/03\/11\/kangaroo-words\/","url_meta":{"origin":1349,"position":3},"title":"Kangaroo Words","author":"admin","date":"March 11, 2018","format":false,"excerpt":"According to Wikipedia, \"A kangaroo word is a word that contains letters of another word, in order, with the same meaning. For example: the word 'masculine' contains the word 'male', which is a synonym of the first word; similarly, the word 'observe' contains its synonym 'see'.\" Interesting idea. The key\u2026","rel":"","context":"In &quot;LISP&quot;","block_context":{"text":"LISP","link":"https:\/\/www.rangakrish.com\/index.php\/category\/lisp\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":2315,"url":"https:\/\/www.rangakrish.com\/index.php\/2021\/02\/14\/litedb-a-nosql-database-for-net\/","url_meta":{"origin":1349,"position":4},"title":"LiteDB: A NoSQL Database for .NET","author":"admin","date":"February 14, 2021","format":false,"excerpt":"I have been looking around for a compact embedded NoSQL database library for .NET, to use as the back-end of my \"iLexicon\" system. \"iLexicon\" is written in Lisp and Prolog (I have written a few articles\u00a0on it before). At present, the entire dictionary component (containing over 300,000 word entries) is\u2026","rel":"","context":"In &quot;Programming&quot;","block_context":{"text":"Programming","link":"https:\/\/www.rangakrish.com\/index.php\/category\/programming\/"},"img":{"alt_text":"Using Package Manager to Install LiteDB","src":"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2021\/02\/Package-Manager-300x98.jpg?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2021\/02\/Package-Manager-300x98.jpg?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2021\/02\/Package-Manager-300x98.jpg?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":1410,"url":"https:\/\/www.rangakrish.com\/index.php\/2019\/01\/27\/generating-poetry-using-ilanggen\/","url_meta":{"origin":1349,"position":5},"title":"Generating Poetry Using iLangGen","author":"admin","date":"January 27, 2019","format":false,"excerpt":"In an earlier article, I wrote about using iLangGen to generate natural language text. iLangGen is a powerful text generation library that I have been working on over the years. Today, I would like to show how we can use that library to generate \"poetry\". Be warned, however, that the\u2026","rel":"","context":"In &quot;LISP&quot;","block_context":{"text":"LISP","link":"https:\/\/www.rangakrish.com\/index.php\/category\/lisp\/"},"img":{"alt_text":"Sample Output 2","src":"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2019\/01\/Output2.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\/1349","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=1349"}],"version-history":[{"count":0,"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/posts\/1349\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/media?parent=1349"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/categories?post=1349"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/tags?post=1349"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}