<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Kris Pypen on Medium]]></title>
        <description><![CDATA[Stories by Kris Pypen on Medium]]></description>
        <link>https://medium.com/@kris.pypen_15156?source=rss-6f115b1a6e5b------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*1w6RgyuvCafn2E9V.</url>
            <title>Stories by Kris Pypen on Medium</title>
            <link>https://medium.com/@kris.pypen_15156?source=rss-6f115b1a6e5b------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 03:37:07 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@kris.pypen_15156/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[How we created the conversational agent for the RMI]]></title>
            <link>https://medium.com/kunstmaan/how-we-created-the-conversational-agent-for-the-rmi-4434455862ce?source=rss-6f115b1a6e5b------2</link>
            <guid isPermaLink="false">https://medium.com/p/4434455862ce</guid>
            <category><![CDATA[google-assistant]]></category>
            <category><![CDATA[bots]]></category>
            <category><![CDATA[conversational-interfaces]]></category>
            <dc:creator><![CDATA[Kris Pypen]]></dc:creator>
            <pubDate>Fri, 31 May 2019 08:29:45 GMT</pubDate>
            <atom:updated>2019-05-31T08:29:45.018Z</atom:updated>
            <content:encoded><![CDATA[<p>Either it’s too wet, or too cold, or <em>waaaaay </em>too hot.<br> It turns your barbecue party into a washout.<br> It makes sure you’re frozen to the bone when you go out for a run.<br> It has you sweating like a pig in your winter coat while waiting for the bus.</p><p>Surely it would be handy if you could ask someone about the weather, at any given moment. And that you would be given answers, bearing in mind your specific location and your personal situation.</p><p>We gathered all our experts in service and conversation design, copywriting and development round the table with the RMI, the <strong>Royal Meteorological Institute of Belgium</strong>. Together we designed an extension for your <strong>Google Assistant </strong>that tells you all about the local weather, tailored to your specific needs.</p><p>At <strong>Kunstmaan | Accenture Interactive</strong>, the process of creating a conversational agent starts with our UX strategists.They work with the client to define the end users needs &amp; wants and design the whole human experience. The <strong>Senior Software Architect</strong> works on the available information in the backend systems of the client and what is technically feasable. The digital <strong>Copywriter </strong>writes out conversations based on the tone of voice defined in the human centric designs and splits it into user intents: Making sure the Assistant really understands what the user actually wants when asking something. Finally a <strong>Developer</strong> starts setting up the fullfillment layer and configures the Dialogflow project. Our <strong>Testers</strong> have been trained to write test cases for this new kind of interface.</p><p>Let’s dive a bit deeper and explain how we <strong>actually — technically — </strong>created the RMI conversational agent.</p><p>This is where <a href="https://developers.google.com/actions/">Actions on Google</a> comes in. Actions on Google is the platform on which anyone can publish Actions for the Google Assistant. The recommended way to develop for Actions on Google is the conversational agent tool called <a href="https://dialogflow.com/">Dialogflow</a>. Dialogflow wraps the functionality of the <a href="https://developers.google.com/actions/sdk/create-a-project">Actions SDK</a>, and provides additional features such as an easy-to-use IDE, Natural Language Understanding (NLU), Machine Learning (ML), and more. Note that Dialogflow is actually owned by Google. It also allows you to create conversational agents for several other platforms as well (Facebook Messenger, Alexa, Slack,…), but that is out of the current scope.</p><p>A conversational agent on Dialogflow consists of several concepts, which are explained below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*hu-u-0rTjTeSg_O9" /></figure><p>Pictured above: the <strong>hobby</strong> entity in the RMI Dialogflow project, mapping several synonyms or related hobbies to the same value. The resulting value is used for populating our request to the RMI API endpoint.</p><p>Entities are sets of variables that are limited to certain values, so you can compare them to Enums. Dialogflow provides a set of predefined entities that are either a limited set (such as @sys.address, or @sys.flight-number), or unlimited sets (such as @sys.last-name), but it’s also possible to create your own entities. These entities are recognised by Dialogflow in user queries, and the resulting values are sent up to any webhooks if specified.</p><p>In our RMI project, several alternative wordings for watersport (surfing, sailing, swimming) are defined, so Dialogflow will all match these to the same value. The RMI API endpoint takes an integer as parameter for “hobby type”, which is why the value for the watersport entity is set to the value 3.</p><p>Similar to hobbies we use entities for <strong>clothing types, cities/locations, datetimes, and more.</strong></p><p>Be sure to populate your custom entities in all supported languages though!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/645/0*Cu3Uck016nBfTUiW" /></figure><p>Pictured above: sample training phrases for the <strong>hobby intent</strong>. There are several ways to state the same intent, and recognised entities are clearly marked in different colors. A Dialogflow intent matches a user’s intent to <strong>do</strong> something, in this example the user wants to know if the weather is good for a certain hobby (in particular, the types of hobby defined in our hobby entity). You can define several ways the user could state this intent, with or without certain (optional) parameters. After providing these training phrases (in all languages), Dialogflow will be able to match user queries with the correct intent, even if they do not match completely by using <strong>Natural Language Understanding (NLU)</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/794/0*lpW9GvkSgysvw0iB" /></figure><p>Pictured above: The list of entities used as parameters in our hobby intent. The hobby entity is marked as required, causing the conversational agent to automatically prompt the user if this is missing.</p><p>For each intent, you can provide a list of entities that might be mentioned in the user query, and mark some of them as required. Marking an entity as required will cause the conversational agent to automatically prompt the user for this value. As soon as all required entities in an intent are known, Dialogflow will resolve the intent. It’s possible to resolve the intent directly within Dialogflow (by providing a default static reply), or to trigger a webhook. In both options you will have the inputted entity variables available to use in your response, and in the case of a webhook these can be used in your business logic.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*XeX3Ml3tYl-AlJIa" /></figure><p>Pictured above: the “clothing” follow-up intent for the <strong>weather context</strong>.</p><p>Intents can provide an output context in which they can store certain variables. Other intents can be made triggerable only when certain contexts are active (as seen above), which makes them ideal for <strong>follow-up questions</strong>.</p><p>The easiest way to explain contexts are by using a real-world example. Imagine the following conversation:</p><p><strong>What’s the weather this Thursday in Brussels?</strong><br><em>RMI agent replies with the weather info for Brussels on Thursday.</em><br><strong>Will I need sunglasses?</strong><br><em>RMI agent replies to the question based on the weather for Brussels on Thursday</em></p><p>As you can see, the follow-up response takes into account the context of the conversation, as all weather intents store information such as location and date into the weather context. Follow-up intents can then utilise this context to <strong>fill in the gaps</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*XM6KQwsuVyldCsM2" /></figure><p>Pictured above: A basic text response for the exit intent. It’s also possible to use variable entities from the intent in the response.</p><p>For simple responses that don’t require any business logic it it possible to define them straight in Dialogflow. It’s also possible to provide specific visual responses for Actions on Google such as cards or carousels on phones or other devices with a display.</p><p>However, it’s also possible to trigger a <strong>webhook</strong> request for the response, which Dialogflow calls <a href="https://dialogflow.com/docs/fulfillment"><strong>Fullfillment</strong></a>. These webhooks will do a POST request to an endpoint of your choosing. Note that the endpoint is the same for all intents, so the first thing you’ll need to do in your business logic is to differentiate between the different intents.</p><p>There are several ways to build your own webhook endpoint. Google’s recommendation is the <a href="https://github.com/actions-on-google/actions-on-google-nodejs">Actions on Google Node.js library</a>, which we’ve also used for this project. For other internal projects we’ve built prototypes in Java as well, so it doesn’t really matter which backend language you use, as long as you can easily work with JSON objects.</p><p>On completion of an intent that has Fullfillment enabled, Dialogflow will do a POST call to your endpoint with the intent, all relevant entities, and contexts. Your endpoint should be responsible for translating the Dialogflow JSON objects to valid API calls for your <strong>business logic</strong>, and format the response from the API calls back into response JSON objects for Dialogflow. All of this is required to take less than 5 seconds RTT, since the Google Assistant will mark your conversational agent as non-responsive if any response takes longer than 5 seconds.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*BQAuFzG8ge-4HswO.jpg" /></figure><p>Hooking up your Dialogflow project with your business logic via a fulfillment webhook completes your conversational agent. You can see an image above of this complete architecture, of which we’ve only scratched the surface. With Dialogflow as your conversational agent tool, you’re <strong>not just limited to the Google Assistant</strong>. It provides integrations with all major plagforms, including Facebook Messenger, Alexa, Slack, and others. On top of that, there are several SDK’s available for multiple platforms so your conversational agent can be fully integrated within your web-app, mobile app or even watch app.</p><p><em>Originally published at </em><a href="https://labs.kunstmaan.be/blog/how-we-created-the-conversational-agent-for-the-rmi"><em>https://labs.kunstmaan.be</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4434455862ce" width="1" height="1" alt=""><hr><p><a href="https://medium.com/kunstmaan/how-we-created-the-conversational-agent-for-the-rmi-4434455862ce">How we created the conversational agent for the RMI</a> was originally published in <a href="https://medium.com/kunstmaan">Kunstmaan | Accenture Interactive</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How translations work internally on Android and how you can change them dynamically]]></title>
            <link>https://medium.com/kunstmaan/how-translations-work-internally-on-android-and-how-you-can-change-them-dynamically-2f3bbaec07a7?source=rss-6f115b1a6e5b------2</link>
            <guid isPermaLink="false">https://medium.com/p/2f3bbaec07a7</guid>
            <category><![CDATA[mobile]]></category>
            <category><![CDATA[i18n]]></category>
            <category><![CDATA[code]]></category>
            <category><![CDATA[android]]></category>
            <dc:creator><![CDATA[Kris Pypen]]></dc:creator>
            <pubDate>Tue, 10 Apr 2018 10:36:31 GMT</pubDate>
            <atom:updated>2018-04-10T14:02:10.366Z</atom:updated>
            <content:encoded><![CDATA[<p>On Android every translation string is defined in a <a href="https://developer.android.com/guide/topics/resources/string-resource.html">strings.xml</a> file. At compile time, aapt wil put every values resource in a resources.arsc file, after which the R.java file (containing ids) is generated. But this resources.arsc file can not be changed while running the application. Android also does not provide a way to dynamically change the translations.</p><p>When you start digging into the Android source code, you’ll find lots of places where translation keys/ids get translated. In the end, all of them will end up in the <a href="https://developer.android.com/reference/android/content/res/AssetManager.html">AssetManager</a> class. This AssetManager contains a private array <em>mStringBlocks </em>containing the translation<em> values </em>and<em> blockIds. Other then that,</em> the AssetManager contains a private method <em>loadResourceValue</em> which returns the <em>blockId</em> based on the <em>resourceId</em>. With reflection we can work some magic, turn them public, and call them. Using this method, we can now get translations from memory.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lCvPCOiyVokCV6McmQn_Pw.png" /><figcaption>Based on a resId, AssetManager.loadResourceValue returns an index to get the correct StringBlock from the mStringBlocks array. The TypedValue object that is passed into the AssetManager.loadResourceValue method is updated with a data property which is the index of the SparseString within that StringBlock’s mSparseStrings array. With these 2 indexes, we have what’s needed for getting and setting the translated String value.</figcaption></figure><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/0088c4c31bd17339ee5a1bf910d4ca6c/href">https://medium.com/media/0088c4c31bd17339ee5a1bf910d4ca6c/href</a></iframe><p>If we want to live change the translation values, the only thing we have to do is load the original value, and then change the in-memory array of StringBlocks.</p><p>To wrap it up in a proof of concept, we created a live translation editor where you can view the currently used translations and change them live. And <a href="https://github.com/Kunstmaan/KunstmaanTranslationsEditor/blob/master/kunstmaan-translations-editor/src/main/java/be/kunstmaan/translationseditor/utils/TranslationUtils.java">here</a> can you find the Util class itself to get and change the translations.</p><p>Our <a href="https://github.com/Kunstmaan/KunstmaanTranslationsEditor">live translation editor</a> also adds a way to export the changes you made so they can be imported in you Android or iOS projects.</p><p><em>Originally published at </em><a href="https://labs.kunstmaan.be/blog/how-translations-work-internally-on-android-and-how-you-can-change-them-dynamically"><em>labs.kunstmaan.be</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2f3bbaec07a7" width="1" height="1" alt=""><hr><p><a href="https://medium.com/kunstmaan/how-translations-work-internally-on-android-and-how-you-can-change-them-dynamically-2f3bbaec07a7">How translations work internally on Android and how you can change them dynamically</a> was originally published in <a href="https://medium.com/kunstmaan">Kunstmaan | Accenture Interactive</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>