The Dialog System Core

The Dialog System Core takes care of spawning, deleting and managing Conversations, initializing and providing all necessary static core features and services like the memory, the NLU, StateMachine, etc. to Conversations.

At it’s heart is the ConversationManager, which is accompanied by the external services of Memory and NLU and the InputDevices and OutputDevices which provide interfaces to communication channels which we call World Interfaces, since the Roboy Dialog System may interface the world through these.

Dialog System Core architecture


The roboy.dialog.ConversationManager is the central managing node for the Dialog System. It is the entry point of the program. When roboy.dialog.ConversationManager.main() is launched, it initializes all necessary modules and then enters control-mode, where it assumes a behaviour depending on the selected InputDevice in order to provide control over the Conversations.

During the initialization phase all components that are included in the Dialog System core are initialized. This especially includes the NLU (in form of a queue of several roboy.linguistics.sentenceanalysis.Analyzer classes) and world interface specific initializations ( world interfaces may for different reasons need a centralized initialization separate from the I/O devices which are used to communicate with them).

In order to manage Conversations it stores them by UUID, which is in the format “[world-interface-name]-[uuid-from-world-interface]”, for example “telegram-aaaaaaaaaaaa”. Then it provides an API consisting of methods that allow controlling the Conversation threads if you know their uuid. It allows creating and spawning new Conversations and restarting, stopping and pausing existing ones. Also it allows deregistering Conversations so they can properly be destroyed when they are over.

InputDevice & OutputDevice

The and roboy.dialog.OutputDevice classes are interfaces that may be used to provide access to World Interfaces to the Roboy Dialog System. Their actual behaviour depends on the architecture of the system that should be interfaced.

In order for input to be handled by the Conversations, an implemnetation of must provide a public Input listen() method. A Conversation Thread will call this function in order to recieve a new If no new input has been generated by the user, the thread should wait inside the listen() function until a new input is generated.

To enable a Conversation to send output to a channel, an implementation of must provide a public void act(List<Action> actions) which should process the different types of roboy.dialog.action.Action according to the capabilites of the communication channel.

NLU (Semantic Parser)

The NLU submodule is used to translate text inputs into formal semantic representations. This allows for capturing the semantic intent behind a statement or question, and using knowledge bases to translate formal question representations into answers.

The roboy_parser NLU module is based on SEMPRE <>. It is currently being modified to fulfill Roboy Dialog system needs.


Semantic parser is based on a language model and NLP algorithms that apply rules to utterances to translate them to semantic representations. Language model consists of: - set of grammar rules, - lexicon, - training dataset.

General architecture can be seen on the diagram below.

Semantic parser general architecture

For more information please refer to Natural Language Understanding (nlu/roboy_parser).

Linguistic Analyzers

Linguistic analyzers (derived from de.roboy.linguistics.sentenceanalysis.Analyzer) process user utterances to provide some information (SentenceType, Tokens, Emotion etc.) for Interpretation (de.roboy.linguistics.sentenceanalysis.Interpretation).

For example, EmotionAnalyzer (de.roboy.linguistics.sentenceanalysis.EmotionAnalyzer) processes user utterances and sets emotion variable of Interpretation (de.roboy.linguistics.sentenceanalysis.Interpretation) with related RoboyEmotion (de.roboy.dialog.emotions.RoboyEmotion) value, by this way Interpretation can be checked at StateBasedPersonality (de.roboy.dialog.personality.StateBasedPersonality) for special treatment (responding according to emotion or responding with EmotionAction etc.)

Memory (The memory module)

For more in-depth information please refer to Roboy Memory.

General design

To remember information about itself and its conversation partners, their hobbies, occupations and origin, a persistent Memory module has been implemented using the Neo4j graph database.