{"id":999,"date":"2018-01-05T16:30:01","date_gmt":"2018-01-05T21:30:01","guid":{"rendered":"http:\/\/haleyai.com\/wordpress\/?p=999"},"modified":"2018-07-26T09:22:56","modified_gmt":"2018-07-26T14:22:56","slug":"tanlp-its-a-jungle-out-there","status":"publish","type":"post","link":"http:\/\/haleyai.com\/wordpress\/2018\/01\/05\/tanlp-its-a-jungle-out-there\/","title":{"rendered":"TA\/NLP: It&#8217;s a jungle out there!"},"content":{"rendered":"<p>Text analytics and natural language processing have made tremendous advances in the last few years.\u00a0 Unfortunately, there is a lot more to understanding natural language that TA\/NLP.<\/p>\n<p><a href=\"http:\/\/haleyai.com\/wordpress\/wp-content\/uploads\/NLP_pipeline_example.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1010\" title=\"NLP_pipeline_example\" src=\"http:\/\/haleyai.com\/wordpress\/wp-content\/uploads\/NLP_pipeline_example.png\" alt=\"\" width=\"1158\" height=\"279\" srcset=\"http:\/\/haleyai.com\/wordpress\/wp-content\/uploads\/NLP_pipeline_example.png 1158w, http:\/\/haleyai.com\/wordpress\/wp-content\/uploads\/NLP_pipeline_example-300x72.png 300w, http:\/\/haleyai.com\/wordpress\/wp-content\/uploads\/NLP_pipeline_example-1024x246.png 1024w\" sizes=\"auto, (max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px\" \/><\/a><\/p>\n<p>I was reading a <a href=\"https:\/\/www.researchgate.net\/profile\/Kuldeep_Singh86\/publication\/322057242_Why_Reinvent_the_Wheel-Let%27s_Build_Question_Answering_Systems_Together\/links\/5a42397f458515f6b04e4100\/Why-Reinvent-the-Wheel-Lets-Build-Question-Answering-Systems-Together.pdf\" target=\"_blank\">paper <\/a>today about NLP pipelines for question answering that used machine learning to find what tools are good at what tasks and to configure a pipeline by selecting the best tool for a given task from each of the types of components in the pipeline.\u00a0 The paper has a long list of various components, so I checked a few out.\u00a0 Most of those of interest were available on the web so that they could be easily composed into pipelines without a lot of software setup.\u00a0 Looking at these I quickly tired in disappointment.\u00a0 Here are some of the reasons.<\/p>\n<p>I am not surprised by these results.\u00a0 NLU is hard.\u00a0 But they are not particularly strong results either.\u00a0 I&#8217;m surprised that people find such results useful (if they do).<\/p>\n<p><!--more-->I know that Cal. App. is an organization (i.e., California Court of Appeal), but I&#8217;m not surprised this system missed it, but perhaps it should have identified California?<\/p>\n<p>I understand that the People can be confusing, especially at the beginning of a sentence, but a knowledgeable or learned system would have recognized People as referring to persons (the public) or an organization (e.g., a government).<\/p>\n<p>Similarly, a knowledge or learned system would recognize this as a reference to a legal case and perhaps classified it with regard to organization, place, and event.<\/p>\n<p><a href=\"http:\/\/haleyai.com\/wordpress\/wp-content\/uploads\/entity_detection_case.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1000\" title=\"entity_detection_case\" src=\"http:\/\/haleyai.com\/wordpress\/wp-content\/uploads\/entity_detection_case.png\" alt=\"\" width=\"946\" height=\"129\" srcset=\"http:\/\/haleyai.com\/wordpress\/wp-content\/uploads\/entity_detection_case.png 946w, http:\/\/haleyai.com\/wordpress\/wp-content\/uploads\/entity_detection_case-300x40.png 300w\" sizes=\"auto, (max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px\" \/><\/a><\/p>\n<p>I guess I can understand why this system doesn&#8217;t bother identifying single words as concepts.\u00a0 But I don&#8217;t really understand how &#8220;oil well&#8221; is a concept but not &#8220;oil well driller&#8221; or &#8220;rock bit&#8221; or even &#8220;effective life&#8221;.\u00a0 It&#8217;s important to understand that &#8220;transfer of title&#8221; is a concept or event here, too. (Perhaps it should even classify &#8216;(a) of this section&#8217; as referring to a work.)<\/p>\n<p><a href=\"http:\/\/haleyai.com\/wordpress\/wp-content\/uploads\/entity_detection_finding.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1001\" title=\"entity_detection_finding\" src=\"http:\/\/haleyai.com\/wordpress\/wp-content\/uploads\/entity_detection_finding.png\" alt=\"\" width=\"938\" height=\"184\" srcset=\"http:\/\/haleyai.com\/wordpress\/wp-content\/uploads\/entity_detection_finding.png 938w, http:\/\/haleyai.com\/wordpress\/wp-content\/uploads\/entity_detection_finding-300x58.png 300w\" sizes=\"auto, (max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px\" \/><\/a><\/p>\n<p>It&#8217;s pretty clear that a company is an organization, not just a concept, so I&#8217;m a little surprised by these errors.\u00a0 It missed section 6352 as a work (as above), so this system would not be very good for legal or contract purposes.<\/p>\n<p>The mistake on &#8220;private&#8221; is interesting, especially that it did not identify &#8220;private individuals&#8221; as either a concept or as persons.<\/p>\n<p><a href=\"http:\/\/haleyai.com\/wordpress\/wp-content\/uploads\/entity_detection_conclusion.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1002\" title=\"entity_detection_conclusion\" src=\"http:\/\/haleyai.com\/wordpress\/wp-content\/uploads\/entity_detection_conclusion.png\" alt=\"\" width=\"938\" height=\"188\" srcset=\"http:\/\/haleyai.com\/wordpress\/wp-content\/uploads\/entity_detection_conclusion.png 938w, http:\/\/haleyai.com\/wordpress\/wp-content\/uploads\/entity_detection_conclusion-300x60.png 300w\" sizes=\"auto, (max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px\" \/><\/a><\/p>\n<p>In real life, text is not always pretty.\u00a0 This is real life. The prior examples are verbatim from the California Sales and Use Tax Law &amp; Regulations.<\/p>\n<p>The following text occurs in the body of a medical test prep exam from one of our clients.\u00a0 Note that it misses lots of people here.\u00a0 It&#8217;s also almost completely arbitrary about what it classifies as a concept.\u00a0 It&#8217;s particularly odd that it classifies an adjective as a concept when the concept should be &#8220;clinical features&#8221;.\u00a0 It misses &#8220;Pancreas&#8221; (twice) and &#8220;Blumgart&#8217;s Surgery&#8221; as referring to a person or organization and being a concept specializing &#8220;surgery&#8221;.\u00a0 It also misses that various parts f this are references to works.\u00a0 And it misses that 2010 and 2012 are references to years (events).<\/p>\n<p><a href=\"http:\/\/haleyai.com\/wordpress\/wp-content\/uploads\/entity_detection_reference.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1003\" title=\"entity_detection_reference\" src=\"http:\/\/haleyai.com\/wordpress\/wp-content\/uploads\/entity_detection_reference.png\" alt=\"\" width=\"936\" height=\"242\" srcset=\"http:\/\/haleyai.com\/wordpress\/wp-content\/uploads\/entity_detection_reference.png 936w, http:\/\/haleyai.com\/wordpress\/wp-content\/uploads\/entity_detection_reference-300x77.png 300w\" sizes=\"auto, (max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px\" \/><\/a><\/p>\n<p>The following may be fine, but how do you use it? How do those modifiers of 23 and year-old relate to each other? Isn&#8217;t she the subject of the telling??\u00a0 That&#8217;s enough for me.<\/p>\n<p><a href=\"http:\/\/haleyai.com\/wordpress\/wp-content\/uploads\/NLP_presentation.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1004\" title=\"NLP_presentation\" src=\"http:\/\/haleyai.com\/wordpress\/wp-content\/uploads\/NLP_presentation.png\" alt=\"\" width=\"1262\" height=\"585\" srcset=\"http:\/\/haleyai.com\/wordpress\/wp-content\/uploads\/NLP_presentation.png 1262w, http:\/\/haleyai.com\/wordpress\/wp-content\/uploads\/NLP_presentation-300x139.png 300w, http:\/\/haleyai.com\/wordpress\/wp-content\/uploads\/NLP_presentation-1024x474.png 1024w\" sizes=\"auto, (max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px\" \/><\/a><\/p>\n<p>The following is a little difficult to &#8220;parse&#8221;, especially the first row.\u00a0 I don&#8217;t get the &#8216;that&#8217; as the subject nor &#8216;her be&#8217; as the object of several of these. (And I wonder, what is &#8216;it&#8217; as a predicate?)<\/p>\n<p>I expect activities to be the subject of &#8216;require&#8217; and the objective of &#8216;participates&#8217;.\u00a0 I expect her to be the subject of &#8216;participates&#8217; and (part of) the object of &#8216;requires&#8217;.<\/p>\n<p><a href=\"http:\/\/haleyai.com\/wordpress\/wp-content\/uploads\/NLP_conclusion.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1005\" title=\"NLP_conclusion\" src=\"http:\/\/haleyai.com\/wordpress\/wp-content\/uploads\/NLP_conclusion.png\" alt=\"\" width=\"1609\" height=\"373\" srcset=\"http:\/\/haleyai.com\/wordpress\/wp-content\/uploads\/NLP_conclusion.png 1609w, http:\/\/haleyai.com\/wordpress\/wp-content\/uploads\/NLP_conclusion-300x69.png 300w, http:\/\/haleyai.com\/wordpress\/wp-content\/uploads\/NLP_conclusion-1023x237.png 1023w\" sizes=\"auto, (max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px\" \/><\/a><\/p>\n<p>In the &#8220;you get what you pay for&#8221; category, here are some results from Amazon&#8217;s Comprehend service.\u00a0 I like that it got the section as an entity and I don&#8217;t fault it for perceiving some negative sentiment here (except as follows).<\/p>\n<p>To the extent such things (like Amazon) do well with the smallest noun phrases, they could also do some prepositional phrases, which would be nice, but they are far from understanding what phrases complement (i.e., other phrases or clauses).<\/p>\n<p>I would be more impressed if it noted the more interesting phrases here, such as &#8216;collect or pay&#8217; or &#8216;collect or pay a use tax&#8217; or &#8216;duty to collect or pay a use tax&#8217;.\u00a0 On the other hand, it takes a knowledge or very learned system to do that.<\/p>\n<p>And even more impressed if it recognized (with useful confidence) that its the company being relieved from a duty that is negated (without negative sentiment).<\/p>\n<p><a href=\"http:\/\/haleyai.com\/wordpress\/wp-content\/uploads\/TA_finding.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1007\" title=\"TA_finding\" src=\"http:\/\/haleyai.com\/wordpress\/wp-content\/uploads\/TA_finding.png\" alt=\"\" width=\"892\" height=\"1197\" srcset=\"http:\/\/haleyai.com\/wordpress\/wp-content\/uploads\/TA_finding.png 892w, http:\/\/haleyai.com\/wordpress\/wp-content\/uploads\/TA_finding-223x300.png 223w, http:\/\/haleyai.com\/wordpress\/wp-content\/uploads\/TA_finding-763x1024.png 763w\" sizes=\"auto, (max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Text analytics and natural language processing have made tremendous advances in the last few years.\u00a0 Unfortunately, there is a lot more to understanding natural language that TA\/NLP. I was reading a paper today about NLP pipelines for question answering that used machine learning to find what tools are good at what tasks and to configure &hellip; <\/p>\n<p class=\"link-more\"><a href=\"http:\/\/haleyai.com\/wordpress\/2018\/01\/05\/tanlp-its-a-jungle-out-there\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;TA\/NLP: It&#8217;s a jungle out there!&#8221;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16,243],"tags":[753,757,755,492,756,214,754],"class_list":["post-999","post","type-post","status-publish","format-standard","hentry","category-natural-language","category-question-answering","tag-amazon-comprehend","tag-entity-detection","tag-named-entity-recognition","tag-natural-language-process","tag-ner","tag-nlp","tag-text-analytics"],"_links":{"self":[{"href":"http:\/\/haleyai.com\/wordpress\/wp-json\/wp\/v2\/posts\/999","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/haleyai.com\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/haleyai.com\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/haleyai.com\/wordpress\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/haleyai.com\/wordpress\/wp-json\/wp\/v2\/comments?post=999"}],"version-history":[{"count":13,"href":"http:\/\/haleyai.com\/wordpress\/wp-json\/wp\/v2\/posts\/999\/revisions"}],"predecessor-version":[{"id":1544,"href":"http:\/\/haleyai.com\/wordpress\/wp-json\/wp\/v2\/posts\/999\/revisions\/1544"}],"wp:attachment":[{"href":"http:\/\/haleyai.com\/wordpress\/wp-json\/wp\/v2\/media?parent=999"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/haleyai.com\/wordpress\/wp-json\/wp\/v2\/categories?post=999"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/haleyai.com\/wordpress\/wp-json\/wp\/v2\/tags?post=999"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}