A Research Paper on HUMAN MACHINE CONVERSATION USING CHATBOT

Page 1

Key Words: Chatbots,KnowledgeModelling,Methodology, ConversationDesign,IntelligentTutoring.

|

| ISO

***

2. LITERATURE SURVEY

p

Volume: 09 Issue: 03 | Mar 2022 www.irjet.net ISSN: 2395 0072 2021, IRJET Impact Factor value: 7.529 9001:2008

Tech giant Google describes the word " Chabot" as: " A computerprogramdesignedtosimulateconversationwith human users, especially over the internet. " While communicationremainstheprimarypurposeofachatbot, during this project, we realized that there is much more happening beyond the communication interfaces. The interfaces may change, but the underlying technology remainsthesameandthatisAI.Therefore,thoughwehave titledtheprojectas"Human Machineconversationusinga Chatbot", this is essentially a project in AI. AI, Natural Language Processing and Machine learning are the core conceptsinvolvedinthisproject.Artificialintelligenceisthe ability of machines /computers to do things and make decisionsbasedontheirovenknowledge,withoutexplicit instructions.ThisisarathergeneralizeddefinitionofAI;it includesplanning,understandinglanguage,comingupwith appropriate responses and learning from previous responses/ data, recognizing objects and sounds and problemsolving.MachineLearning(ML)isawayinwhichAI canbeimplemented.Itconcentratesontrainingthesystem andlettingitthinswhenit'sover.Theresults,inthiscase, arebasedonthedatausingwhichthesystemistrainedand the training itself. Deep Learning (DL) is an approach of implementing ML. It is inspired from the working of the

International Research Journal of Engineering and Technology (IRJET) e ISSN: 2395 0056

1B.E Graduate (IV year), Department of Computer Science and Engineering, SCSVMV, Kanchipuram

●Intheliterature,theauthorsuseddifferentapproachesto getdifferenttechniquesandmethodstogetabetterchatbot.

1. INTRODUCTION

2B.E Graduate (IV year), Department of Computer Science and Engineering, SCSVMV, Kanchipuram

3Assistant Professor, Department of Computer Science and Engineering, SCSVMV, Kanchipuram

Certified Journal | Page1227

humanbrain,howneuronsareinterconnectedintheKranto formanetwork.DeepLearninginvolvestheuseofArtificial NeuralNetworks,whichmimictheworkingofthenewions inour brain.Natural LanguageProcessing(NLP)is a very importantpartofAI.WithoutNLP,AIwouldnothavebeen possible. NLP allows developers to organize and give structuretoKnowledge.

©

A Research Paper on HUMAN MACHINE CONVERSATION USING CHATBOT

●Forthesereasonstheexistingsystemshadproposedmany applications.

Abstract Chatbotssquaremeasurecannyspecialistswith thoseclientswillholddiscussions,regularlybymeansoftext or voice. Lately, chatbots became inescapable in organizationsfixatedoncustomeradministration.Inspiteof arisinginterestforchatbotsininstruction,clearinformation while heading to style them as astute mentors has been scant. This paper presents a conventional philosophy for planningandcarryingoutachatbotasacannycoachfora college level course. The approach is based upon first request rationale predicates which can be utilized in different industrially accessible devices and spotlights on two stages: information reflection and displaying, and discussion flow. As the principle aftereffect of this exploration, we propose numerical definitions to display discussioncomponents,thinkingprocessesandconflictgoal toformalizethephilosophyandmakeitsystemfree.

1.1 SCOPE OF THE PROJECT

ROHAN TIWARI1 , G.M.S.S. PRANAV2, Mrs. R. PREMA3

●ChatbotisanAIsoftware.Itcancommunicatewithauser in natural language through messaging applications, websites, mobile apps. Conversation between human and automatedconversational agentsaremorechallenging. In this paper, I reviewed some literature that uses different techniquesforchatbotimplementation.

