Select Page

At Xatkit, we’re obsessed with making the bot creation process as simple as possible. Either by automatically generating it or by providing the best chatbot development environment we can. As part of this latter effort, we’re releasing today a library with a set of predefined intents you can directly import into your bot design. You can freely access the library in GitHub, as part of the whole open-source Xatkit organization.

Indeed, many bots share some common “chit-chat” intents (to say hello, to thank you, to ask for help, to say no,…) that you don’t want to repeat every single time. The library includes all these chit-chat and common intents. And predefines a set of training sentences for each of them. Just import the library to kickstart your bot development process and focus your time on creating the key intents for your bot instead of wasting your time thinking about how your users can say hello to your bot!

Even better, our chatbot chit-chat library is internationalized. Right now, we support English, French, Spanish, and Catalan. So every intent includes training sentences in these four languages (if you just need to develop bots in English, the Xatkit Runtime embeds already a simplified version of the library for English only bots),

Using our core chatbot library

The chit-chat intents in the library are used as any other intent. As an example, let’s see to get a CoreLibraryI18n instance for a given Locale and use it in your bot:

CoreLibraryI18n library = new CoreLibraryI18n(Locale.US);
val s1 = state("S1")

???? Intent names aren’t translated: library.Yes can be used seamlessly in an English or French bot. The library takes care of loading the training sentences for the appropriate locale. This facilitates creating new localized versions of the bot!

Contribute to the chit-chat library!

You can contribute to this project by providing new translations or by improving existing ones. To do so open the CoreLibrary resource bundle (located in src/main/resources), create a new property file in the bundle if your language isn’t already supported (otherwise open the existing one), and start translating the existing entries.

The CoreLibrary resource bundle contains an entry for each intent supported by the library (excluding data type intents that aren’t translated). The value of an intent entry is a list of training sentences in the target language separated with \n.

❗ Every intent training sentence must end with \n. This character is used as a delimiter, and omitting it will concatenated multiple translations.

???? You can provide as many translations as you want for a given intent. The CoreLibraryI18n takes care of loading them all. In particular, it’s not required to provide the same number of training sentences between two languages. This allows to include language-specific expressions, and exclude sentences that cannot be translated in the target language.

The image below shows the view provided by IntelliJ to ease the translation process. To open it: open and click on the Resource Bundle tab at the bottom of the screen.

Core Library bundle to provide translations for chatbot intents

Create your own Intent Library

This core library can also be seen as an example of how you could create and reuse your own intent libraries. Including i18n versions. So, even if you don’t want to contribute new intents to this core library, you can still organize your intents following a similar approach to facilitate the creation of similar bots for the business domain you focus on.


Learn to build great chatbots

Learn to build great chatbots

Read about the latest trends in the world of bots and chatbots, with special focus on chatbots for eCommerce and customer support

You have Successfully Subscribed!

Pin It on Pinterest

Share This