{"id":38591,"date":"2016-07-29T15:34:31","date_gmt":"2016-07-29T10:04:31","guid":{"rendered":"http:\/\/www.tothenew.com\/blog\/?p=38591"},"modified":"2022-01-13T14:35:48","modified_gmt":"2022-01-13T09:05:48","slug":"natural-language-processing","status":"publish","type":"post","link":"https:\/\/www.tothenew.com\/blog\/natural-language-processing\/","title":{"rendered":"Natural Language Processing"},"content":{"rendered":"<p>NLP is the branch of computer science, focused on developing systems that allow computers to communicate with people using everyday language.<\/p>\n<p>NLP is where computers attempt to derive meaning from human or natural input. we\u2019ve seen huge strides in the last few years. There is several huge projects developed on it like\u00a0<a href=\"https:\/\/en.wikipedia.org\/wiki\/CALO\"><strong>CALO<\/strong><\/a>\u00a0and\u00a0<strong><a href=\"https:\/\/wordnet.princeton.edu\/\">Wordnet<\/a>.<\/strong>\u00a0<strong>Stanford\u2019s CoreNLP<\/strong> (demo here) and<strong> Apache OpenNLP (for NodeJs its Wrapper is <a href=\"https:\/\/github.com\/mbejda\/Node-OpenNLP\">Nope OpenNLP<\/a>)<\/strong>\u00a0are strong NLP solutions available today.<\/p>\n<p><strong>General Principles of NLP:<\/strong><\/p>\n<ol>\n<li>NLP is a model rather then a theory, It is related to subjective experience.<\/li>\n<li>NLP is a generative rather than a repair model, It provides useful solution instead of causes. NLP gives us so many choices.<\/li>\n<li>All human behavior has a structure If one human can do something then, potentially it is possible for almost everyone.<\/li>\n<li>The Capacity of Conscious \u00a0mind is very limited \u2013 For example around 5-9 chunks of information.<\/li>\n<\/ol>\n<p class=\"western\"><strong><span style=\"font-size: large;\">Statistical NLP:<\/span><\/strong><\/p>\n<p class=\"western\">The technology for statistical NLP comes mainly from machine learning and data mining, both of which are fields of artificial intelligence that involve learning from data.<\/p>\n<p class=\"western\"><em>Applications where Natural Language Processing is used:<\/em><\/p>\n<ul>\n<li class=\"western\">Apple Siri<\/li>\n<li class=\"western\">Google Voice<\/li>\n<li class=\"western\">Microsoft Cortana<\/li>\n<\/ul>\n<p><em>Natural Language Search:<\/em><\/p>\n<ul>\n<li>Google<\/li>\n<li>Bing<\/li>\n<\/ul>\n<p><strong>Challenges with natural language processing:<\/strong><\/p>\n<p>The major challenges we are facing with NLP is Ambiguity. These ambiguity comes from the following types of sentences:<\/p>\n<ul>\n<li>Long sentences<\/li>\n<li>Words with multiple definitions<\/li>\n<\/ul>\n<p class=\"western\"><strong><span style=\"font-size: large;\">Syntactic Tree:<\/span><\/strong><\/p>\n<p class=\"western\">It is also known as parse tree and its ordered rooted tree.<\/p>\n<p class=\"western\">The parse tree breaks down the sentence into structured parts so that the computer can easily understand and process it.<\/p>\n<p class=\"western\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-38601\" src=\"\/blog\/wp-ttn-blog\/uploads\/2016\/07\/parsetree.jpg\" alt=\"parsetree\" width=\"145\" height=\"169\" \/><\/p>\n<p class=\"western\">The above is the example of parse tree.<\/p>\n<p class=\"western\"><strong>NLP in Javascript:<\/strong><\/p>\n<p class=\"western\">There are several javascript libraries which help to achieve the NLP goal. Here I have used a small JS library \u201cNLP Compromise\u201d. This library helps to achieve some of the basic NLP features.\u00a0For Example: In the above example <em>\u201cJohn hit the ball\u201d<\/em>, we want to parse and get the Name of the person.<\/p>\n<p class=\"western\"><code>var person = nlp.text(\u201cJohn hit the ball\u201d).people();<br \/>\nconsole.log( \u201cName of the person is:\u201d, person) \/\/ john<\/code><\/p>\n<p class=\"western\">This is a small application based on the same library where you can give a try.\u00a0http:\/\/kmtabish.com\/articles\/NLP\/<\/p>\n","protected":false},"excerpt":{"rendered":"<p>NLP is the branch of computer science, focused on developing systems that allow computers to communicate with people using everyday language. NLP is where computers attempt to derive meaning from human or natural input. we\u2019ve seen huge strides in the last few years. There is several huge projects developed on it like\u00a0CALO\u00a0and\u00a0Wordnet.\u00a0Stanford\u2019s CoreNLP (demo here) [&hellip;]<\/p>\n","protected":false},"author":1250,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"iawp_total_views":1},"categories":[1185,1],"tags":[],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/38591"}],"collection":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/users\/1250"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/comments?post=38591"}],"version-history":[{"count":1,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/38591\/revisions"}],"predecessor-version":[{"id":54650,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/38591\/revisions\/54650"}],"wp:attachment":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/media?parent=38591"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/categories?post=38591"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/tags?post=38591"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}