●M.D.Leonhardtetal.presentedanapproach,achatbotisa programthatsimulatestypedconversation,withthepoint of, fooling a human into thinking the human is talking to someoneelse.Achatbotisacommunicationsoftwarethat

Thisprojectusestechnologiesofartificialintelligenceand machinelearningtocreateachatbot.Thechatbotistrained usingdatasetsofvarioustypessothatitcananswerabroad range of questions. It is different from a normal human machine interaction because the chatbot learns as it progressesandadaptsquickly.Theprogramminglanguage thathasbeenusedinthisprojectisPython.ThoughJavais still widely used for many real time applications, Python remainsoneoftheversatileandrobustlanguagesinmodern computing. The fields of machine learning and AI are amongst the current trends in computer Science and Technology. Every year, new technological breakthroughs areannouncedinthesefields.Researchisactivelygoingon in these domains. However, these are also not completely developed and are still "learning". Everyday there is somethingnewourchatbotcanlearn.Therefore,thereisno fixedstandardforchatbots

Chatgui.py This is the Python script in which we implementedGUIforourchatbot.Userscaneasilyinteract withthebot.

Architecture:Process:Algorithm:

Proposedmethod:

Volume: 09 Issue: 03 | March 2022 www.irjet.net ISSN: 2395 0072 IRJET Factor value: 7.529 9001:2008

Certified Journal | Page1228

Words. PKL This is a pickle file in which we store the wordsPythonobjectthatcontainsalistofourvocabulary.

•Preparethechatterbotlibraryusingchatterbotcorpus command

●Comparedtoothersystems,oursystemsprovideamobile andcompactdesign.

© 2022,

●B.A.ShawarandE.Atwell[2]describedasystemtoaccess Arabic language information using chatbot without sophisticated natural language processing or logical inference.TheyshowedthisworkproperlywithEnglishand Europeanlanguagesandhowthesamechatbotwillreactin termsofArabic

Knowledgemodelling:

Thisisthetrainedmodelthatcontains informationaboutthemodelandhasweightsoftheneurons.

| Impact

●The proposed system is designed to overcome the problemsfacedinday to daylifebypeople.Inourabsence alsowecanreacttotheotherpeoplewhoarecontactingus

•Nowwehaveanenvironmentandachatterbotlibraryto workonandnowwehavethefollowingtodo:

International Research Journal of Engineering and Technology (IRJET)

3. PROJECT DESCRIPTION

●Recently a considerable amount of promising work has been conducted in chatbot design. O. V. Deryugina [2] presented a detailed survey on the history of the chatbot, theirapplications,andthefirstdesignsofsuchsystems.We have noticed that the chatbot related research is mainly distributedinthefollowingareas,(I)differentapproaches (e.g., retrieval and generative), (ii) length of the conversation,and(iii)accordingtothedomain.

p

simulates typed or voice communication with the human, including the purpose of fooling into thinking a human to talking to another person. A network management aware chat bot is created named as Dorothy, it manages the networkbymanagementprotocolssosinceSNMP

Thisphasedetermineshowknowledgeisrepresentedand storedintheknowledgebase.Conversationflow.Boththe lexiconusedbythetutorandtheorderinwhichideasare presented should be defined in this phase. This section presents the formal definitions and foundations of the proposedmethodologyfirst.Later,eachphaseisdescribed and contrasted with real life queries. Finally, since implementation details vary across different conversation frameworks,theyarenotcoveredperseinthemethodology. Nevertheless,conflictresolutionandgoodimplementation practicesarebroadlypresentedalongwithacasestudy.

| ISO

●Theproposedchatbotisdesignedtotakeadvantageofthe portability of mobile devices and provide a simple user interfacethatmakesuseofthesystemeasyforeachuser

Weusefollowingtomakeachatbotusingpython.

e ISSN: 2395 0056

Intents.Json Thedatafilewhichhaspredefinedpatterns and train_chatbot.pyresponses.

Classes. PKL The classes pickle file contains the list of Chatbot_model.h5categories.

In this Python file, we wrote a script to buildthemodelandtrainourchatbot.

