<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Laurel Kona Goodhart</title>
    <description>Software engineer - Computational linguist</description>
    <link>https://konahart.com</link>
    <atom:link href="https://konahart.comfeed.xml" rel="self" type="application/rss+xml" />
    
      <item>
        <title>generativiTea : Creating a little Teabot, short &amp; stout</title>
        <description>&lt;!DOCTYPE HTML&gt;
&lt;html lang=&quot;en-US&quot;&gt;
    &lt;head&gt;
        &lt;link type=&quot;text/css&quot; rel=&quot;stylesheet&quot; href=&quot;/css/style.css&quot;&gt;
        &lt;meta charset=&quot;UTF-8&quot;&gt;
       &lt;meta http-equiv=&quot;refresh&quot; content=&quot;1;url=http://konahart.com/generativiTea&quot;&gt;
        &lt;script type=&quot;text/javascript&quot;&gt;
            window.location.href = &quot;http://konahart.com/generativiTea&quot;
        &lt;/script&gt;
        &lt;title&gt;Page Redirection&lt;/title&gt;
    &lt;/head&gt;
    &lt;body&gt;
        I believe &lt;a href='http://konahart.com/generativiTea'&gt;this&lt;/a&gt; is &lt;a href='http://konahart.com/generativiTea'&gt;the page you are looking for&lt;/a&gt;.
    &lt;/body&gt;
&lt;/html&gt;
</description>
        <pubDate>Mon, 05 Apr 2021</pubDate>
        <link>https://konahart.com/2021/04/generativiTea</link>
        <guid isPermaLink="true">https://konahart.com/2021/04/generativiTea</guid>
      </item>
    
      <item>
        <title>User Interface Design for Creative Writing Software</title>
        <description>&lt;h2 id=&quot;inspiration&quot;&gt;Inspiration&lt;/h2&gt;

&lt;h3 id=&quot;the-state-of-creative-writing-software&quot;&gt;The State of Creative Writing Software&lt;/h3&gt;

