{"id":954,"date":"2017-12-08T15:38:49","date_gmt":"2017-12-08T20:38:49","guid":{"rendered":"http:\/\/haleyai.com\/wordpress\/?p=954"},"modified":"2018-09-09T10:53:58","modified_gmt":"2018-09-09T15:53:58","slug":"combinatorial-ambiguity-no-problem","status":"publish","type":"post","link":"http:\/\/haleyai.com\/wordpress\/2017\/12\/08\/combinatorial-ambiguity-no-problem\/","title":{"rendered":"Combinatorial ambiguity?  No problem!"},"content":{"rendered":"<p>Working on translating some legal documentations (sales and use tax laws and regulations) into compliance logic, we came across the following sentence (and many more that are even worse):<\/p>\n<ul>\n<li>Any transfer of title or possession, exchange, or barter, conditional or otherwise, in any manner or by any means whatsoever, of tangible personal property for a consideration.<\/li>\n<\/ul>\n<p>Natural language processing systems choke on sentences like this because of such sentences&#8217; combinatorial ambiguity and NLP&#8217;s typical lack of knowledge about what can be conjoined or complement or modify what.<\/p>\n<p>This sentences has many thousands of possible parses.\u00a0 They involve what the scopes of each of the the &#8216;or&#8217;s are and what is modified by conditional, otherwise, or whatsoever and what is complemented by in, by, of, and for.<\/p>\n<p>The following shows 2 parses remaining after we veto a number of mistakes and confirm some phrases from the 400 highest ranking parses (a few right or left clicks of the mouse):<\/p>\n<p><a href=\"http:\/\/haleyai.com\/wordpress\/wp-content\/uploads\/any-transfer-1-showing-all-correct-before-reparsing-with-2-parses-remaining.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-955\" title=\"any transfer 1 showing all correct before reparsing with 2 parses remaining\" src=\"http:\/\/haleyai.com\/wordpress\/wp-content\/uploads\/any-transfer-1-showing-all-correct-before-reparsing-with-2-parses-remaining.png\" alt=\"\" width=\"1292\" height=\"1326\" srcset=\"http:\/\/haleyai.com\/wordpress\/wp-content\/uploads\/any-transfer-1-showing-all-correct-before-reparsing-with-2-parses-remaining.png 1292w, http:\/\/haleyai.com\/wordpress\/wp-content\/uploads\/any-transfer-1-showing-all-correct-before-reparsing-with-2-parses-remaining-292x300.png 292w, http:\/\/haleyai.com\/wordpress\/wp-content\/uploads\/any-transfer-1-showing-all-correct-before-reparsing-with-2-parses-remaining-997x1024.png 997w\" sizes=\"auto, (max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px\" \/><\/a><\/p>\n<p><!--more-->After vetoing the selected parse (which leaves no viable parses from the top 400 ranking parses) we reparse with what we learned above.<\/p>\n<p>This gives us another 400 parses and we again veto and select correct parses (a few more right or left mouse clicks) until we get here:<\/p>\n<p><a href=\"http:\/\/haleyai.com\/wordpress\/wp-content\/uploads\/any-transfer-3-with-35-remaining-after-reparsing-and-selecting-correct-and-before-vetoing-selected.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-956\" title=\"any transfer 3 with 35 remaining after reparsing and selecting correct and before vetoing selected\" src=\"http:\/\/haleyai.com\/wordpress\/wp-content\/uploads\/any-transfer-3-with-35-remaining-after-reparsing-and-selecting-correct-and-before-vetoing-selected.png\" alt=\"\" width=\"1292\" height=\"1408\" srcset=\"http:\/\/haleyai.com\/wordpress\/wp-content\/uploads\/any-transfer-3-with-35-remaining-after-reparsing-and-selecting-correct-and-before-vetoing-selected.png 1292w, http:\/\/haleyai.com\/wordpress\/wp-content\/uploads\/any-transfer-3-with-35-remaining-after-reparsing-and-selecting-correct-and-before-vetoing-selected-275x300.png 275w, http:\/\/haleyai.com\/wordpress\/wp-content\/uploads\/any-transfer-3-with-35-remaining-after-reparsing-and-selecting-correct-and-before-vetoing-selected-939x1024.png 939w\" sizes=\"auto, (max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px\" \/><\/a><\/p>\n<p>After we reparse, we have another 400 top-ranked parses that satisfy the constraints accumulated from prior clicks of the mouse.<\/p>\n<p>After we veto the above selection and continue selecting correct parts and vetoing incorrect parts we find there are 66 syntactically equivalent parses, as shown here:<\/p>\n<p><a href=\"http:\/\/haleyai.com\/wordpress\/wp-content\/uploads\/any-transfer-4-with-66-remaining-after-reparsing-and-vetoing-previously-selected-and-selecting-all-correct.png\"><img class=\"alignnone size-full wp-image-957\" title=\"any transfer 4 with 66 remaining after reparsing and vetoing previously selected=\" alt=\"\" width=\"1292\" height=\"1408\" \/><\/a><\/p>\n<p>The remaining ambiguity come from some lexical ambiguity (e.g., what &#8216;means&#8217; means) and semantic ambiguity, all of which can be resolved using the Linguist.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Working on translating some legal documentations (sales and use tax laws and regulations) into compliance logic, we came across the following sentence (and many more that are even worse): Any transfer of title or possession, exchange, or barter, conditional or otherwise, in any manner or by any means whatsoever, of tangible personal property for a &hellip; <\/p>\n<p class=\"link-more\"><a href=\"http:\/\/haleyai.com\/wordpress\/2017\/12\/08\/combinatorial-ambiguity-no-problem\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Combinatorial ambiguity?  No problem!&#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],"tags":[86,550,527,214,743,744],"class_list":["post-954","post","type-post","status-publish","format-standard","hentry","category-natural-language","tag-compliance","tag-disambiguation","tag-linguist","tag-nlp","tag-parsing","tag-sales-and-use-tax"],"_links":{"self":[{"href":"http:\/\/haleyai.com\/wordpress\/wp-json\/wp\/v2\/posts\/954","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=954"}],"version-history":[{"count":4,"href":"http:\/\/haleyai.com\/wordpress\/wp-json\/wp\/v2\/posts\/954\/revisions"}],"predecessor-version":[{"id":960,"href":"http:\/\/haleyai.com\/wordpress\/wp-json\/wp\/v2\/posts\/954\/revisions\/960"}],"wp:attachment":[{"href":"http:\/\/haleyai.com\/wordpress\/wp-json\/wp\/v2\/media?parent=954"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/haleyai.com\/wordpress\/wp-json\/wp\/v2\/categories?post=954"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/haleyai.com\/wordpress\/wp-json\/wp\/v2\/tags?post=954"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}