© 2022,

•Thechatbotistrainedinsuchawaythatwhenitdetects the same question again it tries to improve the level of responseandmakeitmoreprecise.

Thepilotprogram:Thepilotprogramisthemainorcore codeoftheprogramthroughwhichthechatbotrunsonthe system.Inadditiontothiswehavethebottrainerandthebot predictorwhichwillbediscussedlaterindetail.

•Stilltheinformationisbeinggatheredonthisandwillbe updatedwhenknownproperly.

Asthenamesuggestsitpredictswhatresponseshouldbe given to the user. This partof the code uses the tokenized data and from that collects the relevant information to process.Thentheloopisrunthroughoutthedataset,andit sets a score to every response it gets when the loop is complete the response with highest score is given as the outputtotheuserfromthechatbot.

Certified Journal | Page1229

Forexample:"Chatterbot.Logic.BestMatch"

•Firstly, we need to import tokenized data and then importamodelcreator.

| ISO

•Themaintaskofthebottraineristomakethechatbot morepreciseandflexibletothedata.

International Research Journal of Engineering and Technology (IRJET)

p ISSN: 2395 0072 IRJET Factor value: 7.529 9001:2008

This tells us about how the bot user, the Facebook user, collectsthedataandbasicinstructionsfromthedatasetsand reactsClassaccordingly.Diagram: The class diagram gives us a basic knowledge of how the classes are divided in the code and how they run with the instructions given in them and interact.TheBot

Wehavedeveloped2modelsofchatbots.Oneisasocial mediachatbotorassistantdeployedonFacebook.Theother isasimplecommandline basedchatbotthatcanbeusedfor smalltalkwhichalsohasspeechoutput. Theessenceofthis project remains to provide a simple demonstration of the buildingofabasicchatbot(whilegettinghandsonpractice onMLandAIconceptwhichpresentsinselfasanexciting andinterestingfieldtous).Theworldisincreasinglymoving towardsAIandchatbotsandtheyarethefutureofhuman machineinteraction.Chatbotsaresoonexpectedtotakeover traditionaluserinterfaces. ThechatbotonFacebookcanbe personalizedaspertheusersorcompanies'requirements.It canactasatooltoincreaseinteractionamongtheuserand Facebookfriends.Thecommandline basedchatbot,which we have named "Spinzer'', doesn't require Internet connectivitytointeracteffectivelywiththeuser.Itcanalso tell stories, jokes, capitals of countries, perform basic arithmetic andindulgein human likeconversations.Ithas beentrainedonmultipledatasets. Thedatasetthatthischat botwastrainedonwasmadeaftercleaningandcensoringthe conversationstomakethechatbotpoliteandformal. The following pages of the document will display the system architectureandotherdiagramsrelatedtotheprojectalong with algorithms. We use Python, TensorFlow, PyCharm accordingtothepresentinformationwehave,anditcanbe changedinthefutureaccordingly.

•Thenweusesomeinstructionsorcommandstogivethe inputtothechatbotandtrainitselfforgeneratingresponses thatisself trainingusingSequence to Sequence.

•Weusethelogicadapterscommandtolistadaptersused totrainthechatbot.

BotPredictor:

•TheBotTrainerandTheBotPredictorarealsocalledthe supportmodulesastheyhelpthepilotprogramtoworkand executeproperly.

PROJECT DESCRIPTION:

•Then we create some strings for communication purposesanduse"ListTrainer"andtrainthechatbotwith them.The

| Impact

The bot trainer trains the chatbot with the datasets uploaded and keeps training the bot as we keep adding datasets to it. The chat bot learns new things as we keep usingitandthisplaysamajorroleintheresponseselection.

Trainer:

• Then we import Bot Predictor and then give the instructionstothebottorunandthenwhenthequestions are asked to the chatbot let it learn how to detect the questionandfindappropriateanswersforthemtoprintfor theuser.

•Thebotrunsontheloopfortrainingitself.