&lt;p&gt;For whatever reason, I can never stop thinking about creative writing software
(you might be familiar with my 
&lt;a href=&quot;http://konahart.com/promptbot/&quot;&gt;promptbot project&lt;/a&gt;). 
Maybe it’s a form of procrastination—I’m forever fidgetting with the 
software, never actually doing the writing. I have tried a number of different
programs, from &lt;a href=&quot;http://www.ravensheadservices.com/index.php&quot;&gt;WriteItNow&lt;/a&gt; back 
in the day, to &lt;a href=&quot;http://www.literatureandlatte.com/scrivener.php&quot;&gt;Scrivener&lt;/a&gt;, 
to &lt;a href=&quot;http://www.writerscafe.co.uk/&quot;&gt;Writer’s Cafe&lt;/a&gt;, 
to &lt;a href=&quot;http://www.spacejock.com/yWriter5.html&quot;&gt;yWriter&lt;/a&gt;, to just about every 
&lt;a href=&quot;http://alternativeto.net/software/scrivener/&quot;&gt;alternative to Scrivener&lt;/a&gt;. 
While many of them are serviceable, most are little more than pared-down word
processors, glorified corkboards, or flow chart makers, and very rarely more 
than one or two of those. Worst of all—to me—all I’ve seen have the 
clunkiest, ripped-out-of-the-90s user interfaces. Few take advantage of more
recent forms of knowledge organization, such as tagging, nor new forms of
interaction such as touch. None look like they were natively written for 
post-millenial operating systems and devices; to my knowledge, none of them 
were.&lt;/p&gt;

&lt;p&gt;Which is not, in any way, to imply they are totally useless. Certainly word 
processors, corkboards, and flow charts are useful in creative writing.
However, I have found them limiting and wanting. Of the programs I have tried,
I prefer Scrivener because I find it the most richly-featured, but still feel 
constricted by its limited ways of interacting with my writing and its 
antiquated-looking interface.&lt;/p&gt;

&lt;h2 id=&quot;design&quot;&gt;Design&lt;/h2&gt;

&lt;h3 id=&quot;borrowing-from-coders--code-bubbles&quot;&gt;Borrowing from Coders — Code Bubbles&lt;/h3&gt;

&lt;p&gt;It was during my last term as a student, that my Human-Computer Interaction 
seminar discussed 
&lt;a href=&quot;http://www.andrewbragdon.com/codebubbles_site.asp&quot;&gt;Code Bubbles&lt;/a&gt;. My
thoughts immediately turned to how I could apply those design decisions to 
creative writing software. At first I decided that there was not much that
would translate usefully; however, the idea kept churning in my brain.&lt;/p&gt;

&lt;p&gt;On the surface, the needs of writing creatively are very different from those
of writing software. Where an IDE might reasonably include things like tab-
completion and templating, these features are of very limited use to creative
writing. However, both acts center around both creating content and organizing
it. A large codebase can quickly get out of hand if there is no way to usefully
understand its structure; likewise, an author can get lost in all the details
of a story they are trying to create. When does a particular item or character
first appear in the story? Is its appearance described consistently?&lt;/p&gt;

&lt;p&gt;The “novel user interface metaphor” developed by Code Bubbles can be usefully
extended to the realm of creative writing. &lt;em&gt;More on this later.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Take-aways / novel features of Code Bubbles:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Manipulate snippets&lt;/li&gt;
  &lt;li&gt;Concurrently-visible working sets&lt;/li&gt;
  &lt;li&gt;Groups with minimal border decoration, no overlap&lt;/li&gt;
  &lt;li&gt;Large, pannable 2-D virtual space in which to cluster groups&lt;/li&gt;
  &lt;li&gt;Small representation (map) of larger virtual space for easy navigation&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;interface-metaphor&quot;&gt;Interface Metaphor&lt;/h3&gt;

&lt;p&gt;Essential to good design is an intuitive metaphor—or model—of how
elements are organized and can be manipulated. Code Bubbles introduced 
“bubbles,” but even this is not so much a comprehensive metaphor that fully
explans the bubbles’ fuctionality, but mostly serves to emphasize that bubbles
fuction differenty from more-familiar “windows.”&lt;/p&gt;

&lt;p&gt;Returning to existing creative writing software, many have the same component 
elements:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;hierarchical file system on one side&lt;/li&gt;
  &lt;li&gt;word processor in the middle&lt;/li&gt;
  &lt;li&gt;meta-notes on the side&lt;/li&gt;
  &lt;li&gt;short notes that are rearrangable within a grid&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The first two are probably familiar to the user by dint of being related to 
basic computational tasks. There is no particular metaphor in place that
relates these elements with the others; nor, necessarily, does there need to 
be.&lt;/p&gt;

&lt;p&gt;The most novel element is the occasional inclusion of small notes that are 
rearrangable in a grid. These are always akin to index cards, a simple analogy
to the physical world: to add meta-notes to a document in the real world, one
might reasonably attach a Post-It note or an index card; the same metaphor is
reused for the digital world. But within that analogy, there is actually a 
loss of usefulness: index cards in the real world can be arranged in more
than just a grid. They can be manipulated in more meaningful ways. They can
be color-coded with multiple colors. They might also take the form of images,
whether a quick sketch, a photograph, or other useful bit of visual
information. In the real world, an author will use whatever material best suits
the information to be conveyed. The only limitations are related to being 
physical: portability, duplication, and so on. Unfortunately, this model 
consistently fails to solve some of those very problems. They fail to make use
of the advantages of using a computer program instead of actual notecards.&lt;/p&gt;

&lt;p&gt;Furthermore, the model these programs adopt is minimally commital, with only
one or two components being related to the real world, while the rest are 
unrelated to one another. The model gives no clear idea of the functionality
of its components.&lt;/p&gt;

&lt;p&gt;Instead, I propose a program with a model based around the night sky.&lt;/p&gt;

&lt;p&gt;Just looking at the night sky, you might see a mess of little lights: 
stars, planets, various celestial bodies. These lights (we’ll say stars for 
simplicity) have no immediately apparent organizational structure. How can one
ever learn to consistently identify specific stars, transform the mess of 
lights into useful information?&lt;/p&gt;

&lt;p&gt;The solution to this problem is ancient, yet still applicable to modern life:
constellations.&lt;/p&gt;

&lt;p&gt;By connecting and making pictures out of patterns of lights, humans have been
able to chart the night sky in ways that are memorable and meaningful to even
those with only passing interest in the celestial bodies. Furthermore, stars
can be part of multiple, overlapping constellations—being a member of one 
grouping does not prevent it from being part of another.&lt;/p&gt;

&lt;p&gt;How does this map to creative writing?&lt;/p&gt;

&lt;p&gt;Imagine a story that involves multiple narrator characters. One way to look at
the story is how it will appear in the story’s final, written form: a series of
events, perhaps presented non-chronologically, from a variety of narrators. 
But perhaps, as the author creates the story, they want to look at the story
as it happens chronologically. Or perhaps they want to examine each character’s
part as separate from the others’. Or perhaps the writer wants to group scenes
by their locations. All of these are perfectly valid ways to organize the same
set of documents, yet in most creative writing software, attempting to create
a new organization either destroys what existed previously or creates a lot of
needless duplication.&lt;/p&gt;

&lt;p&gt;Therefore, I propose software that, like Code Bubbles, allows for snippets of
writing to be intuitively grouped, but unlike Code Bubbles, allows for 
multiple, overlapping organization schemes. The night sky model provides an
intuitive interface metaphor that will encourage ease of understanding and use.&lt;/p&gt;

&lt;p&gt;Terminology:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Stars - notes/nodes/vertices&lt;/li&gt;
  &lt;li&gt;Clusters - multiple stars collapsed into a smaller representation&lt;/li&gt;
  &lt;li&gt;Constellations - arrangements/relationships/networks&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;components&quot;&gt;Components&lt;/h2&gt;

&lt;h3 id=&quot;stars&quot;&gt;Stars&lt;/h3&gt;

&lt;p&gt;Stars function much like you would expect notes to, but can actually have a 
range of uses. A Star might consist of:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;a snippet of writing&lt;/li&gt;
  &lt;li&gt;a character profile&lt;/li&gt;
  &lt;li&gt;a scene&lt;/li&gt;
  &lt;li&gt;notes about a scene&lt;/li&gt;
  &lt;li&gt;a setting&lt;/li&gt;
  &lt;li&gt;an image&lt;/li&gt;
  &lt;li&gt;a quote&lt;/li&gt;
  &lt;li&gt;an event&lt;/li&gt;
  &lt;li&gt;a link&lt;/li&gt;
  &lt;li&gt;a piece of audio or video&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;constellations&quot;&gt;Constellations&lt;/h3&gt;

&lt;p&gt;Constellations operate much like Code Bubbles’ bubbles, but multiple can be
defined from the same set of Stars. Grouping will be available both in terms of
an outline that encompasses the component Stars, as in the graphical 
representation of a constellation in real like, and in network-like edges 
between Stars (nodes). This can be used to create series of events, as in a
chronological or diegetic order, while having simultaneously associated but 
“orderless” elements.&lt;/p&gt;

&lt;p&gt;Constellations will be given names and colors, to allow them to be easily
distinguished from one another in a selection menu.&lt;/p&gt;

&lt;h3 id=&quot;clusters&quot;&gt;Clusters&lt;/h3&gt;

&lt;p&gt;For simplicity, it is advisable that groups of Stars be collapsible. For
example, a group of Stars might consist of notes related to a character—
perhaps one Star is a profile, others are images of the character, and so on. 
Perhaps the author wants to include all the character notes in a Constellation
that contains notes on all the characters. Including all the notes on this 
character at the “top level” in this Constellation would make it 
difficult to understand the relationship between all the Stars—notes on this
character are not directly related to notes on another character. Instead,
these Stars should be embeddable into a Cluster that represents the character.
Then is is possible to have a Constellation of all the characters, from which
each Cluster can be expanded into its component Stars.&lt;/p&gt;

&lt;h3 id=&quot;other-features&quot;&gt;Other features&lt;/h3&gt;

&lt;ul&gt;
  &lt;li&gt;small ‘sky map’ of all inhabited parts of the virtual field&lt;/li&gt;
  &lt;li&gt;search across all snippets&lt;/li&gt;
  &lt;li&gt;name/character generator&lt;/li&gt;
  &lt;li&gt;document statistics (word counts, etc)&lt;/li&gt;
  &lt;li&gt;selection of sky/star themed backgrounds will help give the software a modern
look&lt;/li&gt;
  &lt;li&gt;bare-bones editor mode for focused, long-form writing&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;miscellanea&quot;&gt;Miscellanea&lt;/h2&gt;

&lt;p&gt;Working titles for this software design include:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Constellate / Constellations&lt;/li&gt;
  &lt;li&gt;Celestial&lt;/li&gt;
  &lt;li&gt;Sky Writer&lt;/li&gt;
  &lt;li&gt;Written in the Stars&lt;/li&gt;
&lt;/ul&gt;

</description>
        <pubDate>Mon, 16 Mar 2015</pubDate>
        <link>https://konahart.com/2015/03/Constellations</link>
        <guid isPermaLink="true">https://konahart.com/2015/03/Constellations</guid>
      </item>
    
      <item>
        <title>Some Fun with JQuery &amp;#58; Lists &amp;amp; Links</title>
        <description>&lt;h3 id=&quot;inspiration&quot;&gt;Inspiration&lt;/h3&gt;
&lt;p&gt;My afternoon project for last Friday happened to be my first ever endeavor
into JQuery, and among my first uses of Javascript. Since seeing the elegant
use of collapsing/expanding lists for the 
&lt;a href=&quot;http://knowitall.cs.washington.edu/summa/demo.html&quot;&gt;demonstration of a
news summarization system&lt;/a&gt;, I had fallen in love with this strategy for
representing hierarchical data (in Summa’s case, increasingly specific 
summarizations). At the same time, I was looking for a way to augment 
&lt;a href=&quot;/resume/&quot;&gt;my resume page&lt;/a&gt;; a way to add more information without 
cluttering the page. Eventually hit upon the idea of combining these two ideas.&lt;/p&gt;

&lt;p&gt;A single page resume is nice, but somewhat negates the point of creating a 
webpage—why not just post the .pdf (which &lt;a href=&quot;/resume/resume.pdf&quot;&gt;
I also do&lt;/a&gt;), if it’s not going to add anything else? My resume is one page 
of things &lt;i&gt;I&lt;/i&gt; think will be most relevant to a position I am interested 
in. During a recent chat with a recruiter, I realized that the skills I chose 
not to include may be important, too. In this case, my training the Linux/Unix
systems, which has been pushed off my resume in favor of an NLP/Machine
Learning focus, was just the ticket to show that I had the skills the job 
required. My goal with my online resume, then, was to highlight certain things
—particularly recent projects and things I’m most proud of—
while allowing for further exploration and delving into everything I have to 
offer.&lt;/p&gt;

&lt;h3 id=&quot;selectively-collapsing-lists&quot;&gt;Selectively Collapsing Lists&lt;/h3&gt;
&lt;p&gt;Creating collapsing/expanding lists was mostly a matter of following 
&lt;a href=&quot;http://jasalguero.com/ledld/development/web/expandable-list/&quot;&gt;
jasalguero’s tutorial&lt;/a&gt;, which works quite admirably. However, the page 
created by this tutorial loads with all lists collapsed. The “expand all” and 
“collapse all” buttons provide a detailed view and sparse overview, 
respectively. I wanted something in the middle, a “one page summary” by 
default, which could then be expanded or collapsed at will.&lt;/p&gt;

&lt;p&gt;To do this, I added a class that I could use to manually mark highlights, or
things that would be expanded by default. Since the page doesn’t include any
content that might change, it creates lists of “highlights” and “lowlights” 
(everything but highlights) on loading. Collapsed style is then added to every
element of lowlights, and both collapsed and expanded styles are added to 
highlights. This allows highlights to maintain proper behavior when expanding
is toggled. Full code for this can be found in 
&lt;a href=&quot;https://github.com/konahart/resume/blob/gh-pages/js/collapseList.js&quot;&gt;
my resume repo&lt;/a&gt;.&lt;/p&gt;

&lt;h3 id=&quot;differing-behavior-for-anchor-fragment-and-outgoing-links&quot;&gt;Differing Behavior for Anchor (fragment) and Outgoing Links&lt;/h3&gt;
&lt;p&gt;Because of the way click events are handled by the above tutorial, they must be
explicitly re-enabled in the script (which, to jasalguero’s credit, is 
explained in the tutorial). However, solution provided would cause anchor links
to open in a new window/tab without actually focusing the page to the anchor. 
What I needed was to specify one behavior for anchor links and one behavior for
outgoing links. Although I saw plenty of similar questions online, I did not 
see any answers that fit my specific case. Since I wasn’t able to find a clear
answer anywhere, here is my solution (minus aspects needed for 
collapsing/expanding elements):&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-javascript&quot; data-lang=&quot;javascript&quot;&gt;&lt;span class=&quot;nx&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;'&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;a&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;unbind&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;'&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;click&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;click&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(){&lt;/span&gt;
    &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;link&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;attr&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;'&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;href&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;fragment&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;link&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;split&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;'&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;#&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;];&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;fragment&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;nx&quot;&gt;fragment&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;'&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;[name=&quot;&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;'&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;link&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;substr&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;'&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&quot;]&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;nx&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;root&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;animate&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;({&lt;/span&gt;
            &lt;span class=&quot;na&quot;&gt;scrollTop&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;fragment&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;offset&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;().&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;top&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;},&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;500&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;nb&quot;&gt;window&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;open&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;link&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;});&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Someone with better knowledge of JQuery might be able to produce a more 
