<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>mitcho.com &#187; AppleScript</title>
	<atom:link href="http://mitcho.com/blog/tag/applescript/feed/" rel="self" type="application/rss+xml" />
	<link>http://mitcho.com</link>
	<description></description>
	<lastBuildDate>Fri, 10 Feb 2012 23:24:05 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4-alpha-19719</generator>
		<item>
		<title>The Hit List: Better Software Through Less UI</title>
		<link>http://mitcho.com/blog/link/the-hit-list-better-software-through-less-ui/</link>
		<comments>http://mitcho.com/blog/link/the-hit-list-better-software-through-less-ui/#comments</comments>
		<pubDate>Wed, 25 Mar 2009 12:48:32 +0000</pubDate>
		<dc:creator>mitcho</dc:creator>
				<category><![CDATA[link]]></category>
		<category><![CDATA[AppleScript]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[interface]]></category>
		<category><![CDATA[language]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[Mozilla Planet]]></category>
		<category><![CDATA[natural syntax]]></category>
		<category><![CDATA[tasks]]></category>
		<category><![CDATA[thought process]]></category>
		<category><![CDATA[ubiquity]]></category>

		<guid isPermaLink="false">http://mitcho.com/blog/?p=1658</guid>
		<description><![CDATA[The Hit List is a to-do list app for Mac OS X with a beautiful interface and some nice features. Creator Andy Kim&#8217;s latest blog post (Better Software Through Less UI) is excellent reading for the Ubiquity community. He describes the thought process behind the design of a new clean and &#8220;frictionless&#8221; interface for specifying [...]
Related posts:<ol>
<li><a href='http://mitcho.com/blog/projects/how-natural-should-a-natural-interface-be/' rel='bookmark' title='How natural should a natural interface be?'>How natural should a natural interface be?</a></li>
<li><a href='http://mitcho.com/blog/projects/friendlier-command-feed-subscription/' rel='bookmark' title='Friendlier command feed subscription'>Friendlier command feed subscription</a></li>
<li><a href='http://mitcho.com/blog/projects/user-aided-disambiguation-a-demo/' rel='bookmark' title='User-Aided Disambiguation: a demo'>User-Aided Disambiguation: a demo</a></li>
</ol>

Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.potionfactory.com/thehitlist/">The Hit List</a> is a to-do list app for Mac OS X with a beautiful interface and some nice features. Creator Andy Kim&#8217;s latest blog post (<a href="http://www.potionfactory.com/blog/2009/03/10/better-software-through-less-ui">Better Software Through Less UI</a>) is excellent reading for the Ubiquity community. He describes the thought process behind the design of a new clean and &#8220;frictionless&#8221; interface for specifying how tasks are repeated. After throwing out the regular combinations and templates of different input widgets, <em>his solution was to implement a partial natural language input interface:</em></p>

<p><img src="http://www.potionfactory.com/files/blog/2009/03/repeating_task_1.png"/></p>

<blockquote>
  <p>There is no myriad of buttons and fields to choose from. All the user has to do is directly type in what he wants.</p>
</blockquote>

<p>Here are a couple other choice quotes which will ring true for the Ubiquity users and internationalization folks in the audience:</p>

<blockquote>
  <p>For this to work without driving the user mad, the natural language parser has to be near perfect. The last thing I want is for this to come out smelling like AppleScript.</p>
</blockquote>

<p><span></span></p>

<blockquote>
  <p><strong>Problems</strong><br/>This design isn&#8217;t perfect as it has two glaring problems. One is that the user has no easy way of discovering how complex the recurrence rules can be. This isn&#8217;t such a huge problem, but a way to solve this is to include a help button to show example rules or to include an accompanying iCal style UI to let the user setup the recurrence rule in a more typical fashion. I didn&#8217;t include these in the initial implementation though because I wanted to see how users would react to this kind of UI.<br/>Another problem is localization. Even if I write parsers for a few more popular languages, it won&#8217;t accommodate the rest of the users in the world. Again, the solution is an accompanying traditional UI, but for now, I&#8217;m leaving it the way it is until I get some feedback.</p>
</blockquote>

<p>There&#8217;s a trend in the wind, my friends: the incorporation of near-natural language for more <a href="http://humanized.com/weblog/2006/06/01/why_humane_is_a_better_word_than_usable/">humane</a> interfaces.</p>
<p>Related posts:</p><ol>
<li><a href='http://mitcho.com/blog/projects/how-natural-should-a-natural-interface-be/' rel='bookmark' title='How natural should a natural interface be?'>How natural should a natural interface be?</a></li>
<li><a href='http://mitcho.com/blog/projects/friendlier-command-feed-subscription/' rel='bookmark' title='Friendlier command feed subscription'>Friendlier command feed subscription</a></li>
<li><a href='http://mitcho.com/blog/projects/user-aided-disambiguation-a-demo/' rel='bookmark' title='User-Aided Disambiguation: a demo'>User-Aided Disambiguation: a demo</a></li>
</ol>
<p>Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://mitcho.com/blog/link/the-hit-list-better-software-through-less-ui/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How natural should a natural interface be?</title>
		<link>http://mitcho.com/blog/projects/how-natural-should-a-natural-interface-be/</link>
		<comments>http://mitcho.com/blog/projects/how-natural-should-a-natural-interface-be/#comments</comments>
		<pubDate>Mon, 16 Feb 2009 11:00:14 +0000</pubDate>
		<dc:creator>mitcho</dc:creator>
				<category><![CDATA[projects]]></category>
		<category><![CDATA[AppleScript]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[interface]]></category>
		<category><![CDATA[language]]></category>
		<category><![CDATA[Mozilla]]></category>
		<category><![CDATA[Mozilla Planet]]></category>
		<category><![CDATA[natural syntax]]></category>
		<category><![CDATA[tasks]]></category>
		<category><![CDATA[ubiquity]]></category>

		<guid isPermaLink="false">http://mitcho.com/blog/?p=1382</guid>
		<description><![CDATA[I&#8217;m very happy to announce that, starting today, I will be working full-time on Ubiquity, a Mozilla Labs experiment to connect the web with language. I&#8217;ll be heading up research on different linguistic issues of import to a linguistic user interface and blogging about these topics here. If you&#8217;re interested, please subscribe to my blog&#8217;s [...]
Related posts:<ol>
<li><a href='http://mitcho.com/blog/projects/yarpp-3-templates/' rel='bookmark' title='Using Templates with YARPP 3'>Using Templates with YARPP 3</a></li>
<li><a href='http://mitcho.com/blog/observation/testing-googles-language-detection/' rel='bookmark' title='Testing Google&#8217;s Language Detection'>Testing Google&#8217;s Language Detection</a></li>
<li><a href='http://mitcho.com/blog/observation/%e5%8f%8e%e9%9b%86-vs-%e5%9b%9e%e5%8f%8e-and-better-word-meanings-through-usage/' rel='bookmark' title='回収 vs. 収集 and Better Word Meanings Through Usage'>回収 vs. 収集 and Better Word Meanings Through Usage</a></li>
</ol>

Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p><em>I&#8217;m very happy to announce that, starting today, I will be working full-time on <a href="http://ubiquity.mozilla.com">Ubiquity</a>, a <a href="http://labs.mozilla.com">Mozilla Labs</a> experiment to connect the web with language. I&#8217;ll be heading up research on different linguistic issues of import to a linguistic user interface and blogging about these topics here. If you&#8217;re interested, please subscribe to <a href="http://mitcho.com/blog/feed/blog-only/">my blog&#8217;s RSS feed</a> or <a href="http://mitcho.com/blog/tag/ubiquity/feed/">the RSS feed for only Ubiquity-related items</a>. Commenting is encouraged! ^^</em></p>

<p>Every day, more users are trying out Ubiquity, the Mozilla Labs experiment that lets users accomplish common Internet tasks faster through a natural language interface. As we live more and more of our lives on the web, there is a huge appeal to—and need for—a faster way to access and mashup our information.</p>

<p>But what exactly do we mean by a &#8220;natural language interface&#8221;? Is it just another programming language with lots of English keywords? Should the final goal be a computer that understands everything we tell it?</p>

<p><img src="http://mitcho.com/blog/wp-content/uploads/2009/02/ubiqhal2.jpg" alt="Ubiquity is not HAL" title="I'm sorry Dave, I'm afraid I can't do that." width="650" height="220" /></p>

<p>As we think about the future directions and possibilities of Ubiquity, we need to go back to our roots and understand the project&#8217;s motivations. With that in mind, here are some initial thoughts on the advantages of a natural language interface. The ultimate goal here is to refine the notion of natural language interface and to come up with a set of principles that we can follow in pushing Ubiquity further, into other languages and beyond.</p>

<p><span id="more-1382"></span></p>

<h3>Why language?</h3>

<p>In his <a href="http://doi.acm.org/10.1145/1330526.1330535">2008 article in interactions</a>, <a href="http://azarask.in">Aza</a> describes a clear need for modern UI to move beyond monolithic do-everything apps into efficient, granular commands that can be connected to accomplish tasks. Hierarchical menus with an application&#8217;s every possible function are great for discoverability, but slow and inefficient as they grow. Aza advocates for the use of a familiar subset of natural language to this end. In his own words,</p>

<blockquote>
  <p>Words can capture abstractions that pictures cannot because language has an immense amount of descriptive and differentiating power. Abstract thoughts are exactly represented by the words that give them names. It is this power that comes to the rescue in specifying functionality.</p>
</blockquote>

<p>In other words, language gives us the descriptive power to succinctly and creatively express our will, far faster than a series of menus, and with more freedom than a series of shortcuts or gestures. In addition, by tapping into the lexicon of our every day language, we make a direct attack on the learnability problem.<sup id="fnref:1"><a href="#fn:1" rel="footnote">1</a></sup></p>

<h3>The natural syntax test</h3>

<p>The ability to string different commands together is not a novel one—indeed, this is what more traditional command lines and programming languages offer. However, these technologies present a huge barrier to the layperson, even for languages with many keywords from English or English-like syntax.</p>

<p>Programming languages can be such teases in this way. Often the first bits of code in a language look remarkably similar to natural language (<a href="http://en.wikipedia.org/wiki/Python">Python</a>):</p>


<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;"><span style="color: #ff7700;font-weight:bold;">print</span> <span style="color: #483d8b;">&quot;Hello World&quot;</span></pre></div></div>


<p>&#8230;but the young coder is quickly disappointed:</p>


<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;"><span style="color: #ff7700;font-weight:bold;">print</span> <span style="color: #008000;">map</span><span style="color: black;">&#40;</span><span style="color: #ff7700;font-weight:bold;">lambda</span> x: x<span style="color: #66cc66;">*</span><span style="color: #ff4500;">2</span>, <span style="color: black;">&#91;</span><span style="color: #ff4500;">1</span>,<span style="color: #ff4500;">2</span>,<span style="color: #ff4500;">3</span><span style="color: black;">&#93;</span><span style="color: black;">&#41;</span></pre></div></div>


<p><a href="http://en.wikipedia.org/wiki/AppleScript">AppleScript</a> is a language which tries to take this idea further and, indeed, sometimes AppleScript code constitutes readable English.</p>


<div class="wp_syntax"><div class="code"><pre class="applescript" style="font-family:monospace;"><span style="color: #0066ff;">print</span> pages <span style="color: #000000;">1</span> <span style="color: #ff0033;">thru</span> <span style="color: #000000;">5</span> <span style="color: #ff0033; font-weight: bold;">of</span> <span style="color: #0066ff;">document</span> <span style="color: #000000;">2</span></pre></div></div>


<p>Dig a little deeper, though, and AppleScript also fails the &#8220;natural syntax&#8221; test. In fact, it can be argued that a language that <em>looks</em> like a natural language but differs in some important details can be even more difficult to use than one that is completely novel. Bill Cook, one of the original developers of <a href="http://en.wikipedia.org/wiki/AppleScript">AppleScript</a>, makes this point in <a href="http://www.cs.utexas.edu/~wcook/Drafts/2006/ashopl.pdf">his history of AppleScript</a>: &#8220;in hindsight, it is not clear whether it is easier for novice users to work with a scripting language that resembles natural language, with all its special cases and idiosyncrasies.&#8221;</p>

<p><strong>If the interface&#8217;s syntax is too restrictive or, worse, conflicts with a user&#8217;s natural intuitions about their natural language, it immediately fails to be &#8220;natural&#8221;, no matter how similar the keywords or grammar is.</strong><sup id="fnref:2"><a href="#fn:2" rel="footnote">2</a></sup></p>

<h3>Towards a natural (and forgiving) syntax</h3>

<p>Aza similarly laments the relegation of text-based interfaces to the higher echelons of geekdom in his 2008 paper: &#8220;if commands were memorable, and their syntax <em>forgiving</em>, perhaps we wouldn&#8217;t be so scared to reconsider these interface paradigms.&#8221;</p>

<p>The key word &#8220;forgiving&#8221; above (emphasis mine) is two-ways ambiguous, both of which we want a natural language interface to be:</p>

<ol>
<li><em>Forgiving</em> as in &#8220;not difficult to learn and remember&#8221;: the syntax must be easy and natural for the user, encouraging experimentation and intuitive application;</li>
<li><em>Forgiving</em> as in &#8220;not correcting or prescriptive&#8221;: the system should try its darndest to accept the user&#8217;s input, even if it&#8217;s not the most &#8220;well-formed.&#8221;</li>
</ol>

<p>From an implementation point of view, (2) above can also be an advantage. There are many grammatical restrictions in natural language which, as long as the command is unambiguous, Ubiquity need not enforce on the user. Take, for example, the two statements:</p>


<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
</pre></td><td class="code"><pre class="ubiquity" style="font-family:monospace;">print two copy
print two copies</pre></td></tr></table></div>


<p>I feel that Ubiquity should execute both of these statements with equal ease. The numeral &#8220;two&#8221; makes the user&#8217;s intent very clear, even though the plural of &#8220;copy&#8221; should indeed be &#8220;copies.&#8221; It need not be the job of the interface to decide whether a sentence is &#8220;correct English.&#8221; By assuming that the user is trying to communicate a valid and possible task, rather than throwing up an error, the system will be more flexible and more forgiving in the inevitable case of human error. <strong>The ultimate goal should be to help the user accomplish their task.</strong></p>

<h3>Conclusion</h3>

<p>By developing a language interface which truly <em>feels</em> natural to the user, we can successfully bring the power of text-based interfaces to the masses. I feel the key to this &#8220;natural-ness&#8221; is a less restrictive and in fact <em>forgiving</em> syntax. While this goal akin to <a href="http://en.wikipedia.org/wiki/natural language programming">natural language programming</a> may be daunting from an implementation angle, and it may indeed prove impossible, as long as the goal is to execute simple imperative commands, the scope of the target syntactic structures is limited.</p>

<p>Ubiquity as it stands is many different things for many people. The natural language guidelines above may feel too restrictive to many current developers for whom Ubiquity is simply a convenient new way to extend Firefox.<sup id="fnref:3"><a href="#fn:3" rel="footnote">3</a></sup> This discussion also seems orthogonal to the <a href="http://www.azarask.in/blog/post/can-ubiquity-be-used-only-with-the-mouse/">mouse-based Ubiquity experiments</a>. <strong>As users and developers, how do you feel about the potential benefits and downsides of these natural syntax guidelines?</strong> In the coming days I&#8217;ll look at some concrete examples of what this &#8220;forgiving&#8221; syntax would demand of Ubiquity.</p>

<div class="footnotes">
<hr />
<ol>

<li id="fn:1">
<p>The learnability problem of a linguistic interface, particularly in light of the usability vs. discoverability paradigm, is a topic for a future post. <img src='http://mitcho.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> &#160;<a href="#fnref:1" rev="footnote">&#8617;</a></p>
</li>

<li id="fn:2">
<p>It&#8217;s important to note that the &#8220;restrictions&#8221; I&#8217;m concerned with here are syntactic ones, not lexical ones. That is, if either of the Ubiquity commands below fail because we don&#8217;t have a &#8220;pass&#8221; verb, that&#8217;s fine. But if Ubiquity can only allow one string but not the other, that&#8217;s a syntactic restriction which goes against our English intuition.


<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
</pre></td><td class="code"><pre class="ubiquity" style="font-family:monospace;">pass Jono the ball
pass the ball to Jono</pre></td></tr></table></div>




I&#8217;ll cover this in a future post.&#160;<a href="#fnref:2" rev="footnote">&#8617;</a></p>
</li>

<li id="fn:3">
<p>In fact, I myself am also guilty of this&#8230; my <a href="http://mitcho.com/code/select/">select command</a> for SQL queries clearly does not encourage a natural language-compatible syntax.&#160;<a href="#fnref:3" rev="footnote">&#8617;</a></p>
</li>

</ol>
</div>
<p>Related posts:</p><ol>
<li><a href='http://mitcho.com/blog/projects/yarpp-3-templates/' rel='bookmark' title='Using Templates with YARPP 3'>Using Templates with YARPP 3</a></li>
<li><a href='http://mitcho.com/blog/observation/testing-googles-language-detection/' rel='bookmark' title='Testing Google&#8217;s Language Detection'>Testing Google&#8217;s Language Detection</a></li>
<li><a href='http://mitcho.com/blog/observation/%e5%8f%8e%e9%9b%86-vs-%e5%9b%9e%e5%8f%8e-and-better-word-meanings-through-usage/' rel='bookmark' title='回収 vs. 収集 and Better Word Meanings Through Usage'>回収 vs. 収集 and Better Word Meanings Through Usage</a></li>
</ol>
<p>Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://mitcho.com/blog/projects/how-natural-should-a-natural-interface-be/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
	</channel>
</rss>

