This is a lot less complicated than it appears. Given a set of sentences, each belonging to a class, and a new input sentence, we can count the occurrence of each word in each class, account for its commonality and assign each class a score. Factoring for commonality is important: matching the word “it” is considerably less meaningful than a match for the word “cheese”. The class with the highest score is the one most likely to belong to the input sentence. This is a slight oversimplification as words need to be reduced to their stems, but you get the basic idea.
Message generator component consists of several user defined templates (templates are nothing but sentences with some placeholders, as appropriate) that map to the action names. So depending on the action predicted by the dialogue manager, the respective template message is invoked. If the template requires some placeholder values to be filled up, those values are also passed by the dialogue manager to the generator. Then the appropriate message is displayed to the user and the bot goes into a wait mode listening for the user input.
At this year’s I/O, Google announced its own Facebook Messenger competitor called Allo. Apart from some neat features around privacy and self-expression, the really interesting part of Allo is @google, the app’s AI digital assistant. Google’s assistant is interesting because the company has about a decades-long head start in machine learning applied to search, so its likely that Allo’s chatbot will be very useful. In fact, you could see Allo becoming the primary interface for interacting with Google search over time. This interaction model would more closely resemble Larry Page’s long-term vision for search, which goes far beyond the clumsy search query + results page model of today:
A basic SMS service is available via GitHub to start building a bot which uses IBM’s BlueMix platform which hosts the Watson Conversation Services. A developer can import a workspace to setup a new service. This starts with a blank dashboard where a developer can import all the tools needed to run the conversation service. The services has a dialog flow – a series of options with yes/no answers that the service uses to work out what the user’s intent is, what entity it’s working on, how to respond and how to phrase the response in the best way for the user.

[In] artificial intelligence ... machines are made to behave in wondrous ways, often sufficient to dazzle even the most experienced observer. But once a particular program is unmasked, once its inner workings are explained ... its magic crumbles away; it stands revealed as a mere collection of procedures ... The observer says to himself "I could have written that". With that thought he moves the program in question from the shelf marked "intelligent", to that reserved for curios ... The object of this paper is to cause just such a re-evaluation of the program about to be "explained". Few programs ever needed it more.[8]