This article was originally published on medium on the 14 September 2022.

Introduction

There are many tools available for learning new languages, where the focus usually lies on learning words, grammar, and pronunciation. During 2020, Helsingborg AMF together with NordAxon identified additional barriers to learning a new language related to interaction. One of the best ways to learn a new language is to speak it and interact with others that are also trying to learn or that are already fluent speakers. This can be very challenging for people that have limited access to conversation partners, limited time to seek these out, or simply do not have the courage to do so.

Having a job is an efficient way to learn a local language since it often involves a lot of interaction, but to get a job it is usually required that you are already a fluent speaker. The idea brought together by Helsingborg AMF and NordAxon is to make interactive conversation practice more accessible, in the same way as other parts of language practice have been made accessible already.

 

Emely

Emely is a tool for conversation practice made available as a web application. The first iterations of Emely have been focused on job interview practice and common conversations on varying levels of difficulty. The user interacts with Emely through a chat-like interface, where the user records their response, and Emely in turn responds through speech synthesis via the microphone, as well as displaying the response in the chat as text.

Since Swedish is not yet a “high resource” language within the field of NLP (Natural Language Processing), we are for now using English as an intermediary language for certain parts of the functionality (“high resource” in this context means that there would be many useful datasets and previous modelling work performed in Swedish). In the image below we show the architecture of the conversation flow that is used in the current version of Emely. A response is generated through the steps 1-6 indicated in the image. The steps are:

  1. Speech recognition – turns the user input into text.
  2. Translation – we make use of translation from Swedish to English.
  3. Dialog control – we control the flow of dialogs differently based on scenarios, and how the conversation progresses.
  4. Generative Dialog Model – a machine learning model generates an answer using user input, previous conversation history, as well as additional information from the dialog control.
  5. Translation – the response from Emely is translated back into Swedish.
  6. Speech synthesis – text is transformed to speech which is then played on the user’s device.

In addition to these steps, we analyze conversations, considering both how well a user is performing, and how well Emely is performing. The analysis of user replies can be visualized in the user interface, and further analyzed for improving language skills by yourself, in collaboration with a language coach/teacher, or in the case of job interviews a job coach.

 

Job Interviews

Large amounts of resources in Swedish municipalities are spent on helping people being able to find a job. Language skills is a large part of this task, where job coaches are working together with language instructors and teachers to help people improve their interactive language skills.

Having job interviews is very different to having common conversations. One big difference is that the conversations are usually only being controlled by the interviewer, who is asking many questions and follow-up questions. To make a good impression at a job interview it is in most cases not enough to only respond to questions that are easily expected, but there might be an even higher weight on how you can answer on follow-up questions. Also, an interview can switch topics fast, but are usually centered around the person being interviewed.

The Interview module in Emely was developed in collaboration with job coaches at Helsingborg AMF, ensuring that the above aspects were taken into consideration. The main idea in the current version of Emely is to steer interviews in the “dialog control” and utilize a custom generative dialog model that is specialized in asking follow-up questions. Therefore, the model has been trained using a large dataset with examples of good follow-up questions. An example of user responses and “labels” (a label is an example of what we want the model to respond in this specific context) from the training dataset is shown below:

Emely:                            How do you think a good boss should be?

User response:            A good manager is clear and coaching, gives responsibility and lets his employees come up with ideas and views.

Emely:                           How should a boss not be?

User response:            A manager should not be afraid of conflict or inaccessible.

Emely:                           What can happen then?

 

Research

Several of the components in Emely is currently subject to research in the field of NLP. NordAxon is both actively engaged in this research relating to some of these components, as well as following the state of the art in NLP closely.

One topic where NordAxon has been involved in research is in the quality assurance of generative dialog models. Quality assurance in this case is mainly focused on analyzing the quality of the generated responses and conversations. In other words, how can we determine that Emely is responding reasonably within the context, grammatically correct, as well as having overall good conversations.

An initial framework for evaluating conversations was developed in a collaboration between NordAxon, Research Institutes of Sweden (RISE), and Lund University. A research article from this collaboration can be found here, and an initial implementation has been made available as open source here.

 

Emely on H22

In the summer of 2022, Helsingborg held an innovation exhibition named H22 City Expo. The exhibition is described as “An international event that focused on future welfare and urban development solutions and how we can create a smarter, more sustainable, and thoughtful city – together” [https://www.h22cityexpo.se/]. A main attraction on the exhibition was speaking with Emely.

During H22 City Expo more than 600 visitors initiated over 2.500 conversations with Emely. This meant that visitors spent in total 86 hours talking with Emely, sending 10.742 replies. Even the Swedish crown princess Victoria had a quick chat with Emely.

The H22 City Expo was therefore an excellent opportunity for us to evaluate the current version of Emely and analyze user interactions. For example, it has helped to improve performance, UI/UX, and handling of the very varying quality of messages that is received at an exhibition.

 

Prospects

Moving forward, we are looking to expand the scope and usage of Emely in the following ways:

  • User group – who could benefit from interactive language practice?
  • Practice scenario – which scenarios are relevant for practicing interactively?
  • Language – which languages other than Swedish could be useful to use with Emely?

If you are interested in the functionality of Emely, or how Emely can be applied to practice speaking interactively in other scenarios, please get in touch with us at info.nordaxon.com.