Ontbot: Ontology Based Chatbot: Hadeel Al-Zubaide, and Ayman A. Issa
Ontbot: Ontology Based Chatbot: Hadeel Al-Zubaide, and Ayman A. Issa
Ontbot: Ontology Based Chatbot: Hadeel Al-Zubaide, and Ayman A. Issa
Abstrac1— A new ontology based approach is proposed to model candidate. A number of tools and techniques do handle the
and operate chatbots (OntBot). OntBot uses appropriate mapping issue of mapping one of them into the other; ontology to
technique to transform ontologies and knowledge into relational relational database and vice versa.
database and then use that knowledge to drive its chats. The One of the main issues currently facing such a huge amount
proposed approach overcomes a number of traditional chatbots of ontologies stored in a database is the lack of easy to use
drawbacks including: the need to learn and use chatbot specific interfaces for data retrieval, due to the need to use special
language such as AIML, high botmaster interference, and the use query languages or applications. Currently, users who wish to
of non-matured technology. OntBot has the additional power of utilize ontology repositories need to know the contents of the
easy users interactions using their natural language, and the ontology, which means understanding OWL (Web Ontology
seamless support of different application domains. This gives the Language) or RDF (Resource Description Framework), and
proposed approach a number of unique scalability and know how to query these ontologies using one of the ontology
interoperability properties that are going to be evaluated in query languages, e.g., SPARQL. Such requirements are some
future phases of this research project. of the major reasons the Semantic Web has not become
mainstream as fewer than expected users are utilizing such
I. INTRODUCTION knowledge.
Chatbot is a computer program that interacts with users
I n recent years the development of ontologies has been using natural Languages [2]. Chatbot systems allow to realize
moving from the realm of Artificial-Intelligence laboratories simply a dialogue system based on natural language.
to the desktops of domain experts. Ontologies have become Therefore, they can be used as interfaces to a vastness of
common on the World Wide Web and a trend of modeling in applications including entertainment applications, educational
Information Systems development where we can get use of the applications, e-learning platforms, research engines, and e-
great benefits provided by them. Ontologies are human commerce web-site navigation.
readable, comprehensive, sharable and formal which means The usefulness and complexity of ontology based data
that they are expressed in a language that has well-defined retrieval, features of relational databases management systems,
semantics. Ontologies are important to application integration the lack of easy to use query interface, and chatbot features
solutions because they provide a shared and common have directed this research to investigate the possibility of
understanding of data that exist within an application having a usable ontology based query interpreter and
integration problem domain. Ontologies also facilitate responder chatbot.
communication between people and information systems. In this paper, an ontology based chatbot (OntBot) is
However, while today there is an unprecedented wealth of proposed to provide an easy to use, domain independent,
information available on the Web, to fully realize the power of scalable, dynamic and smart conversational agent. In the
ontologies and to enable efficient and flexible information proposed approach, the ontology will be firstly converted into
gathering, persistent storage of ontologies and its subsequent relational database as basis for a strong chatbot knowledge
retrieval is of paramount importance. base.
From the other side, the relational database technology has Sections 2 and 3 present some background and related work,
ensured the best facilities for storing, updating and respectively. Section 4 demonstrates the details of the
manipulating the information of problem domain. The proposed approach. The conclusions and future work are
relational database also has proved its capabilities to cope with outlined in section 5.
large amounts of data [1], these data can be represented by the
ontologies themselves somehow. In addition, features of II. BACKGROUND
relational databases management systems (e.g. transaction This section describes necessary components that are not the
management, security and integrity control) make it much main contributions yet are important for the proposed
more preferred when compared to traditional file systems. This approach. These are chatbot, ontologies, and the mapping of
represents one of the strong motivations behind our proposed ontologies to relational database.
approach to utilize relational databases as a good storage A. Chatbot
A Chatbot (or chatterbot) is a type of conversational agent, a
1
Hadeel Al-Zubaide, Department of Computer Science, Princess Sumaya computer program that designed to simulate an intelligent
University for Technology, Jordan ([email protected]). conversation with one or more human users via auditory or
Ayman A. Issa, Software Engineering Department, Philadelphia University,
Jordan ([email protected]).
textual methods. This computer programs are also known as
8
relations. After this, the transformation of ontology data type Traditional chatbots are domain dependent, the botmaster is
properties into relational database data columns occurs. Finally responsible on statically handwriting thousands or more of
ontology constraints are transformed relational database into possible conversational scenarios, questions and their
metadata tables [12].
corresponding answers according to specific domain to fool
human of being lifelike. A new chatbot should be created and
separate scenarios have to be built by botmaster each time a
domain changes. The power of OntBot relies on its capabilities
of handling different domain knowledge automatically without
the need of human intervention; Whatever the type of ontology
files that will be mapped, after the conversion into database
tables, OntBot should be able to handle different questions-
answers scenarios by itself without the need to predefine them.
9
knowledge base here will contain the resulted mapped match between words' roots (from both sides, input word and
ontological tables. This will empower our chatbot with all the stored word to be matched with) and thus, if the entry in our
facilities and advantages of the database and DBMS over the database that is coming from the WWW and resulting from
file system. ontology mapping is in its present tense while user input writes
OntBot knowledge base could be integrated with any it in past tense, it will not be considered as a mismatch. There
existing database. It may also contain extra optional tables. are many available stemming algorithms [9] for example,
These tables could be predefined ones or added at any time, OntBot can employ one of the most effective and widely used
they may contain scenarios to handle greetings, out of scope stemming algorithms known as Porter stemming algorithm (or
topics, session information to be managed or used later by ‘Porter stemmer’).
botmaster. Synonyms/alternatives of a word are obtained in order to be
checked. This is required if there is no match found between
C. Natural Language Processing Module
user input token and a stored word one, in this case OntBot
This module is responsible on processing user input in a will assume that the user may use a synonym words of the
way that facilitates the mission of getting the needed answer. stored one so it will get them all. These synonyms will be in
Several functionalities should be taken into account before turn considered as new entries and one by one searched against
start searching for a match in OntBot knowledge base and then the target stored words. If again no matching found, the word
succession in getting the best answer. Such functionalities will be considered as a mismatched one. WordNet [16] is
include input tokenization, stopper filtering, stemming and going to be used to find words alternatives.
synonyms handling. Figure 2 illustrates the four
functionalities and their sequence. D. OntBot Inference Engine
This is the main component of the architecture. It represents
the brain of OntBot. The input to this module will be the
normalized user question that results from Natural Language
Processing Module while the final output will represent the
target answer. This answer will be then forwarded to the next
module which is to prepare and decorate it for final
presentation. Three sub-modules, as shown in figure 4,
formulate the Engine: Scope Specifier, Rule Matcher, and
Query Processor.
10
OntBot for more details on how to get benefit from all that as a OntBot rules will be dynamic in terms of the way they will
secondary service provided by this module. Technically be defined and the domain they will cover. The botmaster of
speaking, having the normalized user input tokens that are OntBot can define new rule each time he figures out new
resulted from the previous phase; Natural Language suitable one, he can dynamically add any kind or number of
Processing Unit, this module will rely on Ontbot’s knowledge rules from simple to complex one at any time as long as they
base (data and/or meta data) to find any related match with could be translated to a real SQL query somehow, what
user input, whether it’s a match with table name, attributes or specializes OntBot is the ability to deal with various questions
specific instances. If a match is successfully found, Scope domains as long as it could be answered from the available
Specifier will feed the next module, Rule Matcher, with the knowledge in OntBot knowledge base, while the other
needed information to aid it in continuing the job of getting the ontology based chatbot is limited to fixed predefined questions
needed response as what we will see next. domains [14].
2) Rule Matcher 3) Query Processor
After specifying the scope of the conversation and getting This module will be responsible of the actual physical
the needed information from the previous module, Rule queries execution. It takes the right queries from the Rule
Matcher will try to find a matching rule given the normalized Matcher, check their correctness before executing them against
user input tokens as another input. Rule Matcher will perform OntBot knowledge base. Retrieved results are then passed in a
some manipulation over both inputs to form the basis that it suitable and readable way to the Answer Formalism Unit that
will depend on when searching for appropriate rule. Such rules will take care of displaying readable and understandable
simply should be in the following form: answers to the user.
11
TABLE I
Inference Engine’s Sample Rules.
Question Format Scope Specifier Output Query That
What is Xi ? Xi : Instance in Table Y that have A and B Select B from Y where A = Xi Xi
attributes.
Xi belongs to A.
A prototype of OntBot is being developed and evaluated Basedsupport to Process Integration in ODE CLEI Electronic
against a number of application domains to demonstrate its Journal, 7 (1),
generalizability aspect. Further, user evaluation is being [9] Abran, A., Cuadrado, J., Garc´ ıa-Barriocanal, E., Mendes, O., S´
planned with associated users to the research project. anchez-Alonso, S., and Sicilia, M., (2006). Ontologies for
Software Engineering and Software Technology. Berlin Heidelberg:
REFERENCES Springer-Verlag.
[10] Gali, A., Chen, C., and Kajal, T., Claypool and Rosario UcedaSosa.
[1] Goodwin, R., Lee, J., and Stanoi, G., (2005). M.I. Leveraging. From Ontology to Relational Databases [online]. Hawthorne, NY
Relational Database Systems for Large-Scale Ontology Management
10532, U.S.A.: IBM T. J. Watson Research Center.
in Proceeding of CIDR Conference [11] Astrova, I., Korda, N., and Kalja, A., (2007 ). Storing OWL
[2] Abu Shawar, B. and Atwell, E., (2007 ). Chatbots: Are They
Ontologies in SQL Relational Databases in Proceedings of
Really Useful? in Proceedings of LDV-Forum 2007 Band 22 World Academy of Science, Engineering and Technology
(1) pp.31-50. [12] Vysniauskas, E and Nemuraite, L., (2006). Transforming
[3] ALICE, (2011). A.L.I.C.E. Artificial Intelligence Ontology Representation From OWL TO Relational Database
Foundation [online]. Available from: Information Technology and Control , 35 (3A),
http://alice.pandorabots.com/ [Accessed 05/25/2011]. [13] ZHUGE, H., XING, Y., and SHI, P., Resource Space Model, OWL
[4] Freese, E., (2007). Enhancing AIML Bots Using Semantic Web and Database: Mapping and Integration [online]. Beijing, China.:
Technologies in Proceeding of Extreme Markup Languages Chinese Academy of Sciences.
[5] Falbo, R., Menezes, C., and Rocha, A., (1998 ). A Systematic [14] Alexandru Dobrila, t., (2010). From Semantic Web Knowledge To
Approach for Building Ontologies in Proceedings of 6th A Functional Conversational Agent: A Practical Approach.
IberoAmerican Conference on AI, number LNCS1484 in Lecture [online]. Available from: http://airtudor.com/
Notes in Arti?cial Intelligence Lisbon, Portugal pp.349-360. semantic_chatbot.pdf [Accessed 05/21/2011].
[6] Falbo, R., Guizzardi, G., and Duarte, K., (2002). An Ontological [15] Fernįndez, M., Gómez-Pérez, A., Pazos, J., and Pazos, a., (1999).
Approach to Domain Engineering in Proceedings of 14th Building a Chemical Ontology Using MethOntology and the
International Conference on Software Engineering and Knowledge Ontology Design Environment IEEE Intelligent Systems Applications,
Engineering (SEKE’02) Ischia, Italy pp.351-358. 4 (1 ), pp. 37-45.
[7] Liao, L., Qu, Y., and Leung, H., (2005). A Software Process [16] WordNet, (2010). WordNet Project [online]. WN Team.
Ontology and Its Application in Proceedings of Workshop on Available from: http://wordnet.princeton.edu/ [Accessed
Sematic Web Enable Software Engineering (SWESE) Galway, Ireland 05/21/2011].
[8] Ruy, F., Bertollo, G., and Falbo, R., (2004). Knowledge-
12