elegant solution, but this seems to work.&lt;/p&gt;
</description>
        <pubDate>Mon, 17 Nov 2014</pubDate>
        <link>https://konahart.com/2014/11/InteractiveResume</link>
        <guid isPermaLink="true">https://konahart.com/2014/11/InteractiveResume</guid>
      </item>
    
      <item>
        <title>Running and Testing an IRC Bot Offline</title>
        <description>&lt;p&gt;Want to write an irc bot without getting kicked off your favorite server during
testing? Not to mention be able to play with it while offline—after all,
you shouldn’t have to connect to the internet just to test your chat bot.
Recently I was recommended to use Charybdis to set up a local irc server for
testing. However, I quickly found a simpler solution, one that’s more or
less plug-and-play, with minimal initial setup.&lt;/p&gt;

&lt;p&gt;This article assumes a Linux-like operating system for specific instructions on
how to run certain commands, but it should be possible to use Mac OS X. As 
such, some commands may vary.&lt;/p&gt;

&lt;h3 id=&quot;ngircd&quot;&gt;ngIRCd&lt;/h3&gt;
&lt;p&gt;Prompted by a &lt;a href=&quot;http://blog.tremily.us/posts/Local_IRC_server/&quot;&gt;Physics
student teacher’s post about setting up a local IRC server for his students to
use&lt;/a&gt;, I decided to look into &lt;a href=&quot;http://ngircd.barton.de/&quot;&gt;ngIRCd&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Installation is easy enough:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;apt-get &lt;span class=&quot;nb&quot;&gt;install &lt;/span&gt;ngircd&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;(You may need to use ‘sudo’)&lt;/p&gt;