The system architecturetells us about how the data is divided into categories and how the response generator generates responseandthen how the response is selected fromtheresponseswhichwehavegiventothechatbotand thenfinallytheresponseisgiventotheuser.

•Firstly,inthepilotprogramthesystemandTensorFlow areimported.

Usecasediagram:

e ISSN: 2395 0056

Volume: 09 Issue: 03 | March 2022 www.irjet.net

Systemarchitecture:

•Firstly,weimportNLTK,string,TensorFlowandthenwe importtokenizeddata,knowledgebase,andsomelibraries forcheckingpatternandremainingcallfunctions.

code.Program

ForBottrainer:

•Itcanalsoincreasecommunicationandcanbeseenasan interestingaspecttotalkwithanAIwhenusedforpersonal accounts.

| ISO 9001:2008 Certified Journal | Page1230

p ISSN: 2395 0072 2022, IRJET Factor value: 7.529

e ISSN: 2395 0056

•Thefeaturethatstandsouthereistheabilityofthechatbot to reply in human voice. This has been added to facilitate communicationinabetterway

•Forexample:

2.Hardisk:1.System:HardwareUsed:RequirementsNvidiaGPU/AMD00gb

WorkingmodelandImplementation:

totokenizethedata:

•Alotofeffortwouldalsoberequiredtotrainthemodel whichtookusseveralhours.

4. RESULT

defgetresponse(s,d,f),etc.

Volume: 09 Issue: 03 | March 2022 www.irjet.net

International Research Journal of Engineering and Technology (IRJET)

©

| Impact

•Firstly,forthisprogramweneedtoimportTensorFlow, namedtupleandsomeotherlibrariestobeginwith.

It can also be defined as the program to turn sensitive datatonon sensitivedatacalledtokensthatcanbeusedina databaseorinternalsystemwithoutreferringtoit.

•Theconsolebasedchatbotwastheonewhichtookthe mosteffort,becauseitwastrainedonacleaneddatasetand cleaningandCensoringwords,etc.requiredalotofeffort.

Aftertokenizationweget:['This','is','a','cat'].

Considerthestring:"Thisisacat."

•AfterinstallingthelatestversionofPyCharmwecanaddthe code to it and use manage.py and run our code in the requiredarea.Thiscanonlybedoneafteryouhavedonethe settingspartandfilledallotherrequirements.Attheendwe need to havea code for onlydebugging purposesand that shouldbeseparatelykeptuntilrequired.

Software

Examples:defpredict_class(x,y)

3.Libraries:Tensorflow

Insimplewordssplittinglargerformsoftextintosmaller formsorlinesorwords.

Components

1.OperatingRequirementssystem:windows/Linux/macOS

2.Codinglanguage:python

3.RAM

4.Ide:Anaconda(PyCharm)

After all these are carried out then we give the basic instructionstothechatbotthatwhatshouldbedonewhen theuserissatisfiedandgreettheuserandexittheexecution of

•Firstinstallalltherequiredmodulesandlibraries.

•Thenwecreateappropriateclassesandobjectstocarry outthewholeprocessofpredictionandresponsegeneration.

4.Microphone:4gbSpeakers

•Thiscanbeidealfororganizationsandcompanieswhich wanttostayconnectedtotheircustomersallthetime.

•UsingPyCharmtoexecutecodeforchatbot:

Thisprocessisusedforturningameaningfulpieceofdata intoarandomstringofcharactercallertokens.Theycanbe usedasreferencetotheoriginaldatabutcan'tbeusedtoget theoriginalvalues.

Wecanusethistokenizedformtocountthefrequencyof thewordandnumberoftimesaparticularwordispresentin thedataset.

•This projectconsistsof a chatbot made tofunctionon PC's,withoutinternet.

9. B. A. Shawar and E. Atwell, “Chatbots: are they really useful?”inLDVForum,vol.22,no.1,2007,pp.29 49.

ProceedingsofInternationalConferenceonAffectiveHuman FactorDesign.pp.467 474.AseanAcademicPress(2001).

