<?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; verbs</title>
	<atom:link href="http://mitcho.com/blog/tag/verbs/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>Exploring Command Chaining in Ubiquity: Part 1</title>
		<link>http://mitcho.com/blog/projects/exploring-command-chaining-in-ubiquity-part-1/</link>
		<comments>http://mitcho.com/blog/projects/exploring-command-chaining-in-ubiquity-part-1/#comments</comments>
		<pubDate>Wed, 19 Aug 2009 20:35:37 +0000</pubDate>
		<dc:creator>mitcho</dc:creator>
				<category><![CDATA[projects]]></category>
		<category><![CDATA[algorithm]]></category>
		<category><![CDATA[asynchronous]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Mozilla Planet]]></category>
		<category><![CDATA[nountypes]]></category>
		<category><![CDATA[ubiquity]]></category>
		<category><![CDATA[verbs]]></category>

		<guid isPermaLink="false">http://mitcho.com/blog/?p=2760</guid>
		<description><![CDATA[Since the dawn of time people have been asking about command chaining in Ubiquity. If you have a translate command and an email command, it would be great to be able to, for example, translate hello to Spanish and email to Juanito. This is what we call command chaining or piping: in a single complex [...]
Related posts:<ol>
<li><a href='http://mitcho.com/blog/link/command-chaining-with-oni/' rel='bookmark' title='Command Chaining with Oni?'>Command Chaining with Oni?</a></li>
<li><a href='http://mitcho.com/blog/projects/ubiquity-commands-by-the-numbers/' rel='bookmark' title='Ubiquity Commands by The Numbers'>Ubiquity Commands by The Numbers</a></li>
<li><a href='http://mitcho.com/blog/projects/ubiquity-parser-the-next-generation-demo/' rel='bookmark' title='Ubiquity Parser: The Next Generation Demo'>Ubiquity Parser: The Next Generation 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>Since the <a href="http://labs.mozilla.com/2008/08/introducing-ubiquity/">dawn of time</a> people have been asking about command chaining in Ubiquity. If you have a <code>translate</code> command and an <code>email</code> command, it would be great to be able to, for example, <code>translate hello to Spanish and email to Juanito</code>. This is what we call <strong>command chaining</strong> or <strong><a href="http://en.wikipedia.org/wiki/Pipeline_(Unix)">piping</a></strong>: in a single complex query, specifying multiple (probably two) actions and using the first&#8217;s output as the second&#8217;s input.<sup id="fnref:1"><a href="#fn:1" rel="footnote">1</a></sup></p>

<p>Today I hope to cover some of the technical considerations required in implementing command chaining in Ubiquity, and I will follow up soon with a blog post on the linguistic considerations required as well.</p>

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

<h3>Technical considerations: hooking the pipes together</h3>

<p>I&#8217;d first like to lay out some technical challenges and questions. These can be broken into two different categories: (1) how the parse and display of suggestions is affected and (2) how the execution is affected.</p>

<h4>Matching inputs and outputs</h4>

<p>We&#8217;ll first consider how command chaining may affect the parsing. Ubiquity commands each specify the types of argument inputs that it expects using different <strong>noun types</strong>, such as <code>noun_arb_text</code> which accepts anything, <code>noun_type_number</code> which accepts numbers, or <code>noun_type_language</code>, which takes the name of a language. For example, the <code>translate</code> verb takes maximally three arguments: a <code>noun_arb_text</code> object, a <code>noun_type_language</code> goal (the language to translate into), and a <code>noun_type_language</code> source (the source language). In implementing command chaining, it will be necessary to identify the appropriate noun types for the <em>output</em> of a command.</p>

<p>The first question we must address here is <strong>&#8220;what is the chaining output of a command&#8221;?</strong> Is it the preview text? Some text output from the execution?</p>

<p><a href='http://www.flickr.com/photos/joemud/2851415655/'><img src="http://mitcho.com/blog/wp-content/uploads/2009/08/2851415655_1012a4cce0_o.jpg" alt="2851415655_1012a4cce0_o.jpg" border="0" width="650" height="226" /></a><br/><small><a href='http://www.flickr.com/photos/joemud/2851415655/'>Big fish eat da lil fish</a> by joemud, CC-SA-NC</small></p>

<p>To put this question into perspective, we note that Ubiquity commands can be broadly classified into two types: <strong>lookup</strong> and <strong>action execution</strong>. Here&#8217;s a classification which I believe to be exhaustive:<sup id="fnref:2"><a href="#fn:2" rel="footnote">2</a></sup></p>

<table>
<tr><th>classification</th><th>preview</th><th>execution</th><th>example</th></tr>
<tr><td rowspan='4'>lookup</td><td rowspan='4'>data lookup</td><td>inserting result into page</td><td><code>translate</code></td></tr>
<tr><td>opening a website</td><td><code>weather</code>, most search commands</td></tr>
<tr><td>copying result to pasteboard</td><td><code>get email address</code></td></tr>
<tr><td>nothing</td><td><code></code></td></tr>
<tr><td>action</td><td>nothing (maybe a description<br/>of what the action will do)</td><td>an action which changes some state <br/>(in the browser or on the web)</td><td><code>quit firefox</code>, <code>email</code>, <code>twitter</code></td></tr>
</table>

<p>In light of this classification I believe we can say that lookup commands are much more likely to be the first verb in a command chain—conversely, chains such as <code>email hello to Blair and then do ...</code> or <code>twitter hello and then ...</code> are quite unlikely. What is much more likely is for the first verb to be a lookup function.</p>

<table>
<tr><th>first verb type</th><th>second verb type</th><th>example</th></tr>
<tr><td>lookup</td><td>action</td><td><code>translate this to Spanish and email to Aza</code></td>
<tr><td>lookup</td><td>lookup</td><td><code>translate this to English and then find it with Amazon</code></td>
<tr><td>action</td><td>action/lookup</td><td><i>no use case?</i></td>
</table>

<p>Thus in the same way that not all commands have a useful execution<sup id="fnref:3"><a href="#fn:3" rel="footnote">3</a></sup> <strong>perhaps only lookup commands will have a chainable output: the results of the lookup.</strong> Even with this restriction, we will most likely need to implement a new &#8220;chainable output&#8221; method or getter in these commands. This means that commands will need to opt-in to become chainable, but I believe this is a necessary evil.</p>

<p>The second question we must address is <strong>&#8220;when do we establish the noun type of a command&#8217;s chainable output?&#8221;</strong> One unsung but crucial feature of the way Ubiquity works now is that suggestions&#8217; previews are not computed until that suggestion is selected (except for the first suggestion, which in most skins gets previewed immediately). Should we wait for all of the first verbs&#8217; chainable output to be computed and then run them through the <a href="http://mitcho.com/blog/projects/judging-noun-types/">noun type detection system</a>? Or should verbs with chainable output also <em>a priori</em> specify what noun types their output will be?</p>

<p>Both of these approaches have their problems. If we compute the chainable output of the first verb, run a noun type detection on it and <em>then</em> suggest the full combination if it matches what the second verb was expecting, this will have clear performance implications, not to mention that it could greatly complicate our <a href="https://wiki.mozilla.org/Labs/Ubiquity/Parser_2">parsing algorithm</a>. While the latter approach doesn&#8217;t have these performance implications, it does mean that it will have to list (by name or reference) the noun types that will match its output, meaning that if a command author is unaware of someone else&#8217;s noun type, that chain will be impossible, even if the chainable output itself does indeed match that noun type. The <em>a posteriori</em> approach would never have this issue. <strong>What other benefits or problems do you forsee with either of these approaches? Is there another approach which avoids these pitfalls?</strong></p>

<h4>(A)synchronous composability</h4>

<p>Once we have the noun types, parsing, and suggestions down, all that remains is to compute the previews and implement the composite execution. Since the Ubiquity command manager already wraps the preview and execute functions in a wrapper to facilitate localization, among other uses, it would be easy to make the command manager <a href="http://www.croczilla.com/blog/16">compose asynchronous processes pseudo-synchronously</a>. No major changes should be necessary to do the previews and executions, though, again, there will be a performance cost.</p>

<h3>Conclusion</h3>

<p>There are a number of technical questions which must be answered, mostly in the parsing/suggesting stage. The key questions to answer are:</p>

<ol>
<li>What is the chaining output of a command?</li>
<li>When do we establish the noun type of a command&#8217;s chainable output?</li>
</ol>

<p>I&#8217;ll make another post soon on the linguistic considerations necessary in making command chaining happen in a <a href="http://mitcho.com/blog/projects/how-natural-should-a-natural-interface-be/">natural</a> fashion.</p>

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

<li id="fn:1">
<p>We&#8217;re going to limit our discussion here to this restriction that the two verbs are not simply two simultaneous commands, but two commands which operate successively on an input, i.e., that it is true piping. This for example rules out input such as <code>google dogs and translate cat to Spanish</code>, as the second command&#8217;s execution does not semantically depend on the first&#8217;s execution. This (hopefully uncontroversial) decision also affects the linguistic considerations to be made in my next post.&#160;<a href="#fnref:1" rev="footnote">&#8617;</a></p>
</li>

<li id="fn:2">
<p>If you know of a command which doesn&#8217;t neatly fit into &#8220;lookup&#8221; or &#8220;action&#8221;, please let me know.&#160;<a href="#fnref:2" rev="footnote">&#8617;</a></p>
</li>

<li id="fn:3">
<p>I believe we should mark these no-execution lookup commands visually so the user does not expect anything to happen if they execute it. This is <a href="http://ubiquity.mozilla.com/trac/ticket/651">trac #651</a>.&#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/link/command-chaining-with-oni/' rel='bookmark' title='Command Chaining with Oni?'>Command Chaining with Oni?</a></li>
<li><a href='http://mitcho.com/blog/projects/ubiquity-commands-by-the-numbers/' rel='bookmark' title='Ubiquity Commands by The Numbers'>Ubiquity Commands by The Numbers</a></li>
<li><a href='http://mitcho.com/blog/projects/ubiquity-parser-the-next-generation-demo/' rel='bookmark' title='Ubiquity Parser: The Next Generation Demo'>Ubiquity Parser: The Next Generation 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/projects/exploring-command-chaining-in-ubiquity-part-1/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Ubiquity Commands by The Numbers</title>
		<link>http://mitcho.com/blog/projects/ubiquity-commands-by-the-numbers/</link>
		<comments>http://mitcho.com/blog/projects/ubiquity-commands-by-the-numbers/#comments</comments>
		<pubDate>Wed, 01 Apr 2009 03:11:55 +0000</pubDate>
		<dc:creator>mitcho</dc:creator>
				<category><![CDATA[projects]]></category>
		<category><![CDATA[arguments]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[data]]></category>
		<category><![CDATA[herd]]></category>
		<category><![CDATA[localization]]></category>
		<category><![CDATA[Mozilla Planet]]></category>
		<category><![CDATA[nountypes]]></category>
		<category><![CDATA[parser]]></category>
		<category><![CDATA[ubiquity]]></category>
		<category><![CDATA[verbs]]></category>

		<guid isPermaLink="false">http://mitcho.com/blog/?p=1718</guid>
		<description><![CDATA[Recent work in the Ubiquity internationalization realm has focused on the upcoming Ubiquity parser which will bring some great new features to Ubiquity, including support for overlord verbs and semi-automatic localization of commands via semantic roles. It&#8217;s possible, though, that these new features will break backwards compatibility of the current command specification and noun types. [...]
Related posts:<ol>
<li><a href='http://mitcho.com/blog/projects/writing-commands-with-semantic-roles/' rel='bookmark' title='Writing commands with semantic roles'>Writing commands with semantic roles</a></li>
<li><a href='http://mitcho.com/blog/projects/ubiquity-parser-the-next-generation-demo/' rel='bookmark' title='Ubiquity Parser: The Next Generation Demo'>Ubiquity Parser: The Next Generation Demo</a></li>
<li><a href='http://mitcho.com/blog/projects/ubiquity-in-firefox-japanese/' rel='bookmark' title='Ubiquity in Firefox: Focus on Japanese'>Ubiquity in Firefox: Focus on Japanese</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>Recent work in the Ubiquity internationalization realm has focused on the upcoming Ubiquity parser which will bring some great new features to Ubiquity, including support for <a href="http://jonoscript.wordpress.com/2009/01/24/overlord-verbs-a-proposal/">overlord verbs</a> and <a href="http://mitcho.com/blog/projects/writing-commands-with-semantic-roles/">semi-automatic localization of commands via semantic roles</a>. It&#8217;s possible, though, that these new features will break backwards compatibility of the current command specification and noun types. <a href="http://en.wikipedia.org/wiki/Creative destruction">Creative destruction</a> for the win.</p>

<p>As we look to <a href="http://groups.google.com/group/ubiquity-i18n/browse_thread/thread/22fa223f43ef6262">move forward</a> with incorporating <a href="http://mitcho.com/code/ubiquity/parser-demo/">the next generation parser</a> into Ubiquity proper, it thus becomes important to take a look at the current command ecosystem to see how possibly disruptive this move will be. To this end last night I wrote a quick perl script to scrape the commands cached on <a href="http://ubiquity.mozilla.com/herd/">the herd</a> and get some quantitative answers to my questions.</p>

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

<p>(1577 different verbs were analyzed. None of these computations below are weighted by feed popularity.)</p>

<h3>Q: Are there a lot of commands which use more than one argument?</h3>

<p>A: The vast majority (>85%) of commands take one or no arguments, requiring no modifiers. Only those remaining 15% will require a switch to refer to different arguments by <a href="http://mitcho.com/blog/projects/writing-commands-with-semantic-roles/">semantic role</a>.</p>

<p><center><img src="http://mitcho.com/blog/wp-content/uploads/2009/03/herdcommands.png" alt="herdcommands.png" border="0" width="500" height="355" /></center></p>

<h3>Q: Do many commands introduce custom noun types?</h3>

<p>A: 147 different noun types (lumping anonymous inline objects as one type) were detected. The vast majority of all <code>takes</code> (direct object) arguments were of type <code>noun_arb_text</code>, although many <code>modifiers</code> arguments used custom noun types. The other standard (built-in) noun types are well represented as well, with <code>noun_type_language</code> coming in at second place. Here&#8217;s a chart with all the noun types which had more than one use.</p>

<div style='overflow-y: auto; max-height: 300px;'><center><img src="http://mitcho.com/blog/wp-content/uploads/2009/03/herdnountypes1.png" alt="herdnountypes.png" border="0" width="550" height="846" /></center></div>

<h3>Q: Are commands with <code>modifiers</code> using natural-language delimiters?</h3>

<p>A: Most of the modifiers detected were English prepositions such as &#8220;from&#8221;, &#8220;to&#8221;, &#8220;as&#8221;, &#8220;with&#8221;, but other words were also seen such as &#8220;title&#8221;, &#8220;type&#8221;, &#8220;username&#8221;, and &#8220;message&#8221; and even a handful of commands with symbols such as &#8220;@&#8221;, &#8220;>&#8221;, or &#8220;#&#8221;.</p>
<p>Related posts:</p><ol>
<li><a href='http://mitcho.com/blog/projects/writing-commands-with-semantic-roles/' rel='bookmark' title='Writing commands with semantic roles'>Writing commands with semantic roles</a></li>
<li><a href='http://mitcho.com/blog/projects/ubiquity-parser-the-next-generation-demo/' rel='bookmark' title='Ubiquity Parser: The Next Generation Demo'>Ubiquity Parser: The Next Generation Demo</a></li>
<li><a href='http://mitcho.com/blog/projects/ubiquity-in-firefox-japanese/' rel='bookmark' title='Ubiquity in Firefox: Focus on Japanese'>Ubiquity in Firefox: Focus on Japanese</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/ubiquity-commands-by-the-numbers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Where&#8217;s The Verb?</title>
		<link>http://mitcho.com/blog/observation/wheres-the-verb/</link>
		<comments>http://mitcho.com/blog/observation/wheres-the-verb/#comments</comments>
		<pubDate>Wed, 25 Mar 2009 07:10:20 +0000</pubDate>
		<dc:creator>mitcho</dc:creator>
				<category><![CDATA[observation]]></category>
		<category><![CDATA[commands]]></category>
		<category><![CDATA[infinitive]]></category>
		<category><![CDATA[linguistics]]></category>
		<category><![CDATA[Mozilla Planet]]></category>
		<category><![CDATA[parser]]></category>
		<category><![CDATA[subjunctive]]></category>
		<category><![CDATA[typology]]></category>
		<category><![CDATA[ubiquity]]></category>
		<category><![CDATA[verb-final]]></category>
		<category><![CDATA[verbs]]></category>

		<guid isPermaLink="false">http://mitcho.com/blog/?p=1647</guid>
		<description><![CDATA[Ubiquity&#8217;s proposed new parser design is based on a principles and parameters philosophy: we can build an underlying universal parser and, for each individual language, we simply set some &#8220;parameters&#8221; to tell the parser how to act. As we consider the design&#8217;s pros and cons, it&#8217;s important to reflect back on the linguistic data and [...]
Related posts:<ol>
<li><a href='http://mitcho.com/blog/projects/ubiquity-i18n-questions-to-ask/' rel='bookmark' title='Ubiquity i18n: questions to ask'>Ubiquity i18n: questions to ask</a></li>
<li><a href='http://mitcho.com/blog/projects/ubiquity-parser-the-next-generation-demo/' rel='bookmark' title='Ubiquity Parser: The Next Generation Demo'>Ubiquity Parser: The Next Generation Demo</a></li>
<li><a href='http://mitcho.com/blog/projects/contribute-how-your-language-identifies-its-arguments/' rel='bookmark' title='Contribute: how your language identifies its arguments'>Contribute: how your language identifies its arguments</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>Ubiquity&#8217;s <a href="https://wiki.mozilla.org/User:Mitcho/ParserTNG">proposed new parser design</a> is based on a <a href="http://en.wikipedia.org/wiki/principles and parameters">principles and parameters</a> philosophy: we can build an underlying universal parser and, for each individual language, we simply set some &#8220;parameters&#8221; to tell the parser how to act. As we consider the design&#8217;s pros and cons, it&#8217;s important to reflect back on the linguistic data and see if this architecture can adequately handle the range of linguistic data attested in our languages.</p>

<p>Today I&#8217;ll examine highlight some disparate typological data to help us understand these questions: <strong>where&#8217;s the verb?</strong> and <strong>what does the verb look like?</strong>
<span id="more-1647"></span>
There are broadly three different verb forms taken in commands in different languages:<sup id="fnref:1"><a href="#fn:1" rel="footnote">1</a></sup></p>

<ol>
<li>the <a href="http://en.wikipedia.org/wiki/infinitive">infinitive</a>,</li>
<li><a href="http://en.wikipedia.org/wiki/subjunctive mood">subjunctive mood</a>, or</li>
<li>a special verb form such as <a href="http://en.wikipedia.org/wiki/imperative">imperative</a>, <a href="http://en.wikipedia.org/wiki/participial">participial</a>, or conjunctive (such as Japanese <a href="http://en.wikipedia.org/wiki/Japanese verb conjugations#Te_form">て form</a>)</li>
</ol>

<p>Let&#8217;s give an example of each:</p>

<p><strong>Infinitive</strong> (English):<sup id="fnref:2"><a href="#fn:2" rel="footnote">2</a></sup></p>


<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="english" style="font-family:monospace;">Hit me!</pre></td></tr></table></div>


<p><strong>Subjunctive mood</strong> (Modern Greek): &#8220;Eat it all!&#8221;</p>


<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>2
3
</pre></td><td class="code"><pre class="english" style="font-family:monospace;">Na   to fas olo!
SUBJ it eat all</pre></td></tr></table></div>


<p><strong>Imperative form</strong> (French): &#8220;Eat it!&#8221;</p>


<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>4
5
</pre></td><td class="code"><pre class="french" style="font-family:monospace;">Mange   -le!
eat.IMP it</pre></td></tr></table></div>


<p>It&#8217;s important to note that some languages have <em>multiple forms available</em> for the same command. For example:</p>

<p><strong>Dutch</strong>: three ways to say &#8220;watch out!&#8221; with the same verb</p>

<ol>
<li>Infinitive: <code>Oppassen!</code></li>
<li>Imperative: <code>Pas op!</code></li>
<li>Participial: <code>Opgepast!</code></li>
</ol>

<p>Similarly, I received <a href="http://mitcho.com/blog/projects/ubiquity-i18n-questions-to-ask/#comment-974">a great comment by PhiliKON</a> on German and <a href="http://mitcho.com/blog/projects/ubiquity-i18n-questions-to-ask/#comment-980">associated data by Robert Kaiser</a> on my blog post yesterday:</p>

<p><strong>German</strong>: &#8220;search hello with google&#8221;</p>

<ol>
<li>Infinitive: <code>hello mit google suchen</code></li>
<li>Imperative: <code>suche hello mit google</code></li>
</ol>

<p>In addition, German and Dutch are interesting as they are <a href="http://en.wikipedia.org/wiki/V2 word order">verb second (V2)</a> languages, so the verb may surface at the beginning or the end of the sentence, depending on the form.</p>

<p>The <a href="https://wiki.mozilla.org/User:Mitcho/ParserTNG">new parser design</a> (which <a href="http://mitcho.com/code/ubiquity/parser-demo/">you can demo</a>) assumes for simplicity that the verb should be found at the beginning or the end of the input, which is consistent with the data I&#8217;ve seen (modulo <a href="http://en.wikipedia.org/wiki/Clitic#Clitics_in_Romance_languages">clitics</a>). Multiple verb forms could be accounted for by supporting &#8220;synonyms&#8221; of the verbs.</p>

<p><strong>What are the different ways verbs are expressed in commands in your language? Is the verb always found at the beginning or the end of the sentence? Is it ever somewhere in the middle?</strong></p>

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

<li id="fn:1">
<p>Some of the data and theoretical support for this section comes from, among other sources, Sabine Iatridou&#8217;s <a href="http://web.mit.edu/linguistics/people/faculty/iatridou/de_modo_imperativo.pdf">De Modo Imperativo</a> lecture notes.&#160;<a href="#fnref:1" rev="footnote">&#8617;</a></p>
</li>

<li id="fn:2">
<p>Many refer to this in English as an &#8220;imperative form,&#8221; but in Modern English this is arguably the same as the infinitive.&#160;<a href="#fnref:2" rev="footnote">&#8617;</a></p>
</li>

</ol>
</div>
<p>Related posts:</p><ol>
<li><a href='http://mitcho.com/blog/projects/ubiquity-i18n-questions-to-ask/' rel='bookmark' title='Ubiquity i18n: questions to ask'>Ubiquity i18n: questions to ask</a></li>
<li><a href='http://mitcho.com/blog/projects/ubiquity-parser-the-next-generation-demo/' rel='bookmark' title='Ubiquity Parser: The Next Generation Demo'>Ubiquity Parser: The Next Generation Demo</a></li>
<li><a href='http://mitcho.com/blog/projects/contribute-how-your-language-identifies-its-arguments/' rel='bookmark' title='Contribute: how your language identifies its arguments'>Contribute: how your language identifies its arguments</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/observation/wheres-the-verb/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Ubiquity Parser: The Next Generation Demo</title>
		<link>http://mitcho.com/blog/projects/ubiquity-parser-the-next-generation-demo/</link>
		<comments>http://mitcho.com/blog/projects/ubiquity-parser-the-next-generation-demo/#comments</comments>
		<pubDate>Wed, 18 Mar 2009 03:13:17 +0000</pubDate>
		<dc:creator>mitcho</dc:creator>
				<category><![CDATA[projects]]></category>
		<category><![CDATA[algorithm]]></category>
		<category><![CDATA[arguments]]></category>
		<category><![CDATA[California]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[interface]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Mozilla Planet]]></category>
		<category><![CDATA[overlord verbs]]></category>
		<category><![CDATA[parser]]></category>
		<category><![CDATA[photo]]></category>
		<category><![CDATA[proposal]]></category>
		<category><![CDATA[semantic role]]></category>
		<category><![CDATA[ubiquity]]></category>
		<category><![CDATA[verb-final]]></category>
		<category><![CDATA[verbs]]></category>

		<guid isPermaLink="false">http://mitcho.com/blog/?p=1590</guid>
		<description><![CDATA[A week or two ago while visiting California, Jono and I had a productive charrette, resulting in a new architecture proposal for the Ubiquity parser, as laid out in Ubiquity Parser: The Next Generation. The new architecture is designed to support (1) the use of overlord verbs, (2) writing verbs by semantic roles, and (3) [...]
Related posts:<ol>
<li><a href='http://mitcho.com/blog/projects/writing-commands-with-semantic-roles/' rel='bookmark' title='Writing commands with semantic roles'>Writing commands with semantic roles</a></li>
<li><a href='http://mitcho.com/blog/projects/ubiquity-in-firefox-japanese/' rel='bookmark' title='Ubiquity in Firefox: Focus on Japanese'>Ubiquity in Firefox: Focus on Japanese</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://mitcho.com/blog/wp-content/uploads/2009/03/parserdesign.jpg' rel='lightbox[parser]'><img src="http://mitcho.com/blog/wp-content/uploads/2009/03/parserdesign.jpg" alt="parserdesign" title="parserdesign" width="600" height="450" class="limages" /></a></p>

<p>A week or two ago while visiting California, <a href="http://jonoscript.wordpress.com">Jono</a> and I had a productive charrette, resulting in a new architecture proposal for the Ubiquity parser, as laid out in <a href="https://wiki.mozilla.org/User:Mitcho/ParserTNG">Ubiquity Parser: The Next Generation</a>. The new architecture is designed to support (1) the use of <a href="http://jonoscript.wordpress.com/2009/01/24/overlord-verbs-a-proposal/">overlord verbs</a>, (2) <a href="http://mitcho.com/blog/projects/writing-commands-with-semantic-roles/">writing verbs by semantic roles</a>, and (3) better suggestions for <a href="http://mitcho.com/blog/projects/ubiquity-in-firefox-japanese/">verb-final languages</a> and other argument-first contexts. I&#8217;m happy to say that I&#8217;ve spent some time putting a proof-of-concept together.</p>

<p>I&#8217;ve implemented the basic algorithm of this parser for <a href="http://en.wikipedia.org/wiki/left-branching">left-branching</a> languages (like English) and also implemented some fake English verbs, noun types, and semantic roles. This demo should give you a basic sense of how this parser will attempt to identify different types of arguments and check their noun types even without clearly knowing the verb. This should make the suggestion ranking much smarter, particularly for verb-final contexts. (For a good example, try <code>from Tokyo to San Francisco</code>.)</p>

<h3><a href="http://mitcho.com/code/ubiquity/parser-demo/">➔ Check out the Ubiquity next-gen parser demo</a></h3>

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

<p>Clicking on the <em>environment info</em> will give you some information on the specific verbs, noun types, and roles implemented. You can also scroll through the <em>current parse</em> section to see the step by step derivation of how the suggested parses were constructed.</p>

<p>I&#8217;ll be flying about 15 hours in the next hour as I make my way back to Japan&#8230; hopefully I&#8217;ll make some more progress on the plane! I&#8217;ll look forward to your comments! <em>For those of you interested in checking out the code yourself, you can find it on <a href="http://bitbucket.org/mitcho/ubiquity-playground/">BitBucket</a>.</em></p>
<p>Related posts:</p><ol>
<li><a href='http://mitcho.com/blog/projects/writing-commands-with-semantic-roles/' rel='bookmark' title='Writing commands with semantic roles'>Writing commands with semantic roles</a></li>
<li><a href='http://mitcho.com/blog/projects/ubiquity-in-firefox-japanese/' rel='bookmark' title='Ubiquity in Firefox: Focus on Japanese'>Ubiquity in Firefox: Focus on Japanese</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/projects/ubiquity-parser-the-next-generation-demo/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>Writing commands with semantic roles</title>
		<link>http://mitcho.com/blog/projects/writing-commands-with-semantic-roles/</link>
		<comments>http://mitcho.com/blog/projects/writing-commands-with-semantic-roles/#comments</comments>
		<pubDate>Tue, 24 Feb 2009 08:05:23 +0000</pubDate>
		<dc:creator>mitcho</dc:creator>
				<category><![CDATA[projects]]></category>
		<category><![CDATA[argument structure]]></category>
		<category><![CDATA[arguments]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[coding properties]]></category>
		<category><![CDATA[Mozilla Planet]]></category>
		<category><![CDATA[parser]]></category>
		<category><![CDATA[proposal]]></category>
		<category><![CDATA[semantic role]]></category>
		<category><![CDATA[ubiquity]]></category>
		<category><![CDATA[verbs]]></category>

		<guid isPermaLink="false">http://mitcho.com/blog/?p=1497</guid>
		<description><![CDATA[Thank you to everyone who contributed data to how your language identifies its arguments! The data collection is ongoing so please contribute data points for languages you know! How Ubiquity identifies its arguments Currently when writing a command in Ubiquity you must specify two properties for each argument: a modifier (the appropriate adposition—the direct object [...]
Related posts:<ol>
<li><a href='http://mitcho.com/blog/projects/three-ways-to-argue-over-arguments/' rel='bookmark' title='Three ways to argue over arguments'>Three ways to argue over arguments</a></li>
<li><a href='http://mitcho.com/blog/projects/contribute-how-your-language-identifies-its-arguments/' rel='bookmark' title='Contribute: how your language identifies its arguments'>Contribute: how your language identifies its arguments</a></li>
<li><a href='http://mitcho.com/blog/projects/ubiquity-in-firefox-japanese/' rel='bookmark' title='Ubiquity in Firefox: Focus on Japanese'>Ubiquity in Firefox: Focus on Japanese</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>Thank you to everyone who contributed data to <a href="http://mitcho.com/blog/projects/contribute-how-your-language-identifies-its-arguments/">how your language identifies its arguments</a>! The data collection is ongoing so please contribute data points for languages you know!</em></p>

<h3>How Ubiquity identifies its arguments</h3>

<p>Currently <a href="https://wiki.mozilla.org/Labs/Ubiquity/Ubiquity_0.1_Author_Tutorial">when writing a command</a> in Ubiquity you must specify two properties for each argument: a modifier (the appropriate <a href="http://en.wikipedia.org/wiki/adposition">adposition</a>—the direct object excluded) and the <a href="https://wiki.mozilla.org/Labs/Ubiquity/Ubiquity_0.1_Nountypes_Reference">noun type</a>. Here are some quick examples from the standard commands:</p>

<p><code>email</code>:</p>

<ul>
<li>direct object (<code>noun_arb_text</code>)</li>
<li><code>to</code> (<code>noun_type_contact</code>)</li>
</ul>

<p><code>translate</code>:</p>

<ul>
<li>direct object (<code>noun_arb_text</code>)</li>
<li><code>to</code> (<code>noun_type_language</code>)</li>
<li><code>from</code> (<code>noun_type_language</code>)</li>
</ul>

<p>This way of specifying arguments has a few shortcomings. First of all, it requires you to identify each type of argument by unique adposition, which does not support languages with <a href="http://en.wikipedia.org/wiki/case marking">case marking</a> nor languages with sets of synonymous adpositions (e.g. French {à la, au, aux}). Second, as we saw in <a href="http://mitcho.com/blog/projects/contribute-how-your-language-identifies-its-arguments/">how your language identifies its arguments</a> some languages don&#8217;t mark semantic roles on the arguments at all and the current system of specifying arguments is completely incompatible with these languages. Third, the current specification requires command authors to make localized versions of their commands, specifying the language-appropriate modifiers.</p>

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

<p>In a perfect world the last issue could be solved (at least for languages which mark semantic roles with adpositions) by a mapping of English prepositions to the target language adpositions. Indeed, for some adpositions in some languages this may be possible:</p>

<table border='0'>
<tr><th colspan='2'>English/Ubiquity</th><th>Chinese</th><th>Japanese</th></tr>
<tr><td>to</td><td rowspan='2'>=></td><td>到 (dào)</td><td>-に (-ni)</td></tr>
<tr><td>from</td><td>从 (cóng)</td><td>-から (-kara)</td></tr>
</table>

<p>However, some English prepositions do not cleanly map to a particular adpositions. Take, for example, English &#8220;with.&#8221; This &#8220;with&#8221; may map to different markings in Chinese and Japanese depending on the sentence:</p>

<table border='0'>
<tr><th colspan='2'>English</th><th>Chinese</th><th>Japanese</th></tr>
<tr><td>share <strong>with</strong> Jono</td><td rowspan='2'>=></td><td>跟 (gēn)</td><td>-と (-to)</td></tr>
<tr><td>translate <strong>with</strong> Google</td><td>用 (yòng)</td><td>-で (-de)</td></tr>
</table>

<p>Note, however, that which set of markings &#8220;with&#8221; maps to is predictable, as there is a salient semantic difference. The first &#8220;with&#8221; could be referred to as <em>together-with</em> while the second is a <em>using-with</em>. With this distinction, we can easily predict which paradigm the &#8220;with&#8221; in &#8220;search <strong>with</strong> Google&#8221; should use, because these two &#8220;with&#8221; arguments represent two different <em>semantic roles</em>.</p>

<h3>A proposal: identifying arguments by semantic role<sup id="fnref:1"><a href="#fn:1" rel="footnote">1</a></sup></h3>

<p>Suppose commands could specify their arguments by referring to these <em>semantic roles</em> in lieu of adpositions as they currently do. This way, we would be able to automatically map commands into different languages. For example, you could write a new command called <code>move</code> with the following argument structure:</p>

<p><code>move</code>:</p>

<ul>
<li><code>role_object</code> (<code>noun_arb_text</code>)</li>
<li><code>role_goal</code> (<code>noun_type_geolocation</code>)</li>
<li><code>role_source</code> (<code>noun_type_geolocation</code>)</li>
</ul>

<p>The English mapping of &#8221; => <code>role_object</code>, &#8216;to&#8217; => <code>role_goal</code>, &#8216;from&#8217; => <code>role_source</code> could be used to parse the command</p>


<div class="wp_syntax"><div class="code"><pre class="english" style="font-family:monospace;">move truck from Tokyo to Paris</pre></div></div>


<p>In addition, with the Japanese mapping of &#8216;が&#8217; => <code>role_object</code>, &#8216;に&#8217; => <code>role_goal</code>, &#8216;から&#8217; => <code>role_source</code>, you could immediately use the command in Japanese as well:</p>


<div class="wp_syntax"><div class="code"><pre class="japanese" style="font-family:monospace;">東京からパリにトラックをmoveして</pre></div></div>


<p>In essence, this proposal would let command authors get their commands localized <em>for free</em>, as long as they stick to a predefined set of semantic roles. For more complex commands and legacy commands, of course, commands could optionally specify particular English modifiers, but then Ubiquity would simply not attempt to localize those commands.</p>

<p>In addition, each language specific parser would determine how to identify its arguments. This would allow languages with case marking or no role marking on arguments at all to handle their own mapping of arguments to semantic roles and still use shared commands. Even parsers such as English would benefit by letting the parser deal with synonymous prepositions and possibly even argument structure alternations (such as English <a href="http://en.wikipedia.org/wiki/ditransitive alternations">ditransitive alternations</a>).</p>

<p>As a starting point, we could use argument types based on the list of semantic roles given in <a href="http://scholar.google.com/scholar?q=&quot;types+of+lexical+information&quot;+fillmore">Fillmore (1971)</a>:</p>

<ul>
<li>Object: the entity that moves or changes or whose position or existence is in consideration</li>
<li>Result: the entity that comes into existence as a result of the action</li>
<li>Instrument: the stimulus or immediate physical cause of an event</li>
<li>Source: the place from which something moves</li>
<li>Goal: the place to which something moves</li>
<li>Experiencer: the entity which receives or accepts or experiences or undergoes the effect of an action &#8230;</li>
</ul>

<h3>Comments welcome!</h3>

<p><strong>As command authors and Ubiquity users, how do you feel about this proposal? How might this affect, simplify, or complicate the localization of Ubiquity into your language?</strong> Thank you in advance! ^^</p>

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

<li id="fn:1">
<p>Thank you to <a href="http://jonoscript.wordpress.com">Jono</a> and <a href="http://theunfocused.net/">Blair</a> whose comments in <a href="https://wiki.mozilla.org/Labs/Ubiquity/Meetings/2009-02-23_i18n_Meeting">our i18n meeting</a> helped shape this proposal.&#160;<a href="#fnref:1" rev="footnote">&#8617;</a></p>
</li>

</ol>
</div>
<p>Related posts:</p><ol>
<li><a href='http://mitcho.com/blog/projects/three-ways-to-argue-over-arguments/' rel='bookmark' title='Three ways to argue over arguments'>Three ways to argue over arguments</a></li>
<li><a href='http://mitcho.com/blog/projects/contribute-how-your-language-identifies-its-arguments/' rel='bookmark' title='Contribute: how your language identifies its arguments'>Contribute: how your language identifies its arguments</a></li>
<li><a href='http://mitcho.com/blog/projects/ubiquity-in-firefox-japanese/' rel='bookmark' title='Ubiquity in Firefox: Focus on Japanese'>Ubiquity in Firefox: Focus on Japanese</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/writing-commands-with-semantic-roles/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
		<item>
		<title>Friendlier command feed subscription</title>
		<link>http://mitcho.com/blog/projects/friendlier-command-feed-subscription/</link>
		<comments>http://mitcho.com/blog/projects/friendlier-command-feed-subscription/#comments</comments>
		<pubDate>Mon, 23 Feb 2009 07:43:11 +0000</pubDate>
		<dc:creator>mitcho</dc:creator>
				<category><![CDATA[projects]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[discoverability]]></category>
		<category><![CDATA[interface]]></category>
		<category><![CDATA[learnability]]></category>
		<category><![CDATA[mockup]]></category>
		<category><![CDATA[Mozilla Planet]]></category>
		<category><![CDATA[trust]]></category>
		<category><![CDATA[ubiquity]]></category>
		<category><![CDATA[useability]]></category>
		<category><![CDATA[verbs]]></category>

		<guid isPermaLink="false">http://mitcho.com/blog/?p=1488</guid>
		<description><![CDATA[If you&#8217;ve ever subscribed to a new Ubiquity command before, you know the red screen of doom. Ubiquity currently takes users to this page every time they wish to subscribe to a new command. The current design is meant to encourage users to be aware of the possible security implications of enabling and executing a [...]
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/ubiquity-in-firefox-japanese/' rel='bookmark' title='Ubiquity in Firefox: Focus on Japanese'>Ubiquity in Firefox: Focus on Japanese</a></li>
<li><a href='http://mitcho.com/blog/projects/selecting-from-ubiquity/' rel='bookmark' title='selecting from Ubiquity'>selecting from Ubiquity</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><img src="http://mitcho.com/blog/wp-content/uploads/2009/02/doom.png" alt="doom.png" border="0" /></p>

<p>If you&#8217;ve ever subscribed to a new Ubiquity command before, you know the red screen of doom. Ubiquity currently takes users to this page every time they wish to subscribe to a new command. The current design is meant to encourage users to be aware of the possible security implications of enabling and executing a command, to avoid getting a <a href="http://en.wikipedia.org/wiki/trojan horse">trojan horse</a>.</p>

<p>The current screen, however, does not make subscribing to commands foolproof. I personally know I&#8217;ve subscribed to a number of commands without reading through the code, defeating the purpose of the anti-trojan horse display. Moreover, the page doesn&#8217;t give you any information on how you can use this new command. Especially given the inherent limited discoverability of a <a href="http://mitcho.com/blog/projects/how-natural-should-a-natural-interface-be/">natural language interface</a>, taking a moment to help the user actually <em>learn</em> the command becomes key.</p>

<p>Today I did a quick mockup of what a friendlier command feed subscription page might look like. Take a look at this screenshot with some of the features marked:</p>

<p><center><a rel='lightbox[friendlierfeed]' href='http://mitcho.com/blog/wp-content/uploads/2009/02/new-subscription-page.png'><img src="http://mitcho.com/blog/wp-content/uploads/2009/02/new-subscription-page-small.png" alt="new-subscription-page-small.png" class='limages' /></a></center></p>

<p>You can also check out <a href="http://mitcho.com/code/ubiquity/subscriptionmockup/">the page itself</a>. If you&#8217;d like to visualize it without the &#8220;trust&#8221; warning, you can also view <a href="http://mitcho.com/code/ubiquity/subscriptionmockup/?trust=1">the trusted version</a>.</p>

<p>This mockup here is but a first iteration. <strong>What do you think about this subscription page? What is missing? What should be changed?</strong></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/ubiquity-in-firefox-japanese/' rel='bookmark' title='Ubiquity in Firefox: Focus on Japanese'>Ubiquity in Firefox: Focus on Japanese</a></li>
<li><a href='http://mitcho.com/blog/projects/selecting-from-ubiquity/' rel='bookmark' title='selecting from Ubiquity'>selecting from Ubiquity</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/friendlier-command-feed-subscription/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Ubiquity in Firefox: Focus on Japanese</title>
		<link>http://mitcho.com/blog/projects/ubiquity-in-firefox-japanese/</link>
		<comments>http://mitcho.com/blog/projects/ubiquity-in-firefox-japanese/#comments</comments>
		<pubDate>Fri, 20 Feb 2009 11:08:14 +0000</pubDate>
		<dc:creator>mitcho</dc:creator>
				<category><![CDATA[projects]]></category>
		<category><![CDATA[argument structure]]></category>
		<category><![CDATA[arguments]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[interface]]></category>
		<category><![CDATA[Japanese language]]></category>
		<category><![CDATA[linguistics]]></category>
		<category><![CDATA[mockup]]></category>
		<category><![CDATA[Mozilla Planet]]></category>
		<category><![CDATA[parser]]></category>
		<category><![CDATA[ubiquity]]></category>
		<category><![CDATA[verbs]]></category>

		<guid isPermaLink="false">http://mitcho.com/blog/?p=1466</guid>
		<description><![CDATA[One of the eventual goals of the Ubiquity project is to bring some of its functionality and ideas to Firefox proper. To this end, Aza has been exploring some possible options for what that would look like (round 1, round 2). All of his mockups, however, use English examples. I&#8217;m going to start exploring what [...]
Related posts:<ol>
<li><a href='http://mitcho.com/blog/projects/three-ways-to-argue-over-arguments/' rel='bookmark' title='Three ways to argue over arguments'>Three ways to argue over arguments</a></li>
<li><a href='http://mitcho.com/blog/projects/contribute-how-your-language-identifies-its-arguments/' rel='bookmark' title='Contribute: how your language identifies its arguments'>Contribute: how your language identifies its arguments</a></li>
<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>
</ol>

Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>One of the eventual goals of the <a href="http://ubiquity.mozilla.com">Ubiquity project</a> is to bring some of its functionality and ideas to Firefox proper. To this end, <a href="http://azarask.in">Aza</a> has been exploring some possible options for what that would look like (<a href="http://www.azarask.in/blog/post/ubiquity-in-firefox-round-1/">round 1</a>, <a href="http://www.azarask.in/blog/post/ubiquity-in-the-firefox-round-2/">round 2</a>). All of his mockups, however, use English examples. I&#8217;m going to start exploring what Ubiquity in Firefox might look like in different kinds of languages. Let&#8217;s kick this off with my mother tongue, Japanese.<sup id="fnref:1"><a href="#fn:1" rel="footnote">1</a></sup></p>

<p><em>今後多様な言語に対応したFirefox内のUbiquityを検討していきますが、その中でも今日は日本語をとりあげます。後日日本語で同じ内容を投稿するつもりです。^^</em> <strong>日本語でのコメントも大歓迎です！</strong></p>

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

<h3>What commands look like in Japanese</h3>

<p>Japanese is not only just a verb-final language but it is strongly <a href="http://en.wikipedia.org/wiki/head-final">head-final</a>, meaning it has postpositions instead of prepositions, direct objects come before verbs, and adjectives precede nouns. In terms of <a href="http://mitcho.com/blog/projects/three-ways-to-argue-over-arguments/">how it identifies its arguments</a>, every argument has a postposition/case marker (called a <em>particle</em> in the Japanese literature) which marks its role in the sentence.</p>

<p>A couple common particles we&#8217;ll look at in this example include -を (<em>-o</em>) which marks the direct object (accusative case, you might say) and -に (<em>-ni</em>) which acts like English &#8220;to&#8221; (dative case). The example sentence we&#8217;ll look at today is:</p>

<table border='0'>
<tr><td>ケーキを</td><td>ブレアに</td><td>送って</td><td>(ください)</td></tr>
<tr><td><em>kēki-o</em></td><td><em>burea-ni</em></td><td><em>okuʔte</em></td><td><em>kudasai</em></td></tr>
<tr><td>cake.ACC</td><td>Blair.DAT</em></td><td>send.IMP</td><td>&#8220;please&#8221;</td></tr>
<tr><td colspan='4'>&#8220;Please send a cake to Blair.&#8221;</td></tr>
</table>

<p>(Note: ʔ is a <a href="http://en.wikipedia.org/wiki/glottal stop">glottal stop</a>. ACC=accusative, DAT=dative, and IMP=imperative form.)</p>

<p>That final ください is often dropped in very casual speech and, as it adds no new information, we&#8217;ll assume today that the user will not enter it. Finally, Japanese doesn&#8217;t use spaces in their orthography, so the actual input would be &#8220;ケーキをブレアに送って&#8221;.</p>

<h3>Mockup 1: Particle identification</h3>

<p>One of the major hurdles in working with Japanese is that there are no spaces between the words. The natural first step is to split the sentence up into words, but this is a very difficult problem in <a href="http://en.wikipedia.org/wiki/Natural Language Processing">NLP</a> which <a href="http://research.microsoft.com/en-us/projects/japanesenlp/default.aspx">big name research groups</a> actively work on.</p>

<p>Fortunately, however, in <a href="http://www.azarask.in/blog/post/solving-the-it-problem/">&#8220;Solving the &#8216;It&#8217; Problem&#8221;</a> Aza suggests that, when we encounter ambiguity in our input, we can <em>go ask the user</em>. Great minds think alike, and computer scientist <a href="http://en.wikipedia.org/wiki/Jean E. Sammet">Jean E. Sammet</a> suggested the same idea <a href="http://doi.acm.org/10.1145/365230.365274">way back in 1953</a>:</p>

<blockquote>
  <p>Using English [or any other natural language] definitely involves the requirement for the computer (or more accurately its programming system) to query the user about any possible ambiguity.</p>
</blockquote>

<p>Parsing a sentence into words, in the limited context of Ubiquity, is really about identifying the particles which mark the end of each argument. Here&#8217;s a mockup of an application of the Sammet-Raskin Method to this problem:</p>

<p><center><img src="http://mitcho.com/blog/wp-content/uploads/2009/02/particle-id.png" alt="particle-id.png" border="0" /></center></p>

<p><strong>Pros:</strong> This completely takes care of the word-breaking problem, with minimal arbitration from the user. The parser knows <em>exactly</em> what arguments it&#8217;s dealing with and the visual feedback means the user won&#8217;t be surprised by the parse.</p>

<p><strong>Cons:</strong> Most of the particles/postpositions we&#8217;d have to deal with are a single character, so they may show up pretty often within words, in which case it would be quite annoying to have to press escape after each one.</p>

<p>An even smarter system, when wanting to mark a character as a particle, would first check to see that the argument (before the particle) is a valid argument type for that particle. If the check fails, it doesn&#8217;t have to bother with suggesting that character as a particle. This may cut down on the false positives.</p>

<h3>Smart suggestions: what works, what doesn&#8217;t</h3>

<p>One of the key suggestions in Aza&#8217;s mockups include a way to choose the prepositions while entering your arguments, based on the current verb.</p>

<p>For example, here, the <code>translate</code> command accepts a direct object, a <em>to</em>-object, and a <em>from</em>-object, so little <code>to</code> and <code>from</code> markers magically show up on the right side, making the appropriate prepositions (and by extension the appropriate arguments) discoverable. I think this line of thinking is a really good one, at least for English.</p>

<p><center><a class='limages' rel='lightbox[verbfinal]' href='http://farm4.static.flickr.com/3359/3272673947_05b4a21881_o.jpg'><img src='http://farm4.static.flickr.com/3359/3272673947_14b59c2aa1.jpg'></a></center></p>

<p><strong>In a verb-final language, however, you enter the arguments first and then the verb, making this strategy of suggesting appropriate arguments impossible.</strong> Note that in the user-contributed spreadsheet of <a href="http://mitcho.com/blog/projects/contribute-how-your-language-identifies-its-arguments/">how languages identify their arguments</a> we see that about a quarter of the languages we looked at are verb-final—that is, with Subject-Object-Verb canonical word order.</p>

<p>Instead of seeing this as a disadvantage, however, let&#8217;s see what verb-final order <em>allows</em> us to do.</p>

<h3>Mockup 2: A different kind of suggestion</h3>

<p>Not all verbs allow for every different kind of particle. For example, it doesn&#8217;t make sense to have a -に (<em>-ni</em>, &#8220;to&#8221; or dative) argument for a verb like 検索して (<em>kensaku-shite</em>, &#8220;search for&#8221;). In English we used this to suggest different types of arguments given a specific verb. In a verb-final language, we could do this <em>backwards</em>.</p>

<p><center><img src="http://mitcho.com/blog/wp-content/uploads/2009/02/verb-suggestion.png" alt="verb-suggestion.png" border="0" /></center></p>

<p><strong>Pros:</strong> This makes verbs highly discoverable, given a certain argument structure. For example, if you enter a few arguments, like a direct object, a &#8220;to&#8221; argument, and a &#8220;from&#8221; argument, it&#8217;ll suggest verbs that will do something to an object from somewhere to somewhere else. This way, you can easily try out verbs you didn&#8217;t even know existed. It&#8217;ll only give you verbs appropriate for your arguments, reducing the chance of writing a an infelicitous command.</p>

<p><strong>Cons:</strong> Without knowing what kinds of actions are available, it may be difficult to know what kinds of arguments to enter in the first place. If you have a specific verb or service you want to use it may be counterintuitive or downright tricky to start by guessing the right set of arguments.</p>

<p>In addition, from a technical point of view, this requires much of the prediction algorithms in English Ubiquity to run backwards. Ideally, there would be a closed (predetermined) class of particles and a predefined set of noun types. Verbs would not be able to define their own modifiers and noun classes as easily or freely as they can now.</p>

<h3>Conclusion</h3>

<p>The properties and challenges of Japanese grammar require that we not try to outright copy the English behavior but to think about what really makes sense in that language and that may be an important lesson as we move toward designing a localizable Ubiquity. Please post your questions and criticisms of this design or post your own mockups!</p>

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

<li id="fn:1">
<p>Happy <a href="http://www.un.org/depts/dhl/language/index.html">International Mother Language Day</a>! ^^&#160;<a href="#fnref:1" rev="footnote">&#8617;</a></p>
</li>

</ol>
</div>
<p>Related posts:</p><ol>
<li><a href='http://mitcho.com/blog/projects/three-ways-to-argue-over-arguments/' rel='bookmark' title='Three ways to argue over arguments'>Three ways to argue over arguments</a></li>
<li><a href='http://mitcho.com/blog/projects/contribute-how-your-language-identifies-its-arguments/' rel='bookmark' title='Contribute: how your language identifies its arguments'>Contribute: how your language identifies its arguments</a></li>
<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>
</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/ubiquity-in-firefox-japanese/feed/</wfw:commentRss>
		<slash:comments>86</slash:comments>
		</item>
		<item>
		<title>Three ways to argue over arguments</title>
		<link>http://mitcho.com/blog/projects/three-ways-to-argue-over-arguments/</link>
		<comments>http://mitcho.com/blog/projects/three-ways-to-argue-over-arguments/#comments</comments>
		<pubDate>Wed, 18 Feb 2009 03:26:05 +0000</pubDate>
		<dc:creator>mitcho</dc:creator>
				<category><![CDATA[projects]]></category>
		<category><![CDATA[agreement]]></category>
		<category><![CDATA[ambiguity]]></category>
		<category><![CDATA[Ancient Greek]]></category>
		<category><![CDATA[argument structure]]></category>
		<category><![CDATA[arguments]]></category>
		<category><![CDATA[case]]></category>
		<category><![CDATA[Chinese]]></category>
		<category><![CDATA[coding properties]]></category>
		<category><![CDATA[English]]></category>
		<category><![CDATA[grammatical relations]]></category>
		<category><![CDATA[Hungarian]]></category>
		<category><![CDATA[Japanese language]]></category>
		<category><![CDATA[linguistics]]></category>
		<category><![CDATA[Mandarin]]></category>
		<category><![CDATA[Mozilla Planet]]></category>
		<category><![CDATA[ubiquity]]></category>
		<category><![CDATA[verbs]]></category>
		<category><![CDATA[word order]]></category>

		<guid isPermaLink="false">http://mitcho.com/blog/?p=1413</guid>
		<description><![CDATA[UPDATE: Contribute information on how your language identifies its arguments here. When we execute a command in Ubiquity, in very simple terms, we&#8217;re hoping to do something (a verb) to some arguments (the nouns). Every sentence in every language uses some method to encode which arguments correspond to which roles of the verb. Here are [...]
Related posts:<ol>
<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>
<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/gaba-shame-on-you/' rel='bookmark' title='Gaba, Shame On You'>Gaba, Shame On You</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>UPDATE: Contribute information on how your language identifies its arguments <a href="http://mitcho.com/blog/projects/contribute-how-your-language-identifies-its-arguments/">here</a>.</em></p>

<p>When we execute a command in Ubiquity, in very simple terms, we&#8217;re hoping to do something (a verb) to some arguments (the nouns). Every sentence in every language uses some method to encode which arguments correspond to which roles of the verb. Here are a couple examples:</p>


<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
</pre></td><td class="code"><pre class="english" style="font-family:monospace;">He sees Mary.
彼が Maryを 見る。 (Kare-ga Mary-o miru.)</pre></td></tr></table></div>


<p>As speakers of English, you can read sentence (1) above and know exactly who is doing the seeing and who is being seen and speakers of Japanese can get the same information from (2). <strong>How do different languages code for arguments in different roles?</strong> There are, broadly speaking, three different ways:</p>

<p><center><img src="http://mitcho.com/blog/wp-content/uploads/2009/02/threeways.png" alt="three ways to code for arguments in different roles" border="0" width="536" height="284" /></center></p>

<p>We&#8217;ll take a brief look today at these three different strategies, all of which <a href="http://www.azarask.in/blog/post/scaling-ubiquity-to-60-languages-we-need-your-help/">a localizeable natural language interface</a> will surely encounter.</p>

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

<h3>Word order</h3>

<p>In many languages, the position of the arguments relative to one another and to the verb determine the roles which each argument will play. Mandarin Chinese is a good example of such a language:</p>


<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>3
4
</pre></td><td class="code"><pre class="chinese" style="font-family:monospace;">他 喜欢 Mary (Ta xihuan Mary)
Mary 喜欢 他 (Mary xihuan ta)</pre></td></tr></table></div>


<p>Here, sentence (3) says &#8220;he likes Mary&#8221; while sentence (4) says &#8220;Mary likes him&#8221;. Simply reversing the positions of &#8220;he/him&#8221; and &#8220;Mary&#8221; we&#8217;re able to flip the roles that they fill in the sentence: that of the person who does the liking and the person who is being liked. Now take a look at sentence (5) which means &#8220;John says &#8216;hello&#8217; to Mary.&#8221;</p>


<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>5
</pre></td><td class="code"><pre class="chinese" style="font-family:monospace;">John 告诉 Mary &quot;你 好&quot; (John gaosu Mary &quot;ni hao&quot;)</pre></td></tr></table></div>


<p>We note here that, while in English we used a different strategy of marking one argument (we marked the &#8220;hello&#8221; argument with &#8220;to&#8221;), Chinese doesn&#8217;t mark either of the arguments. There is, however, a clearly defined order to the arguments, which you might encode this way:</p>


<div class="wp_syntax"><div class="code"><pre class="code" style="font-family:monospace;">say [who you're speaking to] [what you're saying]</pre></div></div>


<p>If you swap the order of the two objects in this sentence, it becomes ungrammatical. (<strong>Note:</strong> the asterisk * here means the sentence is <em>ungrammatical</em>.)</p>


<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>5
</pre></td><td class="code"><pre class="chinese" style="font-family:monospace;">* John 告诉 &quot;你 好&quot; Mary (John gaosu &quot;ni hao&quot; Mary)</pre></td></tr></table></div>


<p>Here, the word order dictates that &#8220;你好&#8221; must be &#8220;who you&#8217;re speaking to&#8221; and &#8220;Mary&#8221; must be &#8220;what you&#8217;re saying,&#8221; but that doesn&#8217;t make sense, so the sentence is ungrammatical.</p>

<h3>Marking the arguments</h3>

<p>Another possible strategy is to mark each argument (or some of the arguments) so that each argument&#8217;s role is clear. In many languages this is done with <a href="http://en.wikipedia.org/wiki/case marking">case marking</a>. Take for example this Ancient Greek sentence with its English gloss on line (6). Here, NOM refers to <a href="http://en.wikipedia.org/wiki/nominative case">nominative case</a> and ACC refers to <a href="http://en.wikipedia.org/wiki/accusative case">accusative case</a>.<sup id="fnref:2"><a href="#fn:2" rel="footnote">1</a></sup></p>


<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>5
6
</pre></td><td class="code"><pre class="ancient-greek" style="font-family:monospace;">ho  didaskal-os  paideuei to  paidi-on  (SVO)
the teacher -NOM teaches  the boy  -ACC</pre></td></tr></table></div>


<p>This sentence means &#8220;the teacher instructs the boy.&#8221; While sentence (5) is in Subject-Verb-Object order, any of the six possible orderings of {subject, verb, object} are also grammatical and mean the same thing:<sup id="fnref:1"><a href="#fn:1" rel="footnote">2</a></sup></p>


<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>7
8
9
10
11
</pre></td><td class="code"><pre class="ancient-greek" style="font-family:monospace;">ho didaskalos to paidion paideuei (SOV)
paideuei ho didaskalos to paidion (VSO)
paideuei to paidion ho didaskalos (VOS)
to paidion ho didaskalos paideuei (OSV)
to paidion paideuei ho didaskalos (OVS)</pre></td></tr></table></div>


<p>Many languages also use <a href="http://en.wikipedia.org/wiki/adposition">adpositions</a> (prepositions and/or postpositions) to further clarify the role of an argument in addition to case (like English does) or in lieu of case marking altogether. The idea is the same, though: you want to clarify the roles of the arguments so you morphologically mark the arguments with their roles.</p>

<h3>Marking the verb</h3>

<p>Many languages mark the verb with some information about the argument in a certain role, so that we can properly identify the argument&#8217;s roles. This kind of phenomenon is called <em>agreement</em>.</p>

<p>The most common type of verbal agreement is subject agreement, where the verb is marked by a specific form depending on some features of the subject. Anyone who&#8217;s taken French 101 will recognize this verb conjugation paradigm:</p>

<table>
<tr><th></th><th>subject</th><th>être (to be)</th></tr>
<tr><td rowspan='3'>singular</td><td>je (I)</td><td>suis</td></tr>
<tr><td>tu (you)</td><td>es</td></tr>
<tr><td>il/elle (he/she)</td><td>est</td></tr>
<tr><td rowspan='3'>plural</td><td>nous (we)</td><td>sommes</td></tr>
<tr><td>vous (plural you)</td><td>êtes</td></tr>
<tr><td>ils (they)</td><td>sont</td></tr>
</table>

<p>With this paradigm, if you hear or see &#8220;suis&#8221; in a French sentence, you immediately know that &#8220;je&#8221; (<em>I</em>) must be the subject and if you see &#8220;sommes,&#8221; &#8220;nous&#8221; (<em>we</em>) is the subject, etc. <a href="http://en.wikipedia.org/wiki/Standard Average European">Standard Average European</a> languages tend to exhibit this sort of subject-verb agreement.</p>

<p>Features of the subject position aren&#8217;t the only thing that can be marked on the verb, though. Hungarian, for example, has a type of object agreement. Specifically, the verb marks whether the object is definite or not (in linguistics lingo, &#8220;the verb agrees with the object&#8217;s definiteness feature&#8221;).</p>


<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>12
13
14
15
</pre></td><td class="code"><pre class="hungarian" style="font-family:monospace;">John lát  egy almát.
John sees an  apple
John látja az  almát.
John sees  the apple</pre></td></tr></table></div>


<p>Notice that in sentence (12) (glossed in (13)) the verb for &#8220;see&#8221; is realized as &#8220;lát,&#8221; while in (14) it&#8217;s &#8220;látja.&#8221; A speaker can use that agreement to see whether the object is definite or not and thus limit the possible object arguments out of all the nouns in the sentence.</p>

<h3>All of the above</h3>

<p><a href='http://www.qwantz.com/'><img src="http://mitcho.com/blog/wp-content/uploads/2009/02/whom.gif" alt="whom.gif" border="0" width="650" height="442" /></a></p>

<p>Most languages do not use only one of these strategies, but a combination of them. English is a very good example. In a sentence like (12) below the main coding of grammatical roles seems to be word order alone. By reversing the word order into (13), we can effectively swap the argument&#8217;s roles.</p>


<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>12
13
</pre></td><td class="code"><pre class="english" style="font-family:monospace;">John likes Mary.
Mary likes John.</pre></td></tr></table></div>


<p>However, this doesn&#8217;t work with pronominal arguments. Swapping the arguments in (14) yields (15) which is ungrammatical due to the case marking on the pronouns.</p>


<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>14
15
</pre></td><td class="code"><pre class="english" style="font-family:monospace;">He likes her.
* Her likes he.</pre></td></tr></table></div>


<p>In addition, the verb in English must agree with the subject&#8217;s number (singular or plural):</p>


<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>16
17
18
</pre></td><td class="code"><pre class="english" style="font-family:monospace;">John likes them.
* They likes John.
They like John.</pre></td></tr></table></div>


<p>In this way, English exhibits all three strategies: word order, case marking, and agreement, although often only word order is actively used to disambiguate the roles of arguments.</p>

<p><strong>Question:</strong> What strategies are used by your language to mark the roles of different arguments?</p>

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

<li id="fn:2">
<p>The following example is from <a href="http://www.personal.uni-jena.de/~x4diho/LingTyp%20Grammatical%20relations.ppt">Holger Diessel</a>.&#160;<a href="#fnref:2" rev="footnote">&#8617;</a></p>
</li>

<li id="fn:1">
<p>&#8220;Mean the same thing&#8221; here means that the teacher is always instructing and the boy is always being instructed. The sentences may differ in when or how they are used depending on which argument is being talked about or what the implications of the utterance are. The formal notion is <em>truth-conditional equivalence</em>.&#160;<a href="#fnref:1" rev="footnote">&#8617;</a></p>
</li>

</ol>
</div>
<p>Related posts:</p><ol>
<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>
<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/gaba-shame-on-you/' rel='bookmark' title='Gaba, Shame On You'>Gaba, Shame On You</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/three-ways-to-argue-over-arguments/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
	</channel>
</rss>

