Machine learning applied to automated messaging has brought back to life the importance of language, in particular in the bot field in which research and development have to work together with business.
Two giant hands hold something that is hidden in the darkness. Thumbs are moved up and down alternatively leaving the viewer captured by such slow-motion movement while trying to understand the related gestures.
It seems like to be one of the most common action made by the contemporary human beings: the composition of a text message on a smartphone.
This is one of the sequences of Visitors, a 2015 famous movie directed by Godfrey Reggio with the soundtrack of Philipp Glass and produced by Steven Soderbergh.
The feeling that those hands unleashes in our mind, even before we can understand the action, confirm our visceral relationship with the writing action. The reflection of Reggio is a good way to focus on the roots of the Natural Language Processing applied to the conversational marketing, in particular on language.
Dialogue
One of the most important news produced by the spread of virtual assistants is the return to writing as prevailing element compared to the image.
We are used to a responsive web, a web that can answer just to one question per time.
And we know that in most cases we need and we search for more than just an answer.
If for example we want to buy a women’s shirt, even with some doubts about the color and perhaps on the size, the user – or better the consumer in this case – has to perform some tasks in order to achieve the goal: first of all find the model of the shirt on the e-commerce, then be sure of the availability, find the right size, choose the color, and lastly complete the purchase. Different tasks on different websites pages most of the time.
But chatbots can change this perspective!
Thanks to conversation, it seems to be a proactive agent that can guide the users through its memory in order to find in his data the tasks – services and information – useful to complete, as in the case described before, the purchase of the shirt.
These are all tasks that can be done without even getting out of the chat, thanks to the use of buttons and other instruments through which the user can interact during the dialogue.
READ ALSO: Do you know what Conversational Interfaces are?
Natural language processing
The process that allows the machine to understand and interact with the human beings is called Natural Language processing (NLP) which often works along with Machine learning, the technology that gives machines the learning ability.
The most evolved virtual assistants are the ones developed during the last years. However, what we have today is the result of a fifty-year-long evolution.
The fundamental step was moving from the conversational world to chatbots with a multimedia interface in which text, images, and command buttons live together.
An integrated system that modifies the meaning and the functionalities of the chatbots.

The first experiment occurred back in the 50s with the Turing Test, which consisted in making a person communicate with a human through writing and – at the same time – another person with a bot, without telling them who was speaking with whom.
The experiment would have considered successful if the user did not notice the difference between communicating with a human and a bot. It was then interrupted in the 90s due to the primitive stage of the technology and the struggle of giving a purpose to the bot (similar to what happens today with the customer service).
Until not long time ago, the model of the generic virtual assistant – the ones you can chat with like Siri and Google Assistant – seemed impossible to overcome.
The turning point came recently with the creation of powerful algorithms and new channels that allowed to “address” bots with defined purposes to the companies’ services.
By giving a purpose to the machine, the User experience has also been positively affected, becoming a science aimed at improving user understanding.
Today’s Bot
Research on Artificial Neural Networks started in the 80s, but the practical use of the computational capacity applied to the artificial intelligence became in the 2000s with their application in image recognition, whereas its application with the language is something even more recent.
Computational power improves day by day, making possible to operate with a large amounts of data. The best performing algorithms are very recent and the sector is so young that the “research and development” side evolves with the “business” side.
Word Embedding
Today, NLP extended his field of study over the single word understanding to complete sentences and paragraphs.
A modus operandi that allows to deal in a more efficient way to problems of disambiguation that often arise. Indeed, it is possible to find words that have more than one meaning.
Mapping sentences and words has made it possible to avoid this kind of problems allowing, for example, to add to a word like “fishing” the most appropriate meaning with the contest in which it is used.
To the base of this giant and difficult work there are sophisticated algorithms known as Recurrent Neural Networks.
Machines weigh and measure words
But how is it possible to give them a shape? We cannot deny that it not as simple as we can imagine. We can try to understand this process by imagining a vector space, like a multidimensional space, in which words are arranged based on their semantics, an hard work especially for mapping synonyms and contraries.
The name of this complex process is called Word Embedding.
Dialects, misprint and grammar errors are among the most difficult obstacles to overcome as a data scientist.
In the past, Spell Checking was based on the principle of similarity: in the event of a typing error, a similar word was recommended in the dictionary. In such regard, the nearest example we have is the automatic correction of MS Office.
Machine Learning
The discovery of Machine Learning Algorithms has allowed us to go beyond word embedding, obtaining a textual analysis that relates individual words to the context in which they are found.
But let’s go with order.
Today, the most used approaches in the automated messaging solutions are Supervised and Unsupervised. They are directly applied in Data-Driven Marketing where user data is used to create virtually customized communication and sales strategies.
In this field it is not only the quantity of data to make the difference but also their type and their quality. Being statistical algorithms, the results depend both on how the model is structured and what type of data is used.
A model applied in the wrong way can even lead to the opposite conclusions compared to the desired result.
In the realization of products related to the chatbots, the most common is the Supervised approach. This model fulfils the need of controlling the output of the user answer that later goes under the lens of NLP, that is the analysis of the natural language.

Therefore, it makes possible to define with precision the identity of the final user and therefore also the bot one which, thanks to constantly updated data, can improve over time its performance.
Both in the research and business applications, Unsupervised approaches are also spreading at steady pace.
An example is the evolution of the most used online translation tool: Google Translate. From November 2016 onward, Deep Learning (deep neural networks able to give more accurate translations) had been included within the algorithm, giving a boost in terms of performance and overall complex language understanding to the whole platform.
This approach, knows as Google Neural Machine Translation, allowed to consider translation of entire sentences, whereas before the words were analysed independently from the whole context.
This example is perfect to understand the approach of the modern machine learning when speaking about the learning of languages.