This project is about an arithmetic/mathematic chatbot (a chatbot is an artificial intelligence dialog system or an application that communicates with users and tries to deceive the users like it is human) that helps users with mathematical questions by answering questions that has been asked by a user through a textual method.
The Chatbot will be produced as a computer application with a huge support of wolfram alpha and pandorabot that provides answers to the queries entered by users. The product is mostly centred for people within the age of 10 to 50 who are interested in knowing more about a mathematical problem.
1. Table of Contents
2. Acknowledgement
3. Abstract
4. Introduction
4.1. Aim And Objectives
5. Research
5.1. Background
5.1.1. Architecture
5.1.2. Natural Language Processing (NLP)
5.2. Similar Existing Systems
5.2.1. Eliza
5.2.2. Siri
6. Requirement Specification
6.1. Data Gathering
6.2. Data Analysis
6.2.1. Questionnaires
6.2.2. Interviews
6.3. User Requirements
7. Product Specification
7.1. Logical Programming
7.1.1. Prolog
7.1.2. List Processing (Lisp)
7.1.3. Artificial Intelligence Markup Language (AIML)
7.1. Tools
7.1.1. Eclipse
7.1.2. RebeccaAiml
7.1.3. Wolfram Alpha
7.1.4. PandoraBot
7.2. Scripting/Programming Language
7.2.1. cURL
7.2.2. Java
7.2.3. XML
7.3. Skills/Knowledge
8. Development Plan/Method
9. Product Design
9.1. Flowchart Diagram
9.1. Gantt Chart
9.2. Sequence Diagram
9.3. Class Diagram
10. Implementation
11. Alternatives (how it could be done differently)
12. Testing
12.1. Black Box Testing
13. Evaluation
13.1. Good Points
13.2. Improvements
14. Maintenance
15. Conclusion
16. References
17. Bibliography
2. Acknowledgement
An appreciation will be given to everyone who has helped me during the research process of this project and also in the process of producing the product.
My supervisor (Dr. Wolfgang Faber) has been very inspiring and motivating within the whole time of the project. He has given advices, tips, and ideas of how to go about various problems that were encountered during the production of the Chatbot.
I will also like to thank Huddersfield new college for giving me the permission to collect useful data from their students that led to the user requirements of the product and also for letting their students take part in the evaluation of this product.
Thirdly, will appreciate the fact that most of the questionnaires that were used to carry out the data gathering were filled by the students of University of Huddersfield and without them, it would have been difficult to gather user requirements for the project.
Emily Treece, who is my lecturer, has also been of help by explaining the important parts of how to make a good research for a project. She has also been inspiring by helping me to set guidelines and work plan.
Most importantly, I will like to give thanks to Wolfram Research Company for the development of Wolfram Alpha as it is a major part of this project and without Wolfram Alpha, it would have been almost impossible to complete the project. I will also like to give a big thank you to Pandorabot for hosting my chatbot online.
3. Abstract
This project is about an arithmetic/mathematic chatbot (a chatbot is an artificial intelligence dialog system or an application that communicates with users and tries to deceive the users like it is human) that helps users with mathematical questions by answering questions that has been asked by a user through a textual method.
This Chatbot will be produced as a computer application with a huge support of wolfram alpha and pandorabot that provides answers to the queries entered by users. The product is mostly centred for people within the age of 10 to 50 who are interested in knowing more about a mathematical problem.
4. Introduction
Most Students now show lack of interest in calculations because they find it difficult to do most of them using calculators or other calculating instrument because they cannot be used to get some feedbacks they are interested in, like finding variables in an equation.
The fact that student might not get enough help with their mathematical problems when they are at home is a major concern because it could stop students from completing their home works at home. We do not want to encourage students to complete their home works in class when they should be concentrating and participating in the class activity.
Engineers also seem to have similar problems at work when it comes to getting extra information and feedbacks about mathematical queries. And because of these reasons, this computer Chabot program will be designed to simulate an intelligent friendly conversation concerning mathematics with human user via textual methods.
This product will mainly be reflecting on how to give users correct mathematical answers and give users clever replies even when the query does not involve mathematics. This product will be built in a form to behave like a personal mathematical assistant that can interact with users any time it is queried and get into conversations in English language.
This product will be produced as a computer application with an output and input area. Input area is for the editable input message from users and the output area that shows the conversation history between the user and the chatbot.
4.1. Aim And Objectives
This project will aim to solve the problem of students not getting enough help when it comes to mathematical problems and also aim to develop interest in calculations and mathematical issues in students.
However, this project will aim to give knowledge to the highest possible range of people by clarifying doubts and helping to generate and give a reasonable result in an interesting and friendly way.
The objectives of this project are to succeed in the following aspects; Producing an intriguing academic chatbot.
Producing a useful mathematical Artificial Intelligence (AI) files for the chatbot to use in cleverly communicating with users for an intelligent conversation.
Producing a chatbot that is platform independent.
A chatbot that can answer mathematical questions and act like a personal assistant in that field.
5. Research
5.1. Background
The background of this project will aim at the major research of the project and what has inspired the production of the product. This section will also discuss about why it was important to carry out the research and the relationship between the findings and the project. Moreover, the section will analyse the architecture of the project, the way the natural language processing works for the chatbot, and also the existing similar products showing the differences between them and this product.
The architecture of the project is really important to the project as it helps in aiming to the right direction and not deflecting away from the aims and objectives.
Natural Language Processing (NLP) has been researched for the use of this project because of the artificial intelligence involved in the system, NLP is a technique used in modern technologies to help machines or artificial agents with the comprehension of natural human languages.
Similar existing products have also been considered for the research of this project to understand how the technologies work
5.1.1. Architecture
This chatbot will be called an Agent in the world of Artificial Intelligence and agents are mainly structured to meet technical and operational requirements, and in the process of this, it will also be improving the quality, performance, and security aspect of the agent.
To produce a successful agent, there must be a consideration of key scenarios of the application so as to lead the developer to the main objectives and goal of the project, a good design for common problems so as to avoid the possible problems in the prospect of the project, there must not be a failure of reflecting to long term consequences of early key decisions because this can put the project at a very high risk.
illustration not visible in this excerpt
Fig.1 (Architecture of an Application)
A developer will normally consider the above diagram at an early point of production and marking the important and useful parts depending on the type of application or agent that is being built. However, for this project that is aimed about a mathematical chatbot, the application as focused more on the system and user point of view and therefore the type of questions that have helped as a guideline to the production are; how the users will be making use of the chatbot, how the chatbot will be managed and where it will be used, what are the performance requirements of the chatbot, and how the chatbot can be designed so that it will be flexible and maintainable over a long time.
5.1.2. Natural Language Processing (NLP)
The ability of humans being able to communicate with each other is through languages, either it being demonstrated, textual method, or spoken is all because humans control themselves. “A Language can be described as a series of simple syntactic rules” (page 3, Doina Tatar, 2013) [2]. It becomes very difficult when trying to make computers to understand this languages between humans, which is much more confusing to them. Consider the following sentence “I didn’t say he took the bag”, this sentence could mean different things in which way humans can figure out what the sentence is really implying depending on how it has been said or the emotions of which it has been said, but all this are not available for a computer and a computer could read it in different ways as the following;
“I didn’t say he took the bag” – someone else said it.
“I didn’t say he took the bag” – that is maybe he didn’t say it but either wrote it.
“I didn’t say he took the bag” – that is he said someone else took it.
“I didn’t say he took the bag” – maybe he said he borrowed it.
“I didn’t say he took the bag” – he might have said he took the “wallet”.
And because of this problem, natural language processing has been a serious issue for computers. For this project, there will be some natural language processing for the chatbot to reply users in a much clever way and explain what has been actually asked and trying to convert this into what the computer understands and replying back in English language.
5.2. Similar Existing Systems
There are two main technologies (Eliza and Siri) with a similar aim to the aims of this project. Eliza deals with trying to reply users textually using its list processing computer-programming language (SLIP) but due to its wide range of coverage, it gives unexpected replies sometimes when queried while Siri also deals with a wide range of coverage but gives more responses to users either by audio or by text using several API’s.
These technologies will be criticized based on performance, dependency, and flexibility
5.2.1. Eliza
Eliza is one of the earliest computer programs that deals with natural language processing and was created by Joseph Weizenbaum in 1966. Eliza was built using Slip Programming Language and the way it works is by processing user’s responses to its scripts and then it tries to match the user’s response to a similar word or sentence in the script, which it then uses to pick the best reply from the script to display for the user as a response [3]. Eliza also has the ability to store information and that makes it to be able to remember some of the things the user has said like if the user tells Eliza what his/her name is, the next time the user opens Eliza, Eliza might be able to identify the user by the name that was given previously.
illustration not visible in this excerpt
Fig.2 (Eliza Chatbot in a conversation with a user)
Furthermore, Eliza is a stand alone program that does not depend on any external application or any other program, it works using user replies to identify keywords and discover minimal contexts from the SLIP scripts to choose appropriate transformation and generate responses in the absence of keywords. Eliza is quite a flexible program based on the fact that it can be run on any operating system as a computer program or as an online application. Eliza does exactly what users expect by trying to respond to queries in a clever way and having a continuous conversation with users in terms of its performance but it does not recognise some punctuation marks, which affects its responses. Punctuation marks are really helpful to be recognised by a chatbot for the improvement of the chatbot’s natural language process.
5.2.2. Siri
Siri is an application that was developed by the Apple Company for Iphones, Ipads, and Ipods. Siri is an intelligent personal assistant that helps in getting things done as requested by the user, either by voice or by text. Through siri, a user can make phone calls, send text messages, schedule meetings and even make use of google map. Siri is clever enough and supports fifteen international languages and the interesting thing about Siri is that it has been built in a similar architecture as the product of this project is intended. Siri makes use of Wolfram Alpha API to make some mathematical questions that has been asked by a user. The image below shows an example of Siri getting answers from Wolfram Alpha, the question has been sent to wolfram alpha and the result from wolfram alpha has been displayed on Siri with a reference to Wolfram Alpha at the bottom of the image.
illustration not visible in this excerpt
Fig.3 (Apple’s Siri giving answer to a question)
Siri is an intelligent application that works only on the Apple IOS4 operating system or later. Siri relies on web services (a method of communication between two or more devices over the world wide web) and other applications like contacts, calendar, clock, app store etc. Therefore most user requests are sent through web services using web applications like wolfram alpha, Google maps, yahoo Bing answers etc. This means Siri is highly dependent on other applications and if these applications don’t exist then siri might have problems in executing requests. Moreover, Siri will need the device to be connected to the Internet before it can give replies to certain requests.
6. Requirement Specification
6.1. Data Gathering
Data has been gathered with questionnaires, interviews, and observations.
30 questionnaires were handed out to people to fill, university of Huddersfield students filled 20, Huddersfield college student filled 5 of them, and others were filled by strangers on the street of Huddersfield. Questionnaires were used because it was the easiest way to get responses from people without wasting so much of their time. Thought of an additional question to include in the questionnaire, after the questionnaires were already handed out, and the question was to ask which would be more attractive and catching among layout, colours, animations from the a given list of examples.
Another question that should have been asked was if users would have preferred to run the application as a phone application rather than restricting users on just computers. Although the plan of the project was to produce a computer dialog system or a computer application but this could have been changed if there was an option of using the application on the phone and users have chosen using it on their phones instead.
2 interviews were carried out and all recorded, 1 of them was with a university student from Huddersfield, and the other interview was with a business worker in Bradford. An interview was used because it was the best way to know exactly what people feel and think and not narrowing their options. It will give more time with the interviewee to communicate and get as much as possible information from them.
6.2. Data Analysis
6.2.1. Questionnaires
The age group of people who participated in the questionnaire was needed for the data gathering so as to be able to compare the age group that is mostly interested in the application and to understand the way each age group as responded to certain questions.
Area of discipline for users is necessary because of the mathematical topics that will be needed for the product. For this data, most users are either in science, engineering, or business and this means mathematical topics that involve these areas will be more focused on.
This question was only asked to know if most people know about chatbot and how important and detailed it will be to produce a manual guide for the chatbot that explains how the chatbot is used.
This is a question asked to know how much users request for mathematical help. This is an important question to ask to be able to know how the product is needed. However, 40% of the people said they need help few times and this might be due to the fact that 17% of the people taking the survey are in other categories of discipline whom might not even be coming across any mathematical questions.
It is important to know where people mostly get mathematical help so as to be able to know how to implement the product to suit the need of users and it is sad that there is a percentage of people who do not get any help when it is needed.
[...]