&lt;p&gt;He goes into slightly more depth about configuring ngird, which you can do by
editting the configurations in /etc/ngircd/ngirdc.conf if you like; for
simple bot testing, I found this necessary. After installing, simply run&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;ngirdc&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;in a terminal to start it. It will look like nothing happened, but you will now
be able to connect to your local server using&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;irssi &lt;span class=&quot;nt&quot;&gt;-c&lt;/span&gt; localhost&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;or whatever your favorite irc client is.&lt;/p&gt;

&lt;p&gt;You can stop it at any time by calling&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;/etc/init.d/ngircd stop&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;I believe that it will run every time the box on which it’s run is turned on
(meaning that shutting down or restarting will only stop ngIRCd while the box
is off), though I have not tested that extensively. You can tell if it is
running my executing&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;pidof ngircd&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;in a terminal. If it returns a pid (a number), then ngircd is running. You can
also use this number to kill the job, but there is no reason to do that instead
of the stop command above.&lt;/p&gt;

&lt;p&gt;Now that the local IRC server is set up, you can use it to test your irc bot
by connecting it to localhost.&lt;/p&gt;

&lt;h3 id=&quot;a-little-bit-of-troubleshooting&quot;&gt;A Little Bit of Troubleshooting&lt;/h3&gt;
&lt;p&gt;If you notice that your bot doesn’t seem to be connecting and are extending
Twisted’s irc.IRCClient, consider adding&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-python&quot; data-lang=&quot;python&quot;&gt;&lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;dataReceived&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;bp&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;bytes&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;repr&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;bytes&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;irc&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;IRCClient&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;dataReceived&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;bp&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;bytes&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;to your bot’s code. This will let you see all the data your bot receives, and
may help with troubleshooting a bad connection. For example, when I first tried
to connect &lt;a href=&quot;promptbot&quot;&gt;Promptbot&lt;/a&gt; to localhost, it never showed up in
the default channel, nor even on the local network. Once I added the above code,
I was able to see that it was getting the following message:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;ERROR :Access denied: Bad password?&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;This happened because I had set &lt;a href=&quot;promptbot&quot;&gt;Promptbot&lt;/a&gt; up with a
default nick and password. Since no password was configured for the server, it
was being rejected for even trying to use a password at all. Once I set the
default password to null, it was able to connect, and I was able to test my bot
to my heart’s content.&lt;/p&gt;

