{"id":479,"date":"2016-11-17T15:15:37","date_gmt":"2016-11-17T15:15:37","guid":{"rendered":"http:\/\/muthu.co\/?p=479"},"modified":"2021-01-02T14:05:34","modified_gmt":"2021-01-02T14:05:34","slug":"finally-some-success-after-an-year-of-research-in-trying-to-teach-a-computer-how-to-understand-a-question-like-a-human","status":"publish","type":"post","link":"http:\/\/write.muthu.co\/finally-some-success-after-an-year-of-research-in-trying-to-teach-a-computer-how-to-understand-a-question-like-a-human\/","title":{"rendered":"Finally some success after an year of research in trying to teach a computer how to understand a question like a human."},"content":{"rendered":"

Like I always believed, there is a way to represent each and every natural language sentence using\u00a0mathematical notations. Its been an year since I have been playing around with various AI algorithms and after countless failed attempts today I made\u00a0some progress.<\/p>\n

A\u00a0sentence can be divided into three parts as explained in\u00a0Subject-Verb-Object.<\/a>\u00a0So a good AI who can understand a user must be able to parse a sentence or a question into these three categories.<\/p>\n

This is what I discovered:<\/p>\n

    \n
  1. Identify the types of words that does not have any ambiguous meaning ex: in, for, but, what, why , the, an etc.<\/code><\/li>\n
  2. Replace the remaining words or nouns in the sentence with\u00a0'\u03b1', '\u03b2', '\u03b3', '\u03b4', '\u03b5', '\u03b6', '\u03b7', '\u03b8' and so on \u00a0as they appear in a\u00a0sentence.<\/code><\/li>\n
  3. Remove all determinants like The, An, A\u00a0<\/code><\/li>\n
  4. Replace some of the identified keywords with mathematical notations. ex: of<\/code> becomes\u00a0\u00a0\u2208 (I am yet to identify notations for the rest of the keywords)<\/li>\n
  5. Replace all verbs (action words) with\u00a0\u00a0\u0394<\/li>\n
  6. When you run this algorithm, all samples of sentences show a similar pattern and just be replacing the variables you can identify the object, subject and verbs.<\/li>\n<\/ol>\n

    Examples:<\/p>\n

    Question: What Polynesian people inhabit New Zealand ?\r\n\r\nThe above question after running through the code becomes\r\n\r\n{\r\n        \"symbol\": \"What \u03b1  \u0394  \u03b2\",\r\n        \"sentence\": \"What Polynesian people inhabit New Zealand ?\",\r\n        \"processed\": \" What \u03b1  inhabit \u03b2 \",\r\n        \"qtype\": \"what\",\r\n        \"\u03b1\": \"Polynesian people\",\r\n        \"\u03b2\": \"New Zealand\"\r\n}\r\n<\/pre>\n

    As you can see in the output above, our question What Polynesian people inhabit New Zealand<\/code>\u00a0can be represented symbolically as\u00a0What \u03b1 \u0394 \u03b2\u00a0<\/code><\/p>\n

    The equations of type\u00a0\u03b1 \u0394 \u03b2<\/code> implies \u03b1 (subject),\u00a0\u0394 (verb),\u00a0\u03b2 (object)<\/code>. So a smart bot needs to look up for\u00a0New Zealand and search for the words “Polynesian people” and “inhabit”.<\/p>\n

    Few more sample outputs:<\/p>\n

    [\r\n  {\r\n    \"symbol\": \"What \u03b1  \u0394  \u03b2\",\r\n    \"sentence\": \"What actor first portrayed James Bond ?\",\r\n    \"processed\": \" What \u03b1  portrayed \u03b2 \",\r\n    \"qtype\": \"what\",\r\n    \"\u03b1\": \"actor first\",\r\n    \"\u03b2\": \"James Bond ?\"\r\n  },\r\n  {\r\n    \"symbol\": \"What \u03b1  \u0394  \u03b2\",\r\n    \"sentence\": \"What Soviet leader owned a Rolls-Royce ?\",\r\n    \"processed\": \" What \u03b1  owned \u03b2 \",\r\n    \"qtype\": \"what\",\r\n    \"\u03b1\": \"Soviet leader\",\r\n    \"\u03b2\": \"Rolls-Royce ?\"\r\n  },\r\n  {\r\n    \"symbol\": \"What \u03b1  \u0394  \u03b2\",\r\n    \"sentence\": \"What crop failure caused the Irish Famine ?\",\r\n    \"processed\": \" What \u03b1  caused \u03b2 \",\r\n    \"qtype\": \"what\",\r\n    \"\u03b1\": \"crop failure\",\r\n    \"\u03b2\": \"Irish Famine ?\"\r\n  },\r\n  {\r\n    \"symbol\": \"What \u03b1  \u0394  \u03b2\",\r\n    \"sentence\": \"What country 's people are the top television watchers ?\",\r\n    \"processed\": \" What \u03b1  are \u03b2 \",\r\n    \"qtype\": \"what\",\r\n    \"\u03b1\": \"country ' s people\",\r\n    \"\u03b2\": \"top television watchers ?\"\r\n  },\r\n  {\r\n    \"symbol\": \"Which \u03b1  \u0394  \u03b2\",\r\n    \"sentence\": \"Which NBA players had jersey number 0 ?\",\r\n    \"processed\": \" Which \u03b1  had \u03b2 \",\r\n    \"qtype\": \"which\",\r\n    \"\u03b1\": \"NBA players\",\r\n    \"\u03b2\": \"jersey number 0 ?\"\r\n  },\r\n  {\r\n    \"symbol\": \"Which \u03b1  \u0394  \u03b2\",\r\n    \"sentence\": \"Which country did Hitler rule ?\",\r\n    \"processed\": \" Which \u03b1  did \u03b2 \",\r\n    \"qtype\": \"which\",\r\n    \"\u03b1\": \"country\",\r\n    \"\u03b2\": \"Hitler rule ?\"\r\n  },\r\n  {\r\n    \"symbol\": \"Which \u03b1  \u0394  \u03b2\",\r\n    \"sentence\": \"Which language has the most words ?\",\r\n    \"processed\": \" Which \u03b1  has \u03b2 \",\r\n    \"qtype\": \"which\",\r\n    \"\u03b1\": \"language\",\r\n    \"\u03b2\": \"most words ?\"\r\n  }\r\n]<\/pre>\n

     <\/p>\n

    There are some sample outputs which are of type:\u00a0\u03b1 \u0394 \u03b2 in \u03b3<\/code><\/p>\n

    {\r\n        \"symbol\": \"Which \u03b1  \u0394  \u03b2 in \u03b3\",\r\n        \"sentence\": \"Which Ventura County police department seized the largest cocaine shipment in it 's history ?\",\r\n        \"processed\": \" Which \u03b1  seized \u03b2  in \u03b3 \",\r\n        \"qtype\": \"which\",\r\n        \"\u03b1\": \"Ventura County police department\",\r\n        \"\u03b2\": \"largest cocaine shipment\",\r\n        \"\u03b3\": \"it ' s history ?\"\r\n },\r\n{\r\n        \"symbol\": \"Which \u03b1  \u0394  \u03b2 in \u03b3\",\r\n        \"sentence\": \"Which cats pursued Tweety Pie in his first cartoon appearance ?\",\r\n        \"processed\": \" Which \u03b1  pursued \u03b2  in \u03b3 \",\r\n        \"qtype\": \"which\",\r\n        \"\u03b1\": \"cats\",\r\n        \"\u03b2\": \"Tweety Pie\",\r\n        \"\u03b3\": \"his first cartoon appearance ?\"\r\n },\r\n {\r\n        \"symbol\": \"Which \u03b1  \u0394  \u03b2 in \u03b3\",\r\n        \"sentence\": \"Which team won the Super Bowl in 1968 ?\",\r\n        \"processed\": \" Which \u03b1  won \u03b2  in \u03b3 \",\r\n        \"qtype\": \"which\",\r\n        \"\u03b1\": \"team\",\r\n        \"\u03b2\": \"Super Bowl\",\r\n        \"\u03b3\": \"1968 ?\"\r\n}<\/pre>\n

    The formula still works but has an extra parameter \u03b3<\/code>\u00a0which gives more meaning to our object.<\/em><\/p>\n

    After running my program on more than 5000 questions, I have around 100 different equations. While most of them fall into the above 3 types but there are few much longer like\u00a0\u03b1 \u0394 \u03b2 as \u03b3 with \u03b4<\/code> and \u03b1 \u2208 \u03b2 in which \u03b3 is \u0394 without \u03b4<\/code> which I am yet to equate to SVO. <\/p>\n","protected":false},"excerpt":{"rendered":"

    Like I always believed, there is a way to represent each and every natural language sentence using\u00a0mathematical notations. Its been an year since I have been playing around with various AI algorithms and after countless failed attempts today I made\u00a0some progress. A\u00a0sentence can be divided into three parts as explained in\u00a0Subject-Verb-Object.\u00a0So a good AI who […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[24,19],"tags":[50,46],"_links":{"self":[{"href":"http:\/\/write.muthu.co\/wp-json\/wp\/v2\/posts\/479"}],"collection":[{"href":"http:\/\/write.muthu.co\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/write.muthu.co\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/write.muthu.co\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/write.muthu.co\/wp-json\/wp\/v2\/comments?post=479"}],"version-history":[{"count":1,"href":"http:\/\/write.muthu.co\/wp-json\/wp\/v2\/posts\/479\/revisions"}],"predecessor-version":[{"id":1621,"href":"http:\/\/write.muthu.co\/wp-json\/wp\/v2\/posts\/479\/revisions\/1621"}],"wp:attachment":[{"href":"http:\/\/write.muthu.co\/wp-json\/wp\/v2\/media?parent=479"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/write.muthu.co\/wp-json\/wp\/v2\/categories?post=479"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/write.muthu.co\/wp-json\/wp\/v2\/tags?post=479"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}