8.J.S.Malik,P.Goyal,andA.K.Sharma,“Acomprehensive approach towards data preprocessing techniques & association rules,” in Proceedings of The4th National Conference,2010.

This is the result we get after training the bot and also addingbotpredictioncodetoit.Thegivenbelowpictureis anexampleofhowourchatbotworksandrepliestous.

2.Anderson,J.R.,Boyle,C.F.,Reiser,B.J.:Intelligenttutoring systems.Science228(4698),456

before, chatbots are the future. We are makinghugeprogressinthisfieldeveryday.Allthebiggest

Likeintelligence.mentioned

computertechcompaniesaroundtheworldarelookingup to AI. The great scientist Stephen Hawking had predicted thattheworld'sfirsttrillionairewillcomefromAI(thatis, bymakingAIproducts).

4.Dutta,D.:Developinganintelligentchat bottooltoassist highschoolstudentsforlearninggeneralknowledgesubjects. Tech.rep.,GeorgiaInstituteofTechnology(2017).

5. Goel, A.K., Polepeddi, L.: Jill Watson: A Virtual Teaching AssistantforOnlineEducation.Tech.rep.,GeorgiaInstitute ofTechnology(2016).

6.M.J.Pereira,L.Coheur,P.Fialho,andR.Ribeiro,“Chatbots’ greetingtohuman computercommunication,”arXivpreprint arXiv:1609.06479,2016.

7. O. Deryugina, “Chatterbots,” Scientific and Technical InformationProcessing,vol.37,no.2,pp.143 147,2010.

Thechatbotsinthisprojectcanbeusedonanysystemby makingthepythonprogramsintoexecutablefilesparticular to that system. It can also be changed into a particular or specificchatbotastheuserrequirementsinthefuture.

Thisprojectwasanattempttounderstandandimplement thepowerofAI,ML.Wehavelearntalotduringthisproject and aspire to take up research in the field of artificial

10.A.Bordes,S.Chopra,andJ.Weston,“Questionanswering with subgraph embeddings,” arXiv preprint arXiv:1406.3676

International Research Journal of Engineering and Technology (IRJET) e ISSN: 2395 0056 Volume: 09 Issue: 03 | March 2022 www.irjet.net p ISSN: 2395 0072 © 2022, IRJET | Impact Factor value: 7.529 | ISO 9001:2008 Certified Journal | Page1231

REFERENCES

4. CONCLUSIONS

1. Al`es, Z., Duplessis, G.D., S¸erban, O., Pauchet, A.: A methodologytodesignhuman likeembodiedconversational agents. In: International Workshop on Human Agent InteractionDesignandModels(HAIDM12).Valencia,Spain (2012),https://hal.archives ouvertes.fr/hal 00927488

user:3.https://doi.org/10.1126/science.228.4698.456,462(1985).http://science.sciencemag.org/content/228/4698/456Angeli,A.D.,Johnson,G.I.,Coventry,L.:TheunfriendlyExploringsocialreactionstochatterbots.In:

Volume: 09 Issue: 03 | March 2022 www.irjet.net

p ISSN: 2395 0072 IRJET Factor value: 7.529 9001:2008

e ISSN: 2395 0056

Certified Journal | Page1232

| ISO

MA, Assistant Professor in the Department of Computer Science and Engineering, SCSVMV University, Kanchipuram.”

© 2022,

| Impact

”G.M.S.S.PRANAV,pursuingfourth year in bachelor’s degree in ComputerScienceandengineering departmentinSCSVMVUniversity, “Mrs.Kanchipuram”R.PRE

International Research Journal of Engineering and Technology (IRJET)

BIOGRAPHIES

“ROHANTIWARI,pursuingfourth year in bachelor’s degree in ComputerScienceandengineering departmentinSCSVMVUniversity, Kanchipuram

Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.
A Research Paper on HUMAN MACHINE CONVERSATION USING CHATBOT by IRJET Journal - Issuu