whatsapp

whatsApp

Have any Questions? Enquiry here!
☎ +91-9972364704 LOGIN BLOG
× Home Careers Contact
Back
Android General Knowledge Chatbot
Android General Knowledge Chatbot

Abstract:

A chatbot is a conversational agent where a computer program is designed to simulate an intelligent conversation. It can take user input in many formats like text, voice, sentiments, etc. For this purpose, many open source platforms are available. Artificial Intelligence Markup Language (AIML) is derived from Extensible Markup Language (XML) which is used to build up a conversational agent (chatbot) artificially. In this paper, we use „programo‟ which is an AIML interpreter for the generation of the responses of users input. We have used this method for developing an android application chatbot which will interact with user using text and voice responses.

INTRODUCTION

Over the last few years, Chatbots have played a prominent role as human-computer interfaces. Chatbots are generallycomposed of three modules: the user interface, an interpreter, and a knowledge base. Laven [6] defines Chatbot as a program that attempts to simulate typed conversation, with the aim of at least temporarily fooling the human into thinking they were talking to another person. Basically, chatbot is a conversational agent that can interact with user in a given subject using the natural language. Many chatbots have been deployed on the internet for the purpose of education, customer service site, guidance, entertainment. Existing famous chatbots are ALICE [2], SimSimi and Cleverbot. Artificial Intelligence Markup Language (AIML) is derived from extensible Markup language (XML) which is used to build up a conversational agent artificially. The AIML based chatbots are famous because they are light weighted, easy to configure as well as at minimum cost. AIML has class of data objects called AIML object which describes behaviour of computer programs. In our paper, we have used program-o [1] which is an open source AIML engine written in PHP. It is an interpreter for the AIML scripts of the chatbot. It uses MySQL database to store the chatbot details. Also, we are storing all the AIML scripts to the database. When user sends message to the chatbot program, then according to matched reply from the AIML, the answer is formulated and send back to the user. It can bedirectly installed on a local server under the GNU General Public License. The chatbots that have been deployed on the internet uses text, voice as well as sentiments as the input. In this paper, we have used the text and voice as user input. Text I/O is relatively effective as user can review for the input so that it can be rechecked if there are any mistakes. However, giving text input consumes time. So, the solution is to introducing voice interface with the speech recognition technology. By these methods, this chatbot application is very able to make conversation with the user. 

LITERATURE SURVEY

Eliza is considered as the first chatbot which works on the pattern matching system. It is developed by Joseph Weizenbaum in 1964 [2]. ALICE [3] is rule-based chatbot based on the Artificial Intelligence Markup Language (AIML). It has more than 40,000 categories, where each category has combination of pattern and its response. Md.Shahriare Satu and Shamim-AI-Mamun [7] showed the review of applications of the Chatbot which are developed using the AIML scripts. They said that AIML based chatbots are easy to implement, they are lightweight and efficient to work. Their paper gives the detailed information about the different applications of the chatbots. Thomas N. T. and Amrita Vishwa [4] designed a AIML and LSA based chatbot to provide the customer care service over the E- commerce websites. Their approach shows we can improve the chatbot ability by adding other models to it. In android operating system, we can implement the chatbot using the various approaches. One of the approaches is shown by Rushabh Jain and BurhanuddinLokhandwala in their Android based Chat-Bot [12] paper. 

The system works in two modes, text and voice. When user gives the input in text format the first mode is activated. The user input is passed to the middleware API for the response. On other hand when user gives the voice input then second mode is activated, In this voice mode we first convert the voice into text before sending it to middleware API. Middleware is the model which connects the AIML scripts with our android app. When user input is received at the middleware, it is passed to the pattern matching algorithm which runs over the AIML scripts. In this process, firstly the pattern matching algorithm is executed for matching of the valid response from the available AIML scripts. When pattern is matched, the corresponding template is return to the middleware. Then Middleware encodes the template into the JSON format and sends the reply to the android app. After receiving the response app decode the JSON and gives the response to the user. The response generation process is carried out with two phases

