<?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>Joaquim Rocha&#039;s Web Page &#187; Technology</title>
	<atom:link href="http://www.joaquimrocha.com/category/technology/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.joaquimrocha.com</link>
	<description>Linux, technology and art</description>
	<lastBuildDate>Wed, 01 Feb 2012 10:54:06 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>SeriesFinale for Harmattan (N9/N950)</title>
		<link>http://www.joaquimrocha.com/2011/11/18/seriesfinale-for-harmattan-n9n950/</link>
		<comments>http://www.joaquimrocha.com/2011/11/18/seriesfinale-for-harmattan-n9n950/#comments</comments>
		<pubDate>Thu, 17 Nov 2011 23:58:12 +0000</pubDate>
		<dc:creator>Joaquim Rocha</dc:creator>
				<category><![CDATA[gnome]]></category>
		<category><![CDATA[gui]]></category>
		<category><![CDATA[hildon]]></category>
		<category><![CDATA[igalia]]></category>
		<category><![CDATA[maemo]]></category>
		<category><![CDATA[meego]]></category>
		<category><![CDATA[mobile]]></category>
		<category><![CDATA[planet]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[seriesfinale]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://www.joaquimrocha.com/?p=1161</guid>
		<description><![CDATA[As promised before, here is the first release of SeriesFinale for MeeGo Harmattan. This summer Micke Prag, a fellow programmer from Sweden contacted me because he was starting a port of SF for Harmattan. By then I still didn&#8217;t have an N950 because of having missed the deadline for the first developers program. Later, when [...]]]></description>
			<content:encoded><![CDATA[<p>As <a title="SeriesFinale 0.6.9" href="http://www.joaquimrocha.com/2011/10/14/seriesfinale-0-6-9/" target="_blank">promised before</a>, here is the first release of <a title="SF info page" href="http://www.igalia.com/nc/work/labs/project/item/seriesfinale/" target="_blank">SeriesFinale</a> for <a href="http://en.wikipedia.org/wiki/MeeGo#MeeGo.2FHarmattan" target="_blank">MeeGo Harmattan</a>.</p>
<p>This summer Micke Prag, a fellow programmer from Sweden contacted me because he was starting a port of SF for Harmattan. By then I still didn&#8217;t have an <a title="N950 on Engadget" href="http://www.engadget.com/2011/06/21/nokias-n950-developer-meego-handset-gets-official-4-inch-displ/" target="_blank">N950</a> because of having missed the deadline for the first developers program. Later, when the second developers program was launched I managed to finally get one. At that point, even though I already had my <a href="http://www.samsung.com/global/microsite/galaxys/index_2.html" target="_blank">Samsung Galaxy S</a> (yes, with <a href="http://www.android.com/" target="_blank">Android</a>) I still wanted to have a port of SeriesFinale as I had received many emails asking for this port so I started from Micke&#8217;s code and finally here it is!</p>
<p><strong>The Harmattan port</strong></p>
<p><a title="SF first version for MeeGo by Joaquim Rocha, on Flickr" href="http://www.flickr.com/photos/joaquimrocha/6355673049/" target="_blank"><img class="alignright" src="http://farm7.static.flickr.com/6060/6355673049_1c9b7f585c.jpg" alt="SF first version for MeeGo" height="350" /></a></p>
<p>Maybe it is something obvious but this version is not written in <a title="PyGTK" href="http://www.pygtk.org/" target="_blank">PyGTK</a>/<a title="PyMemo" href="http://pymaemo.garage.maemo.org/" target="_blank">PyMaemo</a>. It uses part of the &#8220;old&#8221; Python backend that was changed to play well with the new UI code written in <a title="QML" href="http://doc.qt.nokia.com/4.7-snapshot/qdeclarativeintroduction.html" target="_blank">QML</a>.</p>
<div>
This port&#8217;s code is a bit dirty by now and I&#8217;m sure there are bugs in this first version but at least it can be used and I didn&#8217;t want to make people wait much more. The support and feedback that SeriesFinale&#8217;s users have given me is amazing (some people even saying they still use the <a title="Nokia N900" href="http://en.wikipedia.org/wiki/Nokia_N900" target="_blank">N900</a> only for SF!), thank you all for it.<br />
My heart is still filled with GNOME/GTK+ love but QML is really impressive; there are some things I still need to spend some time with to figure out but I like how quick and flexible one can do stuff in QML.</div>
<div>
<p><strong>The OVI Store</strong></p>
<p>It was also the first time I published something on Nokia&#8217;s <a title="Nokia's Ovi Store" href="http://store.ovi.com/" target="_blank">Ovi Store</a> and the process took around 2 weeks before it finally got approved (it was rejected twice before due to weird stuff like &#8220;they&#8221; thinking <a title="Maemo Bugzilla" href="https://bugs.maemo.org/" target="_blank">bugs.maemo.org</a> was not a good place to report issues or the fact that an application that says it works only with English US is eligible only for the USA, not for all the countries&#8230;).</p>
<p><strong>The future</strong></p>
<p>I really like the <a title="N9" href="http://swipe.nokia.com/" target="_blank">N9</a>/N950. The user experience is something awesome and I believe this was the phone that could really compete with the iPhone and Android. Unfortunately <a title="Elopocalypse" href="http://www.engadget.com/2011/02/08/nokia-ceo-stephen-elop-rallies-troops-in-brutally-honest-burnin/" target="_blank">someone</a> at Nokia disagrees and the future of this incredible phone is doomed even though <a title="Thomas Perl on the N9 and the Lumia phones" href="http://thpmaemo.blogspot.com/2011/11/why-i-love-n9-and-things-i-didnt-know.html" target="_blank">Nokia&#8217;s alternative is not better</a>. Due to this mainly, I&#8217;m not using the N950 as my main phone. This and the fact that my personal time, in which I develop SF, is very limited, means that unless things change, I don&#8217;t know how much more releases I will do but I still wanted to add some cool features. It will probably depend again on the feedback and support.</p>
<p>Anyway here it is at an Ovi Store a few taps/swipes away and for free, as always (although I appreciate when someone buys me a beer <img src='http://www.joaquimrocha.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  ):</p>
<p style="text-align: center;"><a title="Get SeriesFinale from Ovi Store" href="http://store.ovi.com/content/216989" target="_blank"><img src="http://farm7.static.flickr.com/6050/6355639907_0922d93d0b.jpg" alt="Get SeriesFinale from Ovi Store" width="300" height="250" /></a></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.joaquimrocha.com/2011/11/18/seriesfinale-for-harmattan-n9n950/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
		<item>
		<title>OCRFeeder 0.7.6 and DesktopSummit 2011</title>
		<link>http://www.joaquimrocha.com/2011/08/05/ocrfeeder-0-7-6-and-desktopsummit-2011/</link>
		<comments>http://www.joaquimrocha.com/2011/08/05/ocrfeeder-0-7-6-and-desktopsummit-2011/#comments</comments>
		<pubDate>Thu, 04 Aug 2011 23:20:20 +0000</pubDate>
		<dc:creator>Joaquim Rocha</dc:creator>
				<category><![CDATA[events]]></category>
		<category><![CDATA[gnome]]></category>
		<category><![CDATA[guadec]]></category>
		<category><![CDATA[igalia]]></category>
		<category><![CDATA[ocr]]></category>
		<category><![CDATA[ocrfeeder]]></category>
		<category><![CDATA[odf]]></category>
		<category><![CDATA[planet]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[travel]]></category>

		<guid isPermaLink="false">http://www.joaquimrocha.com/?p=1057</guid>
		<description><![CDATA[Just in time for the Desktop Summit 2011, I&#8217;ve released the 0.7.6 version of OCRFeeder. The new interesting stuff in this version is that OCRFeeder can now export to PDF. When exporting the pages to PDF, users will have two choices: &#8220;a PDF from scratch&#8221; or &#8220;a searchable PDF&#8221;. The PDF from scratch means that [...]]]></description>
			<content:encoded><![CDATA[<p>Just in time for the <a href="https://www.desktopsummit.org/" title="Desktop Summit" target="_blank">Desktop Summit 2011</a>, I&#8217;ve released the 0.7.6 version of <a href="http://live.gnome.org/OCRFeeder" title="OCRFeeder's web page" target="_blank">OCRFeeder</a>.</p>
<p>The new interesting stuff in this version is that OCRFeeder can now export to PDF. When exporting the pages to PDF, users will have two choices: &#8220;a PDF from scratch&#8221; or &#8220;a searchable PDF&#8221;. The PDF from scratch means that the text part of what will be exported will be written in the PDF using ReportLab whereas the searchable PDF means that the PDF will present the whole original picture but with invisible text overlaid in order to make it searchable.<br />
The PDF exportation still needs some polishing but I wanted to get it out there as soon as possible for the people who need it.<br />
Check out these examples:</p>
<p><a href="http://www.flickr.com/photos/joaquimrocha/6010179640/" title="OCRFeeder by Joaquim Rocha, on Flickr"><img src="http://farm7.static.flickr.com/6139/6010179640_e02c7fcc12.jpg" width="500" height="361" alt="OCRFeeder"></a><br />
(page loaded in OCRFeeder and recognized automatically)</p>
<p><a href="http://www.flickr.com/photos/joaquimrocha/6009629869/" title="OCRFeeder's exported PDF from scratch by Joaquim Rocha, on Flickr"><img src="http://farm7.static.flickr.com/6014/6009629869_0ff0b7b3dd.jpg" width="378" height="500" alt="OCRFeeder's exported PDF from scratch"></a><br />
(exported PDF from scratch)</p>
<p><a href="http://www.flickr.com/photos/joaquimrocha/6010180136/" title="OCRFeeder's exported searchable PDF by Joaquim Rocha, on Flickr"><img src="http://farm7.static.flickr.com/6139/6010180136_780d6c730e.jpg" width="377" height="500" alt="OCRFeeder's exported searchable PDF"></a><br />
(exported searchable PDF with selected text)</p>
<p>This version also fixes issues when recognizing grayscale pictures as well as the mouse cursor that was being changed when it was over a page&#8217;s right margin.</p>
<p>I&#8217;ve also added separators to divide the Document&#8217;s submenus so they are grouped correctly and I&#8217;ve made ODT the first choice in the list of exportation formats, which had been mistakenly changed.</p>
<p>As usual, the incredible team of translators is doing a great job and apart from the updated translations, OCRFeeder now comes in Catalan (with the Valencian option as well) and in Greek.</p>
<p><strong>DesktopSummit</strong></p>
<p>No, once again, OCRFeeder&#8217;s talk wasn&#8217;t approved by the Desktop Summit&#8217;s organization. If you think that I&#8217;ve presented it some well known conferences (<a href="http://www.linuxtag.org" title="LinuxTag Conference" target="_blank">LinuxTag</a>, GUADEC ES and twice in <a href="http://www.fosdem.org" title="FOSDEM" target="_blank">FOSDEM</a>), it makes me a bit sad that I couldn&#8217;t yet present this unique project in the conference of the desktop it targets, but let&#8217;s hope it makes it next year.</p>
<p>Still, <a href="http://www.igalia.com" title="Igalia · Free Software Engineering" target="_blank">Igalia</a> is sponsoring me again to attend the DesktopSummit, so, if you&#8217;re interested in OCRFeeder or other projects I&#8217;m involved, let me know!</p>
<p><img alt="" src="https://www.desktopsummit.org/sites/www.desktopsummit.org/files/DS2011banner.png" title="I&#039;m going to Desktop Summit" class="alignnone" width="333" height="110" /></p>
<p>See you in Berlin!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.joaquimrocha.com/2011/08/05/ocrfeeder-0-7-6-and-desktopsummit-2011/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Demystifying Grilo</title>
		<link>http://www.joaquimrocha.com/2010/06/09/demystifying-grilo/</link>
		<comments>http://www.joaquimrocha.com/2010/06/09/demystifying-grilo/#comments</comments>
		<pubDate>Wed, 09 Jun 2010 09:17:43 +0000</pubDate>
		<dc:creator>Joaquim Rocha</dc:creator>
				<category><![CDATA[gnome]]></category>
		<category><![CDATA[grilo]]></category>
		<category><![CDATA[planet]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://www.joaquimrocha.com/?p=412</guid>
		<description><![CDATA[It&#8217;s been a while since Grilo was released and although Iago&#8217;s post announcing it, together with Grilo&#8217;s webpage, do a good job describing what Grilo is about, it seems many people out there still do not understand what Grilo is and what it isn&#8217;t. Hence, I wrote this non-technical post as an attempt to demystify [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s been a while since <a title="Grilo media provider" href="http://live.gnome.org/Grilo" target="_blank">Grilo</a> was released and although <a title="Grilo announcement" href="http://blogs.igalia.com/itoral/2010/02/10/grilo/" target="_blank">Iago&#8217;s post announcing it</a>, together with <a title="Grilo's webpage" href="http://live.gnome.org/Grilo" target="_blank">Grilo&#8217;s webpage</a>, do a good job describing what Grilo is about, it seems many people out there still do not understand what Grilo is and what it isn&#8217;t. Hence, I wrote this non-technical post as an attempt to demystify Grilo.<strong></strong></p>
<p><img src="http://farm2.static.flickr.com/1195/1424990010_9bcb3cb3c5.jpg" alt="Grilo means cricket in Galician" /><br />
<em>Grilo means cricket in Galician<br />
(CreativeCommons photo by <a target="_blank" href="http://www.flickr.com/photos/reneenmagda/1424990010/">Danforth1</a>)</em></p>
<p><strong>What Grilo is</strong></p>
<p>Nowadays, a number of online services provide a public API for application developers to retrieve those services&#8217; information. <a title="YouTube APIs and Tools" href="http://code.google.com/apis/youtube/overview.html" target="_blank">YouTube</a> lets you retrieve videos&#8217; info by browsing or searching; <a title="Jamendo's API" href="http://developer.jamendo.com/fr/wiki/Musiclist2Api" target="_blank">Jamendo</a> lets you retrieve its music and artists&#8217; info in a similar way; and many more offer similar options.</p>
<p>Although many of these services offer a <a title="RESTful API's definition" href="http://en.wikipedia.org/wiki/RESTful_API" target="_blank">RESTful API</a>, which already makes it easy, it is up to the applications&#8217; developers to write code to access that API, process the results (usually XML) and build their applications&#8217; own structures with the info. An alternative way is, of course, using an already existing library, suitable for the developers&#8217; needs, but whose API might differ from other services&#8217; libraries</p>
<p>Grilo exists to solve these issues.</p>
<p>Grilo has a number of plugins that retrieve media information from several services. It exposes that information in a consistent API so you don&#8217;t have to learn more than one way of getting that media&#8217;s info.<br />
Although there are more plugins for online services, there are also plugins for UPnP or for the very filesystem.</p>
<p>For the examples given before, searching for media in YouTube or Jamendo would be as easy as calling a method on Grilo, either choosing to search in one, both or all available media sources.</p>
<p>The search would result in media objects whose information (metadata keys) can be previously configured.</p>
<p>So, this is a very basic definition of what Grilo is: a framework that retrieves content from various services.</p>
<p><strong>What Grilo is not</strong></p>
<p>One thing people often expect from Grilo is for it to play content. Well, Grilo does NOT play media and that&#8217;s a planned &#8220;misfeature&#8221;.</p>
<p>Grilo&#8217;s main purpose is to retrieve media, or better said, media information, and to do it well.<br />
GStreamer is already here to play media and it does a wonderful job at it. Having Grilo to be a media player as well would deviate it from its specialization which would surely make it not suitable for some use cases.</p>
<p><strong>Why should you care</strong></p>
<p>More and more online services are being used in many platforms with applications being developed around them. Grilo eases the development of such applications.<br />
For a media player dedicated to play videos from YouTube and Vimeo: Grilo gets you the videos&#8217; URLs, GStreamer plays them and voila, you can focus on other implementation details.</p>
<p>Examples of applications that could have they&#8217;re job done easier would be Totem, Rhythmbox and Miro. For <a target="_blank" href="http://blogs.igalia.com/jasuarez/2010/06/02/rygel-and-grilo-dating-together/">Totem</a> and <a target="_blank" href="http://www.joaquimrocha.com/2010/06/02/grilo-powered-rhythmbox/">Rhythmbox</a>, <a target="_blank" href="http://blogs.igalia.com/jasuarez/2010/03/12/rygel-are-you-hungry/">Rygel-Grilo</a> (Grilo&#8217;s DBUS interface) has already shown (as a proof of concept) how easy it is to provide services as YouTube, SHOUTCast, Jamendo, filesystem&#8217;s media, and more, just in a fragment of the code needed to write a dedicated plugin for each of these services.<br />
I put also Miro as an example application because it is a video and audio player strongly intimate with the web, Grilo could only make it easy to find these videos. Plus, Grilo&#8217;s podcast plugin could also be used to manage Miro&#8217;s video channels&#8217; subscriptions.</p>
<p>As a different use case, a desktop like <a target="_blank" href="http://meego.com/community/blogs/imad/2010/meego-v1.0-core-software-platform-netbook-user-experience-project-release">Meego</a>&#8216;s, which integrates, for example, social services in it, could also integrate a way to search media, without the need to use the web browser.</p>
<p>So, summarizing, Grilo fills a gap in the media application development infrastructure; developers that are interested in integrating multimedia content in their applications could get an important benefit from using Grilo to access that content, and that&#8217;s why we encourage you to check it out</p>
]]></content:encoded>
			<wfw:commentRss>http://www.joaquimrocha.com/2010/06/09/demystifying-grilo/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Caribou and Text Predictor Input Mode</title>
		<link>http://www.joaquimrocha.com/2010/04/05/caribou-and-text-predictor-input-mode/</link>
		<comments>http://www.joaquimrocha.com/2010/04/05/caribou-and-text-predictor-input-mode/#comments</comments>
		<pubDate>Mon, 05 Apr 2010 10:26:11 +0000</pubDate>
		<dc:creator>Joaquim Rocha</dc:creator>
				<category><![CDATA[gnome]]></category>
		<category><![CDATA[gtk]]></category>
		<category><![CDATA[planet]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[usability]]></category>

		<guid isPermaLink="false">http://www.joaquimrocha.com/?p=328</guid>
		<description><![CDATA[I have been wanting to show how Caribou can be used with the Text Predictor Input Mode I wrote a while ago and finally today I took the time to do it. Caribou with Text Predictor Input Mode from Joaquim Rocha on Vimeo. Okay, the shortcuts  to accept prediction candidates or scroll through them can [...]]]></description>
			<content:encoded><![CDATA[<p>I have been wanting to show how <a title="Caribou" href="http://live.gnome.org/Caribou" target="_blank">Caribou</a> can be used with the <a title="Text Prediction on GNOME" href="http://www.joaquimrocha.com/2010/03/03/text-prediction-on-gnome/" target="_blank">Text Predictor Input Mode</a> I wrote a while ago and finally today I took the time to do it.</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="400" height="300" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://vimeo.com/moogaloop.swf?clip_id=10687630&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" /><embed type="application/x-shockwave-flash" width="400" height="300" src="http://vimeo.com/moogaloop.swf?clip_id=10687630&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p><a href="http://vimeo.com/10687630">Caribou with Text Predictor Input Mode</a> from <a href="http://vimeo.com/user1454556">Joaquim Rocha</a> on <a href="http://vimeo.com">Vimeo</a>.</p>
<p>Okay, the shortcuts  to accept prediction candidates or scroll through them can be changed into some that are quickly accessible.<br />
With the changes I did to Caribou, one can even easily provide a special button, such as &#8220;ACCEPT&#8221;, like the screenshot below shows:</p>
<p><a href="http://www.joaquimrocha.com/wp-content/uploads/2010/04/caribou_with_accept_key.png"><img class="aligncenter size-medium wp-image-329" title="Caribou with Accept key" src="http://www.joaquimrocha.com/wp-content/uploads/2010/04/caribou_with_accept_key-300x99.png" alt="Caribou with Accept key" width="300" height="99" /></a></p>
<p>The changes I&#8217;m talking about and that you see in the video and the QWERTY keyboard layout I used can be found in Caribou&#8217;s bug <a href="https://bugzilla.gnome.org/show_bug.cgi?id=613229" target="_blank">#613229</a>.</p>
<p>I wrote these changes because the current way of writing layouts for Caribou doesn&#8217;t seem very flexible nor appropriate for non programmers, in my opinion.<br />
These changes drop the current usage of Python files with tuples as a way to configure Caribou&#8217;s layouts. Instead, json files should be used and more functionality that wasn&#8217;t implemented before is also possible with the mentioned patch.</p>
<p>Basically, instead of having either character keys or symbol, label pairs that Caribou understands, each key should be a set of attributes that define it, which Caribou then interprets accordingly.</p>
<p>For a basic key, all one needs to have is the <em>value</em> attribute, which can receive a string (for example a character) or the name of a key in GDK (you can easily figure them out from the <a title="GDK Keysyms file" href="http://git.gnome.org/browse/gtk+/tree/gdk/gdkkeysyms.h" target="_blank">GDK key syms file</a>).<br />
So:</p>
<p><span style="color: #888888;"><em>{&#8220;value&#8221;: &#8220;a&#8221;}</em></span> will create a key labeled a that inputs the character a<br />
<em> <span style="color: #888888;">{&#8220;value&#8221;: &#8220;BackSpace&#8221;}</span></em> will create a backspace key but labeled with &#8220;BackSpace&#8221;</p>
<p>You can override the label of a key using the attribute &#8220;label&#8221;, as:</p>
<p><span style="color: #888888;"><em>{&#8220;value&#8221;: &#8220;BackSpace&#8221;,<br />
&#8220;label&#8221;: &#8220;⌫&#8221;}</em></span> will create a backspace key but labeled with &#8220;⌫&#8221;</p>
<p>Labels can use <a title="Pango Markup" href="http://library.gnome.org/devel/pango/stable/PangoMarkupFormat.html" target="_blank">Pango Markup</a> to change its text style, for example: <span style="color: #888888;"><em>{&#8220;label&#8221;: &#8220;&lt;small&gt;&lt;b&gt;Small Bold Text Key&lt;/b&gt;&lt;/small&gt;&#8221;, &#8230;}</em></span></p>
<p>A <em>width</em> attribute is also introduced and means the width relative to a usual key&#8217;s width. A width of 3 will generate a key that fills the space of 3 keys whereas 0.25 fills a quarter of a regular key&#8217;s space.</p>
<p>A key can be of a given type which indicates how it behaviors. There is 5 types of keys: <em>normal</em>, <em>layout_switcher</em>, <em>preferences</em>, <em>mask</em> and <em>dummy</em>.<br />
A <em>normal</em> key type indicates it is a regular &#8220;you-press-you-input&#8221; key and is the default type, which is why it wasn&#8217;t specified in the examples above.<br />
A <em>layout_switcher</em> key, when pressed, will change the keyboard sublayout to the one given by the value attribute (and must exist in the layout file), so, if we are in the &#8220;lowercase&#8221; layout and we want a key labeled &#8220;UP&#8221; to change to the &#8220;uppercase&#8221; layout:<br />
<span style="color: #888888;"><em>{&#8220;label&#8221;: &#8220;UP&#8221;, &#8220;key_type&#8221;: &#8220;layout_switcher&#8221;, &#8220;value&#8221;: &#8220;uppercase&#8221;}</em></span></p>
<p>The <em>preferences</em> key type brings up the preferences menu.<br />
A <em>mask</em> key means that you set a mask indicated by the value attribute when you press it. For the Alt key:<br />
<span style="color: #888888;"><em>{&#8220;label&#8221;: &#8220;Alt&#8221;, &#8220;key_type&#8221;: &#8220;mask&#8221;, &#8220;value&#8221;: &#8220;mod1&#8243;}</em></span> again, the &#8220;mod1&#8243; is the mask name from GDK.</p>
<p>Finally, there&#8217;s the <em>dummy</em> key type which is used basically to set spacer keys and allow to separate some keys from others in order to improve visual grouping. Rows that don&#8217;t have the number of keys in any row (including dummy keys) will be centered horizontally.</p>
<p>These let you play with keyboards&#8217; layouts and design any kind of layout in a flexible and easy way.</p>
<p>At the moment, the patch is still pending review. Let&#8217;s hope it gets a green light and is applied.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.joaquimrocha.com/2010/04/05/caribou-and-text-predictor-input-mode/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Text Prediction on GNOME</title>
		<link>http://www.joaquimrocha.com/2010/03/03/text-prediction-on-gnome/</link>
		<comments>http://www.joaquimrocha.com/2010/03/03/text-prediction-on-gnome/#comments</comments>
		<pubDate>Wed, 03 Mar 2010 09:27:51 +0000</pubDate>
		<dc:creator>Joaquim Rocha</dc:creator>
				<category><![CDATA[c]]></category>
		<category><![CDATA[gnome]]></category>
		<category><![CDATA[gtk]]></category>
		<category><![CDATA[maemo]]></category>
		<category><![CDATA[planet]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[video]]></category>

		<guid isPermaLink="false">http://www.joaquimrocha.com/?p=295</guid>
		<description><![CDATA[I was disappointed with the text completion provided by the N900 (eZiText) that, on top of that, is closed and I wondered if it was possible to have an Open Source solution to provide text prediction and completion. I searched a bit and besides my original intentions of developing a library to search Free and [...]]]></description>
			<content:encoded><![CDATA[<p>I was disappointed with the text completion provided by the N900 (<a href="http://www.nuance.com/zi/text-entry.asp" target="_blank">eZiText</a>) that, on top of that, is closed and I wondered if it was possible to have an Open Source solution to provide text prediction and completion.</p>
<p>I searched a bit and besides my original intentions of developing a library to search Free and Open Source dictionaries&#8217; words from a prefix, I found <a title="Presage" href="http://presage.sourceforge.net/" target="_blank">Presage</a>.<br />
Presage is better than most text prediction systems I have seen out there because it really is text prediction, not text completion. This C++ library, retrieves words taking into account the surrounding text, not only the prefix or frequency of words. It uses a database representing <a title="N-gram" href="http://en.wikipedia.org/wiki/N-gram" target="_blank">N-grams</a> that can be trained with more text; the more you train it, the more accurate it can be.</p>
<p>This means that is you type something like:<br />
<em>&#8220;I m&#8221;</em><br />
instead of suggesting nonsense things like:<br />
<em>&#8220;I m<span style="color: #ff9900;">ouse</span>&#8221; &#8220;I m<span style="color: #ff9900;">other</span>&#8221; &#8220;I m<span style="color: #ff9900;">arket</span>&#8221; or &#8220;I m<span style="color: #ff9900;">ore</span>&#8220;</em><br />
it suggests something more like:<br />
<em>&#8220;I m<span style="color: #ff9900;">ust</span>&#8221; &#8220;I m<span style="color: #ff9900;">et</span>&#8221; &#8220;I m<span style="color: #ff9900;">ean</span>&#8221; or &#8220;I m<span style="color: #ff9900;">ight</span>&#8220;</em><br />
The difference is obvious!</p>
<p>So I developed a little wrapper around Presage in C that provides a yet very basic API to get text completion. Then I created a <a title="GTK+ Input Method context" href="http://www.gtk.org/api/2.6/gtk/GtkIMContext.html" target="_blank">GTK+ Input Method context</a> to control the user&#8217;s input in regular GTK+ text widgets and used the wrapper to process the inputted text. I called it: Predictor Input Method (not very original I know&#8230;).<br />
The result is that Predictor suggests you words, even if you type a prefix or not, and lets you accept the candidate word or scroll through a list of suggestions as you can see in the video below:</p>
<p><object width="400" height="300"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=9867486&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=9867486&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="400" height="300"></embed></object>
<p><a href="http://vimeo.com/9867486">Text prediction in GNOME</a> from <a href="http://vimeo.com/user1454556">Joaquim Rocha</a> on <a href="http://vimeo.com">Vimeo</a>.</p>
<p><strong>How to use it</strong></p>
<p>The current key bindings are:</p>
<p><em>Ctrl+Enter</em> -&gt; Selects the current candidate<br />
<em>Ctrl+Up/Down</em> -&gt; Scrolls through the list of candidates<br />
<em>Backspace</em> -&gt; Deletes the character previous to the cursor and suggests again<br />
<em>Directional arrows</em> -&gt; Move cursor and discard suggestions</p>
<p><strong>Who should use it</strong></p>
<p>This kind of assistance technology can have many applications but the main ones are: the usage in small/mobile devices and the assistance of users with disabilities. Both have the same reasons behind: speeding the input and reducing failed characters, because the input required gets minimized;<br />
Of course, you can as well use it in your GNOME desktop regularly for faster typing your emails, etc.</p>
<p>In the case of users with disabilities, a popup menu could be added to show a complete list of candidates and the bound fast-access keys.</p>
<p><strong>Why is Free Software important in this</strong></p>
<p>This is the kind of technology that everybody should have an interest in using a FOSS solution because of the obvious advantage that is developers from all over the world being able to modify it.<br />
Suppose you&#8217;re creating a mobile phone and you choose a closed solution to provide text prediction for your phone. And then you find out you&#8217;re disappointing all your users from country X because that library you&#8217;re paying for does not support their language and the library owner is not interested that much in adding it. Now if you&#8217;re using an open solution, local communities from many places in the world can add support for their languages and your phone can have a better acceptance in places you hadn&#8217;t even imagined.</p>
<p>Software that reaches an international audience with different languages is software you want to have open.</p>
<p><strong>How to get Predictor Input Method</strong></p>
<p>You can find the Predictor Input Method&#8217;s source its Gitorious page: <a title="Predictor IM on Gitorious" href="http://gitorious.org/text-predictor-input-method" target="_blank">http://gitorious.org/text-predictor-input-method</a><br />
Of course, you should also <a title="Presage" href="http://presage.sourceforge.net/?q=node/16" target="_blank">install Presage</a> for it to work.</p>
<p>If you are not using GTK+ Input Methods then you can use the wrapper <a title="Text Predictor wrapper" href="http://gitorious.org/text-predictor-input-method/text-predictor-input-method/blobs/master/src/text-predictor.cpp" target="_blank">text-predictor.cpp</a> which is not tight to the Input Method code itself. And of course, you can copy the little tricks used on the Input Method code and apply it to your source (like delaying the retrieval of the candidates some fractions of a second to not block the input, etc.).</p>
<p>Hope you like it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.joaquimrocha.com/2010/03/03/text-prediction-on-gnome/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
	</channel>
</rss>