&lt;p&gt;Need help troubleshooting? Feel free to contact me! I’m always open for
questions… especially related to &lt;a href=&quot;promptbot&quot;&gt;Promptbot&lt;/a&gt;/irc bots!&lt;/p&gt;
</description>
        <pubDate>Tue, 04 Nov 2014</pubDate>
        <link>https://konahart.com/2014/11/IRCBotTesting</link>
        <guid isPermaLink="true">https://konahart.com/2014/11/IRCBotTesting</guid>
      </item>
    
      <item>
        <title>New NLP-ish Repo</title>
        <description>&lt;p&gt;Curious about what I worked on over the summer? Check out my
&lt;a href=&quot;https://github.com/konahart/relation-extraction-pipeline&quot;&gt;
new, elegantly-named repo&lt;/a&gt;:
&lt;a href=&quot;https://github.com/konahart/relation-extraction-pipeline&quot;&gt;
https://github.com/konahart/relation-extraction-pipeline&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I decided to open source my work because a) my bosses had no problem with it
(&lt;i&gt;i.e.&lt;/i&gt;, “because I can”) and b) I believe there are parts which may be more
widely useful, such as:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;GigawordCorpusHandler, which parses the XGML structure given by
&lt;a href=&quot;https://www.ldc.upenn.edu/&quot;&gt;LCD&lt;/a&gt;'s
Gigaword Corpus (consistent across English, Spanish,
and Chinese); &lt;/li&gt;
&lt;li&gt;CoreNLPProcessor, which uses
&lt;a href=&quot;http://nlp.stanford.edu/software/corenlp.shtml&quot;&gt;Stanford's CoreNLP &lt;/a&gt;
to perform tokenization, NER, and POS annotation (although not the most
efficiently... more on that later); and &lt;/li&gt;
&lt;li&gt;Utils, which provides a function to check whether a
file is gzipped, then returns the appropriate InputStream (useful for dealing
with large corpora like Gigaword, but not having to gzip all files).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In the coming months I’ll likely work on breaking them out into their own,
useful little repos, but since the code runs, I might as well make it available
now. Enjoy!&lt;/p&gt;
</description>
        <pubDate>Tue, 28 Oct 2014</pubDate>
        <link>https://konahart.com/2014/10/relationExtraction</link>
        <guid isPermaLink="true">https://konahart.com/2014/10/relationExtraction</guid>
      </item>
    
  </channel>
</rss>