.IMPLEMENTATION

This section is divided into two parts, first detailed implementation of text based chatbot, second detailed of the implementation of voice based chatbot.A. Implementation of Textbased Chatbot This approach starts with taking the text input from the user in the android app. We promote user to enter the question for the chatbot and then we read the entered value in the edit text. Then send the value to the interface of our hosted Program – O. Get the reply from the Server, Server gives reply in the JSON format [9] We need to parse it to get the bot‟s response. If bot‟s response is null then set the response to the error string and show it to the user. Repeat the same task for the continuous chatting with the chatbot.

The following steps explain the implementation details to accomplish the above-mentioned tasks:

1. Read the user input on the onClick event of the send button.

2. Send the user input to the program – o hosted server using the HttpUrlConnection. Here we are dealing with the internet stuff so we need to call this method in the AsyncTask [8] of the android system. AsyncTask runs in the background of the app.

3. Wait till getting the reply from the server. OnPostExcute method of the AsyncTask will get the JSON formatted reply. Then send it to JSON parser [9] to extract the bot‟s response.

4. After extracting the bot‟s response, we need to display it to the user. So, append the response to text view.

5. Then repeat the process for the next user input.

B. Implementation of Voicebased Chatbot This approach starts with voice input for the user. Here on start app will ask user for the voice input for user. Then we need to convert the voice value to the text because we have the server with our program – o which understands only text values. After the conversion of the voice to text the value is sent to the server for the reply. As we have already discussed server replys in JSON format, so we need to parse [9] it. Get the response of the bot after the parsing. We have taken the voice input so, here we are giving the voice output. Bot‟s response is converted to voice and played through the phones speakers. Repeat the steps for continuous chatting with chatbot.

The following steps explain the implementation details to accomplish the above-mentioned tasks:

1. Promote user for the voice input on onCreate method. Record the user voice till the speech end event.

2. Now convert the voice into text using the Google‟s Speech Recognizer API of the android [10]. After getting result of the conversion send the data to the server.

3. Use the HttpUrlConnection in the AsyncTask for requesting the reply from the server. 4. We will get the reply in the JSON Format [9] Parse it to get the reply of the bot.

RESULTS AND DISCUSSION

To demonstrate our approach, we have developed an android application. This application can be used to chat with the bot through voice and text also. In the home screen, we have navigation option for two different activities, first we can start communication with the bot using our voice and in the second we can communicate with the bot using text messaging like another messaging apps we are using.Here in the text based chatting, we have to type our message and send it. On the send button click event our text message is passed to the AI Dataset of a bot which is hosted on the localserver or on the internet. After getting the reply from the server, we are printing it on the message view. This is the working of the android app which is built to demonstrate our approach.

CONCLUSION AND FUTURE WORK

In this paper, we have introduced a chatbot application in android which is able to interact with users. This chatbot can answer for queries in the textual as well as in voice form of user input. For this purpose, AIML with program-o has been used. The chatbot can answer only those questions which he has the answer in its dataset. So, to increase the knowledge of the chatbot, we can add the APIs of Wikipedia, Weather Forecasting Department, Sports, News, Government Services and a lot more. In such cases, the user will be able to talk and interact with the chatbot in any domain. Using the APIs like Weather, Sports, News and Government Services, the chatbot will be able to answer the questions outside of its dataset and which are currently happening in the real world.

ios based cse engineering project
iot based cse final year projects
iot based projects for cse
iot based major projects for cse
iot based projects for computer science
iot based projects for final year computer engineering
iot based mini projects for cse
iot based projects for cse final year students
cse final year projects on iot
iot based final year projects for cse
final year projects for cse based on iot
iot projects for cse students 2020
iot projects for cse students with source code
iot projects for cse students 2021
iot projects for cse students 2019
iot projects for mtech cse
best iot mini projects for cse
projects based on iot for cse
best iot projects for cse students

 

Popular Coures