• En
  • /
  • Jp
  • Watson API: Making a chat bot speaking Japanese

    • Share
    • Twitter
    • Google+
    • はてなブックマーク


    2016 is said to be the initial year of VR because head-mounted displays and computers with enough performance to operate such displays have become available, which are necessary elements to establish a VR environment. On top of that, VR might be not just another fad because PSVR has hit the market making it broadly available to an average household.
    Furthermore, the industry is focusing on the development of lenses enabling AR and it is considered that after VR, AR will become another big boom. VR and AR are quite often mentioned together. In this article, I’m going to focus on VR and also introduce you to AR.

    1.How to start the Chat bot service
    2.The dialog service
    3.Open the dialog

    1.How to start the Chat bot service

    First of all, we will select the “conversation” API from the catalogue page.

    Then create a new instance of the conversation service. After a few seconds, the conversation service page appears:

    Click on “Launch Tool”.The following screen loads:

    We need to create a workspace, AKA the project itself.
    Click on [create] then give a name to the project, and write a short description.

    As you can see, mine are very simple: test…

    Now we have successfully installed the conversation service.
    We need to set our chat bot. It’s time to click on [Get Started]!

    2.The dialog service

    Now, we have to set the dialog parameters, in order to make Watson respond properly.
    Let’s have a quick overview of the interface.


     The top menu is quite simple:

    tagged with the current project name (Test)・・・A back to workspace button.
    Intents・・・This is a topic list, you have to add at least 5 formulations by topic .
    Entities・・・This is a subject list, usually the one you want to interact with.
    Dialog・・・This is where you can build the dialog, and manage conversation flow.
    Improve・・・Help Watson to improve: not tested yet.
    A chat icon

    The main options are [Intents],[Entities],[Dialog] and [improve].
    Let’s create a new intents by clicking the [create new +] button.

    ■The base of a chat is the greetings.

    Let’s add some!
    I named my intent “greetings” notes the # before the name.
    Also I use some common Japanese greetings sentences with different spelling.
    When done, click on [Create].

    We’re now back to the intent list.
    Since my objective is to bring the name of the person in charge for a specific project, I’ll make a list of keywords related to the topic “who is in charge”.
    Now we have a topic concerning the person in charge, We can assume people name or project name will be named… It’s time to declare entities!
    Click on [Entities].

    We will have to declare the person in charge, and their projects. Click on [Create New].

    Just fill in the form.
    When finished click on create. You will go back on the entities list.

    By clicking on the name, you will be able to edit and change the entity.

    Here, I’m adding the ASCII (romaji) version of the name:

    ※Use it when you want to add another name such as “katakana” ver, “romaji” ver and so on.
    I do the same thing for the [projects] entity.
    Now, I have 2 entities: @projects and @person_in_charge.

    Open the dialog

    Click on [Dialog].The following screen appears: Then click on create and build our chat tree:

    Let’s start by a basic welcome message.

    In the “Anything else”, the default case I put a more formal sentence “Commudeのチャットです”;

    Since we have a greeting and a formal, we have set a condition for launching our greetings.
    In the [Enter a condition] field, add #greetings.
    Let’s try by clicking on the chat icon, on the upper right corner.

    As you can see the default sentence is fired.
    On the bottom there’s a field [Enter something to test your bot] Let’s try to put something…. ‘test’ for exemple.

    • There’s an input and we get Watson greetings message.
      Even if ‘test’ is not a conventional greeting message…
      Let’s add another conditional dialog. This time I’d like to see if I can fire a project related message.
      I’m try to add the following:

    Condition: @projects AND true.

    One my keywords for project is [人工知能]. What happened if I use this keyword?

    Watson seems to recognize the keyword but doesn’t fire the desired output…
    Let’s try to add a sub dialogue to this branch, by clicking on the right +.

    We must in put any sentences..
    Let’s try again the project keyword (人工知能)…
    Doesn’t work better.

    Doesn’t work as expected…
    I will try another settings: [continue from]
    What if I add a project Intents, with the [テスト] as key word?

    • Seems I will have to spend more time on this part!

    to be continued…