{"id":623,"date":"2015-01-09T21:10:41","date_gmt":"2015-01-09T16:10:41","guid":{"rendered":"http:\/\/blogs.nd.edu\/emorgan\/?p=623"},"modified":"2015-01-09T21:10:41","modified_gmt":"2015-01-09T16:10:41","slug":"distance","status":"publish","type":"post","link":"https:\/\/sites.nd.edu\/emorgan\/2015\/01\/distance\/","title":{"rendered":"distance.cgi &#8211; My first Python-based CGI script"},"content":{"rendered":"<p>\nYesterday I finished writing my first Python-based CGI script &#8212; <a href=\"http:\/\/ntrda.me\/1BFw5Ao\">distance.cgi<\/a>. Given two words, it allows the reader to first disambiguate between various definitions of the words, and second, uses Wordnet&#8217;s network to display various relationships (distances) between the resulting &#8220;synsets&#8221;. (<a href=\"http:\/\/dh.crc.nd.edu\/sandbox\/text-analysis-workshop\/bin\/distance.py\">Source code is here.<\/a>)\n<\/p>\n<p style='text-align: center'>\nReader input<br \/>\n<img decoding=\"async\" src=\"http:\/\/blogs.nd.edu\/emorgan\/files\/2015\/01\/input.jpg\" \/>\n<\/p>\n<p style='text-align: center'>\nDisambiguate<br \/>\n<img decoding=\"async\" src=\"http:\/\/blogs.nd.edu\/emorgan\/files\/2015\/01\/disambiguate.jpg\" \/>\n<\/p>\n<p style='text-align: center'>\nDisplay result<br \/>\n<img decoding=\"async\" src=\"http:\/\/blogs.nd.edu\/emorgan\/files\/2015\/01\/result.jpg\" \/>\n<\/p>\n<p>\nThe script relies on Python&#8217;s Natural Language Toolkit (<a href=\"http:\/\/www.nltk.org\">NLTK<\/a>) which provides an enormous amount of functionality when it comes to natural language processing. I&#8217;m impressed. On the other hand, the script is not zippy, and I am not sure how performance can be improved. Any hints?<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Yesterday I finished writing my first Python-based CGI script &#8212; distance.cgi. Given two words, it allows the reader to first disambiguate between various definitions of the words, and second, uses Wordnet&#8217;s network to display various relationships (distances) between the resulting &#8220;synsets&#8221;. (Source code is here.) Reader input Disambiguate Display result The script relies on Python&#8217;s [&hellip;]<\/p>\n","protected":false},"author":92,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-623","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/sites.nd.edu\/emorgan\/wp-json\/wp\/v2\/posts\/623","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sites.nd.edu\/emorgan\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sites.nd.edu\/emorgan\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sites.nd.edu\/emorgan\/wp-json\/wp\/v2\/users\/92"}],"replies":[{"embeddable":true,"href":"https:\/\/sites.nd.edu\/emorgan\/wp-json\/wp\/v2\/comments?post=623"}],"version-history":[{"count":4,"href":"https:\/\/sites.nd.edu\/emorgan\/wp-json\/wp\/v2\/posts\/623\/revisions"}],"predecessor-version":[{"id":630,"href":"https:\/\/sites.nd.edu\/emorgan\/wp-json\/wp\/v2\/posts\/623\/revisions\/630"}],"wp:attachment":[{"href":"https:\/\/sites.nd.edu\/emorgan\/wp-json\/wp\/v2\/media?parent=623"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sites.nd.edu\/emorgan\/wp-json\/wp\/v2\/categories?post=623"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sites.nd.edu\/emorgan\/wp-json\/wp\/v2\/tags?post=623"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}