{"id":781,"date":"2009-12-22T22:53:10","date_gmt":"2009-12-23T03:53:10","guid":{"rendered":"http:\/\/itp.indiamos.com\/blog\/?p=781"},"modified":"2009-12-22T23:02:18","modified_gmt":"2009-12-23T04:02:18","slug":"whats-up-with-the-booknik","status":"publish","type":"post","link":"https:\/\/itp.indiamos.com\/blog\/2009\/12\/22\/whats-up-with-the-booknik\/","title":{"rendered":"What&#8217;s up with the Booknik?"},"content":{"rendered":"<p><a href=\"http:\/\/itp.nyu.edu\/~ia303\/Booknik\/author\/51\"><img loading=\"lazy\" src=\"https:\/\/i2.wp.com\/itp.indiamos.com\/blog\/wp-content\/uploads\/2009\/12\/Fleming_chart.png?resize=474%2C372\" alt=\"\" title=\"Ian Fleming word-count chart\" width=\"474\" height=\"372\" class=\"alignnone size-full wp-image-782\" srcset=\"https:\/\/i2.wp.com\/itp.indiamos.com\/blog\/wp-content\/uploads\/2009\/12\/Fleming_chart.png?w=510&amp;ssl=1 510w, https:\/\/i2.wp.com\/itp.indiamos.com\/blog\/wp-content\/uploads\/2009\/12\/Fleming_chart.png?w=400&amp;ssl=1 400w\" sizes=\"(max-width: 474px) 100vw, 474px\" data-recalc-dims=\"1\" \/><\/a><\/p>\n<p>I have been wrestling with the <a href=\"http:\/\/code.google.com\/apis\/chart\/\">Google Chart API<\/a> for days, <em>trying<\/em> to get it to show me a line chart with two freaking lines, but clearly there&#8217;s something I&#8217;m missing. In the meantime, though, a reasonable portion of Booknik is working, so you can <a href=\"http:\/\/itp.nyu.edu\/~ia303\/Booknik\/\">go poke at that<\/a>.<br \/>\n<!--more--><br \/>\nThe broken chart is the one on the author detail page, and the image above shows what it&#8217;s currently spewing out. And if it weren&#8217;t for <a href=\"http:\/\/www.clabberhead.com\/googlechartgenerator.html\">James B. Allen&#8217;s handy Google Chart GUI<\/a>, I wouldn&#8217;t even have that (Allen&#8217;s tool generates a beautiful chart, but from hard-coded data; it&#8217;s my dynamic conversion that&#8217;s busted). I really want to get that chart working, so that I can view each author&#8217;s vocabulary usage over the course of his or career. (You can see <a href=\"http:\/\/itp.nyu.edu\/~ia303\/Booknik\/author\/51\">the raw numbers<\/a> now, but those aren&#8217;t particularly glamorous.) I&#8217;m especially interested in Agatha Christie, since (a) she and Ian Fleming are the authors for whom I have the most books in the system (nine each), and (b) there&#8217;s <a href=\"http:\/\/www.nytimes.com\/projects\/magazine\/ideas\/2009\/#l-1.html\" title=\"'Literary Alzheimer's' by Amanda Fortini, New York Times Magazine, 12\/12\/09\">a <em>real<\/em> research study of her work<\/a> being done at the University of Toronto,<sup><a href=\"#note1\">1<\/a><\/sup> and I&#8217;d like to see if the results of my relatively low-tech analysis correlate with theirs.<sup><a href=\"#note2\">2<\/a><\/sup><\/p>\n<p>There&#8217;s more not yet done than done on Booknik, but right now I think the most interesting part is the book detail page (see, for instance, <a href=\"http:\/\/itp.nyu.edu\/~ia303\/Booknik\/book\/68\"><cite>Casino Royale<\/cite><\/a>), which shows a list of all the distinct words the book contains (or, rather, the first fifty words the query returns; I haven&#8217;t yet put in any pagination links), as well as a list of all the words that are unique to that book when compared with the other ninety-odd books in the Booknik database. The lists are sortable alphabetically or by frequency, and when one does the latter, one sees that although most of the unique words are proper names (or typos), there are some everyday words in there, as well. Some of them are mildly surprising. You can then click on any of those words and see a detail page that includes, among many other things, a graph of the frequency of that word&#8217;s occurrence in <a href=\"http:\/\/www.wordnik.com\/\">Wordnik<\/a>&#8216;s corpus. Ultimately I&#8217;d like to chart frequency counts from my own database side by side with Wordnik&#8217;s\u2014and maybe somehow work in the <a href=\"http:\/\/code.google.com\/apis\/books\/\">Google Book Search<\/a> results, too\u2014but given my difficulties in comprehending Google Chartese, I&#8217;ve been reluctant to start that frustrating process.<\/p>\n<p>One of the main challenges so far, besides the chart thing, has been building a modular, <a class=\"zem_slink\" href=\"http:\/\/en.wikipedia.org\/wiki\/Representational_State_Transfer\" title=\"Representational State Transfer\" rel=\"wikipedia\">RESTful<\/a> framework in PHP. Right now I&#8217;ve got a single index.php file that reads in the URL and figures out which chunks of code it needs to import to display the requested page. I&#8217;ve built in a superprimitive sort of debugging console (which you can&#8217;t see, because it&#8217;s hidden to anyone who&#8217;s not visiting from my current workstation; all you get is an enigmatic statement of your IP address at the bottom of every page), and I&#8217;m starting to peel off sections that get reused, such as the breadcrumbs code.<\/p>\n<p>There are a lot of things on the to do list\u2014too many for me to have the patience to list here right now\u2014but per a recommendation from <a href=\"http:\/\/andrewstyer.net\/\">Andrew Styer<\/a> in Understanding Networks last week, I think the next big thing is to figure out how to get some of the Java-based text-parsing code that I&#8217;ve been running from the command line into a form I can use online, on the fly, so that I can get more books in there and get more information out of them. I had started trying to convert these to Processing, at least, but got stuck on the fact that Processing uses Java 1.4 while the code I have takes advantage of features introduced in Java 1.5. Also, I hate Java. But I like PHP! I&#8217;d never made anything sizable from scratch before in PHP, mostly just edited WordPress templates and plug-ins and such, and I&#8217;ve really appreciated how easy it is to make it do stuff. So I&#8217;m thinking maybe I can rewrite those Java functions in PHP. Or something. Think how educational that would be!<\/p>\n<p>Last and least, regarding the name change from &#8220;Bookalator&#8221; to &#8220;Booknik,&#8221; <a href=\"http:\/\/www.monzy.com\/\">Monzy<\/a> pointed out that <em>-ator<\/em> is really the wrong suffix for what the thing is intended to do. Per Collins:<\/p>\n<blockquote><p><b>-ator<\/b><br \/>\n<i>suffix forming nouns<\/i><br \/>\na person or thing that performs a certain action<\/p>\n<ul>\n<li style=\"list-style-type: none;\">agitator<\/li>\n<li style=\"list-style-type: none;\">escalator<\/li>\n<li style=\"list-style-type: none;\">radiator<\/li>\n<\/ul>\n<p><b>Etymology:<\/b><br \/>\nfrom Latin <i>&#8211;<\/i><span class=\"s1\"><i>\u0101<\/i><\/span><i>tor;<\/i> see -ATE <sup>1<\/sup> -OR <sup>1<\/sup><\/p><\/blockquote>\n<p>The thing I&#8217;m making does not <em>book<\/em> in the sense that an agitator <em>agitates<\/em> or an escalator <em>escalates<\/em> or a radiator <em>radiates<\/em>. It would be better termed a book<em>alyzer<\/em>, but I didn&#8217;t like the sound of that, so I went for <em>-nik<\/em>, which isn&#8217;t much really any more appropriate but at least ties the project more to its BFF, <a href=\"http:\/\/www.wordnik.com\/\">Wordnik<\/a>.<\/p>\n<p>Anyway, that&#8217;s the name until I come up with a better one. Suggestions welcome.<\/p>\n<hr \/>\n<ol>\n<li style=\"font-size:smaller\"><a name=\"note1\"><\/a>Brought to my attention by my kind classmate <a href=\"http:\/\/chinaalbino.com\/alex\/\">Alex Kauffmann<\/a>.<\/li>\n<li style=\"font-size:smaller\">&#8220;Vocabulary Changes in Agatha Christie\u2019s Mysteries as an Indication of Dementia: A Case Study,&#8221; by Ian Lancashire and Graeme Hirst, University of Toronto, Department of English and Department of Computer Science (respectively): <a href=\"http:\/\/www.cs.toronto.edu\/pub\/gh\/Lancashire+Hirst-2009-poster.pdf\">at-a-glance poster<\/a> (PDF; 3.6MB); <a href=\"http:\/\/www.cs.toronto.edu\/pub\/gh\/Lancashire+Hirst-extabs-2009.pdf\">five-page paper<\/a> (PDF; 112K).<\/li>\n<\/ol>\n<div class=\"zemanta-pixie\"><a class=\"zemanta-pixie-a\" href=\"http:\/\/reblog.zemanta.com\/zemified\/e0d74b41-d786-4e92-8027-0548b0673b93\/\" title=\"Reblog this post [with Zemanta]\"><img class=\"zemanta-pixie-img\" src=\"https:\/\/i2.wp.com\/img.zemanta.com\/reblog_e.png?w=474\" alt=\"Reblog this post [with Zemanta]\" data-recalc-dims=\"1\" \/><\/a><span class=\"zem-script more-related pretty-attribution\"><script type=\"text\/javascript\" src=\"http:\/\/static.zemanta.com\/readside\/loader.js\" defer=\"defer\"><\/script><\/span><\/div>\n","protected":false},"excerpt":{"rendered":"<p>I have been wrestling with the Google Chart API for days, trying to get it to show me a line chart with two freaking lines, but clearly there&#8217;s something I&#8217;m missing. In the meantime, though, a reasonable portion of Booknik is working, so you can go poke at that.<\/p>\n","protected":false},"author":6,"featured_media":782,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"spay_email":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false},"categories":[46,42,19,47,9,45],"tags":[],"jetpack_featured_media_url":"https:\/\/i2.wp.com\/itp.indiamos.com\/blog\/wp-content\/uploads\/2009\/12\/Fleming_chart.png?fit=510%2C400&ssl=1","jetpack_publicize_connections":[],"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p3qY10-cB","_links":{"self":[{"href":"https:\/\/itp.indiamos.com\/blog\/wp-json\/wp\/v2\/posts\/781"}],"collection":[{"href":"https:\/\/itp.indiamos.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/itp.indiamos.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/itp.indiamos.com\/blog\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/itp.indiamos.com\/blog\/wp-json\/wp\/v2\/comments?post=781"}],"version-history":[{"count":13,"href":"https:\/\/itp.indiamos.com\/blog\/wp-json\/wp\/v2\/posts\/781\/revisions"}],"predecessor-version":[{"id":794,"href":"https:\/\/itp.indiamos.com\/blog\/wp-json\/wp\/v2\/posts\/781\/revisions\/794"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/itp.indiamos.com\/blog\/wp-json\/wp\/v2\/media\/782"}],"wp:attachment":[{"href":"https:\/\/itp.indiamos.com\/blog\/wp-json\/wp\/v2\/media?parent=781"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/itp.indiamos.com\/blog\/wp-json\/wp\/v2\/categories?post=781"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/itp.indiamos.com\/blog\/wp-json\/wp\/v2\/tags?post=781"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}