A chatbot is Artificial Intelligence (AI) software that can simulate a conversation (or a chat)
with a user in natural language through messaging applications, websites, and mobile apps or through
the telephone.
It is often described as one of the most advanced and promising expressions of interaction
between humans and machines. However, from a technological point of view, a chatbot only
represents the natural evolution of a Question Answering system leveraging Natural Language
Processing (NLP). Formulating responses to questions in natural language is one of the most typical
Examples of Natural Language Processing applied in various enterprises’ end-use applications.
Chatbot applications streamline interactions between people and services, enhancing customer
experience. At the same time, they offer companies new opportunities to improve the customers
engagement process and operational efficiency by reducing the typical cost of customer service.
To be successful, a chatbot solution should be able to effectively perform both of these tasks. Human
support plays a key role here: Regardless of the kind of approach and the platform, human
intervention is crucial in configuring, training and optimizing the chatbot system.
The purpose of this project is to control robot with an interface board of the Raspberry Pi, sensors and software to full fill real time requirement.
Controlling DC motors, different sensors, camera interfacing with raspberry Pi using GPIO pin.
Live streaming, Command the robot easily, sends data of different sensors which works automatically or control from anywhere at any time.
Design of the website and control page of robot is done using Java tools and HTML. This system works on IOT concept.
This will enable Raspberry Pi to be used for more robotic applications and cut down the cost for building an IOT Robot.
The document describes a mini-project on demonstrating a "Flowing Fountain" submitted for a computer graphics laboratory course. It includes an abstract, introduction to computer graphics and OpenGL, the basic elements of OpenGL, the working procedure of the flowing fountain project, its design and implementation including required graphics functions and hardware/software. It also includes snapshots of the project and conclusions about developing it using OpenGL.
This document provides a summary report on a pet feeder project based on an Arduino Uno. The project was completed by three students - Harsh Dobariya, Akshay Kalapgar, and Mohit Kamble - under the guidance of their internal guide, Mr. Swapnil Gharat. The report includes an introduction to the project, aims and objectives, a literature review, a description of the proposed system, implementation details, and details of the hardware and software used. The proposed system is an automatic pet feeder controlled by a smartphone that uses a servo motor, Arduino Uno, and Bluetooth module to remotely feed pets based on input from a mobile app.
The document discusses human activity recognition from video data using computer vision techniques. It describes recognizing activities at different levels from object locations to full activities. Basic activities like walking and clapping are the focus. Key steps involve tracking segmented objects across frames and comparing motion patterns to templates to identify activities through model fitting. The DEV8000 development kit and Linux are used to process video and recognize activities in real-time. Applications discussed include surveillance, sports analysis, and unmanned vehicles.
This document discusses various domain-specific Internet of Things (IoT) applications. It outlines IoT applications for homes, cities, the environment, energy systems, retail, logistics, industry, agriculture, and health and lifestyle. It then provides more details on specific IoT applications for homes (smart lighting, smart appliances, intrusion detection, smoke/gas detectors), cities (smart parking, smart road lighting, smart roads, structural health monitoring, surveillance, emergency response) and the environment (weather monitoring, air pollution monitoring, noise pollution monitoring, forest fire detection, river flood detection).
This Presentation is on the topic of Driver drowsiness Detection .
In this presentation We will discuss the Techniques used to detect drowsiness and compare some techniques
In the end we conclude and provide some suggestions regarding future work.
Thanks
Smart Voting System with Face RecognitionNikhil Katte
This document proposes a smart voting system using face recognition to allow people to vote digitally using their smartphones. The system would have a server, registration center application, and voter android application. It works by capturing a live image of the voter's face on their phone, sending it to the server for authentication using face recognition algorithms, and allowing them to vote if authorized. The system aims to modernize voting and make it more convenient using digital technologies while maintaining security.
FANETs have become an emerging research field, which consists of a group of small UAVs connected in ad-hoc mode. Such networks are distinguished by a high mobility, frequent topology changes and 3D-space movement of the nodes, which constitutes networking issues. To overcome such kind of issues, choosing an appropriate communication architecture and reliable routing protocols are mandatory to authenticate robust communication between the UAVs.
The purpose of this project is to control robot with an interface board of the Raspberry Pi, sensors and software to full fill real time requirement.
Controlling DC motors, different sensors, camera interfacing with raspberry Pi using GPIO pin.
Live streaming, Command the robot easily, sends data of different sensors which works automatically or control from anywhere at any time.
Design of the website and control page of robot is done using Java tools and HTML. This system works on IOT concept.
This will enable Raspberry Pi to be used for more robotic applications and cut down the cost for building an IOT Robot.
The document describes a mini-project on demonstrating a "Flowing Fountain" submitted for a computer graphics laboratory course. It includes an abstract, introduction to computer graphics and OpenGL, the basic elements of OpenGL, the working procedure of the flowing fountain project, its design and implementation including required graphics functions and hardware/software. It also includes snapshots of the project and conclusions about developing it using OpenGL.
This document provides a summary report on a pet feeder project based on an Arduino Uno. The project was completed by three students - Harsh Dobariya, Akshay Kalapgar, and Mohit Kamble - under the guidance of their internal guide, Mr. Swapnil Gharat. The report includes an introduction to the project, aims and objectives, a literature review, a description of the proposed system, implementation details, and details of the hardware and software used. The proposed system is an automatic pet feeder controlled by a smartphone that uses a servo motor, Arduino Uno, and Bluetooth module to remotely feed pets based on input from a mobile app.
The document discusses human activity recognition from video data using computer vision techniques. It describes recognizing activities at different levels from object locations to full activities. Basic activities like walking and clapping are the focus. Key steps involve tracking segmented objects across frames and comparing motion patterns to templates to identify activities through model fitting. The DEV8000 development kit and Linux are used to process video and recognize activities in real-time. Applications discussed include surveillance, sports analysis, and unmanned vehicles.
This document discusses various domain-specific Internet of Things (IoT) applications. It outlines IoT applications for homes, cities, the environment, energy systems, retail, logistics, industry, agriculture, and health and lifestyle. It then provides more details on specific IoT applications for homes (smart lighting, smart appliances, intrusion detection, smoke/gas detectors), cities (smart parking, smart road lighting, smart roads, structural health monitoring, surveillance, emergency response) and the environment (weather monitoring, air pollution monitoring, noise pollution monitoring, forest fire detection, river flood detection).
This Presentation is on the topic of Driver drowsiness Detection .
In this presentation We will discuss the Techniques used to detect drowsiness and compare some techniques
In the end we conclude and provide some suggestions regarding future work.
Thanks
Smart Voting System with Face RecognitionNikhil Katte
This document proposes a smart voting system using face recognition to allow people to vote digitally using their smartphones. The system would have a server, registration center application, and voter android application. It works by capturing a live image of the voter's face on their phone, sending it to the server for authentication using face recognition algorithms, and allowing them to vote if authorized. The system aims to modernize voting and make it more convenient using digital technologies while maintaining security.
FANETs have become an emerging research field, which consists of a group of small UAVs connected in ad-hoc mode. Such networks are distinguished by a high mobility, frequent topology changes and 3D-space movement of the nodes, which constitutes networking issues. To overcome such kind of issues, choosing an appropriate communication architecture and reliable routing protocols are mandatory to authenticate robust communication between the UAVs.
The document discusses Microsoft Windows Distributed Network Applications (DNA) architecture. It provides an introduction to DNA and describes its architecture as a blueprint that allows developers to build distributed applications using inherent Windows technologies. The architecture consists of different pieces like servers, databases, and components. It is guided by principles like web computing, interoperability, and lower costs. Key development technologies in DNA include COM, DHTML, Windows Script Components, and XML. Features include platform independence and support for transactions. DNA aims to provide an integrated platform for distributed applications that is faster and easier to develop on.
The presentation discusses the Internet of Things (IoT) and its applications in smart cities. IoT involves connecting physical devices with sensors to the internet, allowing them to collect and share data. This enables applications across various industries like manufacturing, transportation, healthcare and more. Some key benefits of IoT include improved communication, automation, cost savings and predictive analytics. Major challenges remain around data storage, security and privacy. The presentation predicts that by 2020 there will be over 24 billion connected IoT devices generating $13 trillion in economic value annually. Finally, it outlines how IoT can enable smart infrastructure around transportation, energy grids, homes and cities.
This document presents a real-time hand gesture recognition method. It discusses algorithms like 3D model-based, skeletal-based, and appearance-based for hand gesture recognition. The process involves hand detection, tracking, segmentation, and recognition. Features, advantages, and applications are also covered. The method uses fast hand tracking, segmentation, and multi-scale feature extraction for accurate recognition. It concludes with discussing potential for continued progress in areas like sign language recognition and accessibility.
includes how i Twin Technology works. why it is more popular, Features, Authentication Policies, comparison with the USB and Cloud Computing Services how it is better than these services.
This document describes a student project to develop a driver drowsiness detection system using OpenCV and Python. It includes approval from an internal examiner, declarations by the student, and certificates of completion. The system detects drowsiness based on eye closure and yawning detection using facial landmark tracking and thresholds on eye and mouth aspect ratios. Experimental results showed the system could successfully detect drowsiness and provide alerts when thresholds were exceeded.
This document provides an overview of Kinect motion technology. It describes how Kinect uses an infrared sensor and camera to track a user's full-body motion and interpret gestures and voice commands to control applications without any additional input devices. Applications discussed include gaming, healthcare, virtual pianos, and using Kinect to control robots and provide gesture-based interactions in augmented reality. Advantages are noted as not requiring additional input devices and allowing for voice and facial recognition, while disadvantages include sensitivity to infrared light sources and not detecting certain materials well.
This document provides an introduction to Internet of Things (IoT) and smart cities. It discusses Kevin Ashton who coined the term "Internet of Things" and his vision for using data to increase efficiency. Key enabling technologies for IoT like cheap sensors, bandwidth, processing and wireless coverage are outlined. Examples of IoT applications in various sectors like manufacturing, transportation, agriculture and smart cities are provided. The document also discusses challenges in making sense of the large amounts of data generated by IoT devices and the importance of a citizen-centric approach to building smart cities by leveraging crowdsourcing and citizen engagement.
Unmanned Aircraft (a.k.a. drones) are finding their way into IoT implementations. This presentation explains what’s driving the adoption and how drones relate to IoT and cloud data.
The document is an industrial training report submitted by Aman Jaiswal to fulfill the requirements for a Bachelor of Technology degree. It includes a declaration, certificate, acknowledgement, abstract, and profile of Roboslog Pvt Ltd where the training took place. The report describes various training courses provided by Roboslog on topics like ARM, AVR, IoT, PCB design, 8051 microcontrollers, and Raspberry Pi. It also outlines projects completed during the internship, including an obstacle avoiding robot, NPK soil detection, smart air purifier, and WiFi quadcopter.
IoT Based Garbage Monitoring System pptRanjan Gupta
1) A group of students presented on an IOT Garbage Monitoring System to help keep cities clean.
2) The system uses ultrasonic sensors and a microcontroller to monitor garbage levels in bins and displays the status on an LCD screen and web page.
3) When fully implemented, the system will help support initiatives like Swachh Bharat Mission by enabling real-time garbage monitoring and efficient collection.
This document outlines the syllabus for a course on Internet of Things (IoT) technology taught by Dr. Syed Mustafa at HKBK College of Engineering, Bengaluru. It covers key modules including IoT physical devices and endpoints such as Arduino and Raspberry Pi. The Arduino section describes the Arduino microcontroller board and its components. It also covers Arduino programming basics like setup and loop functions, input/output functions, variables, conditional statements, and serial communication. The Raspberry Pi section provides an overview of the single-board computer and its hardware layout.
IoT and Cloud Computing in Automation ApplicationAreej Qasrawi
IoT and cloud computing can help automate assembly modeling systems to deal with complex products and changes. The paper proposes using an object-oriented product template to define assembly relations and algorithms to retrieve relational matrices. Assembly modeling of aircraft engines is used as a case study. The key innovations include a modular architecture, integrated templates, and automated algorithms to retrieve assembly matrices from CAD models for planning.
The document presents a project on an IOT Garbage Monitoring System. It includes an introduction describing the system, which monitors garbage bins and informs about fill levels via a web page. It then outlines the presentation which covers the introduction, block diagram, hardware/software methodology, applications, and conclusions. The hardware/software section describes the components used including a microcontroller, WiFi modem, sensors, and LCD display. The system aims to help keep cities clean and make the garbage collection process more transparent and efficient.
This document provides an overview of mind reading computer technology. It discusses how computational models of mind reading can infer mental states from facial signals using techniques like facial affect detection and emotional classification. The technology works by measuring blood volume and oxygen levels in the brain using functional near-infrared spectroscopy sensors. Current applications include predicting driver drowsiness or anger, controlling animations, and enabling silent web searches. While the technology shows promise, challenges remain in scaling the techniques for conversational speech recognition and addressing privacy and ethical implications.
The document defines the Internet of Things as connecting physical objects through embedded technology and sensors to communicate over the Internet. It allows objects to be monitored and controlled remotely without human involvement. RFID tags are commonly used to give objects an Internet connection. The Internet of Things has applications in smart homes, cities, healthcare, transportation and more. While it provides advantages like energy savings, there are also disadvantages like privacy breaches and job losses if systems are over-relied on.
This document discusses Internet of Things (IoT) applications in smart cities. It begins by defining what a smart city is and outlines some of the key aspects such as adequate infrastructure, citizen services, sustainability, and technology/data use. The document then discusses how IoT can enhance smart city initiatives by connecting devices to collect and analyze data across various domains like transportation, utilities, security etc. Challenges in implementing large-scale IoT projects in cities are also highlighted, as well as the need for collaboration between different stakeholders to overcome them.
The document discusses the Blue Brain project, which aims to simulate the human brain on a
supercomputer. It provides details on how the project uses neuron-level modeling and supercomputers
like IBM's Blue Gene to simulate small networks of neurons and ultimately work towards simulating the
entire human brain. The document also discusses how uploading and simulating an actual human brain
may be possible using nanobots to scan brain structure and activity at a microscopic level.
This is implemented to designed a simple system called Smart Dustbin using Arduino, Ultrasonic Sensor and Servo Motor, where the lid of the dustbin will automatically open itself upon detection of human hand.
A Research Paper on HUMAN MACHINE CONVERSATION USING CHATBOTIRJET Journal
The document describes a research paper on developing a human-machine conversation chatbot. It discusses using artificial intelligence, natural language processing, and machine learning techniques to create an intelligent tutoring chatbot. The proposed methodology involves two stages: knowledge modeling and representation, and conversation flow design. It defines the chatbot architecture and training process that uses Python libraries, intent data files, trained models, and a GUI interface. The goal is to demonstrate building a basic social media and command line chatbot to showcase chatbot and AI concepts.
The days of simply engaging with a service through a keyboard are over. Users interact with systems more and more by using voice assistants and chatbots. A chatbot is a computer program that can chat with human’s using Artificial Intelligence in messaging platforms. Every time when the chatbot gets input from the user, it saves the input and response, which helps chatbot with little initial knowledge to evolve using gathered responses. With increased responses, precision of the chatbot also gets increase. The ultimate goal of this project is to add a chatbot feature and API. This project will inquire into the advancement of Artificial Intelligence and Machine Learning technology that are being used to improve many services. Most importantly it will look at development of chatbots as a channel for information distribution. The program will select the closest matching response from the matching statement that matches the input utilizing WordNet, it then chooses the response from the known selection of statements for that response. This project aims to implement online chatbot system to assist users who access college website by using tools that expose Artificial Intelligence methods such as Natural Language Processing in allowing users to communicate with college chatbot using natural language input and to train chatbot using appropriate Machine Learning methods in order to be able to generate a response. There are various applications that are incorporating to a human appearance and intends to simulate human dialog, yet in most cases, knowledge of chatbot is stored in a database created by a human expert. Fredrick B Lyngdoh | Raghavendra R. "Chatbot" Published in International Journal of Trend in Scientific Research and Development (ijtsrd), ISSN: 2456-6470, Volume-6 | Issue-3 , April 2022, URL: https://www.ijtsrd.com/papers/ijtsrd49799.pdf Paper URL: https://www.ijtsrd.com/computer-science/cognitive-science/49799/chatbot/fredrick-b-lyngdoh
The document discusses Microsoft Windows Distributed Network Applications (DNA) architecture. It provides an introduction to DNA and describes its architecture as a blueprint that allows developers to build distributed applications using inherent Windows technologies. The architecture consists of different pieces like servers, databases, and components. It is guided by principles like web computing, interoperability, and lower costs. Key development technologies in DNA include COM, DHTML, Windows Script Components, and XML. Features include platform independence and support for transactions. DNA aims to provide an integrated platform for distributed applications that is faster and easier to develop on.
The presentation discusses the Internet of Things (IoT) and its applications in smart cities. IoT involves connecting physical devices with sensors to the internet, allowing them to collect and share data. This enables applications across various industries like manufacturing, transportation, healthcare and more. Some key benefits of IoT include improved communication, automation, cost savings and predictive analytics. Major challenges remain around data storage, security and privacy. The presentation predicts that by 2020 there will be over 24 billion connected IoT devices generating $13 trillion in economic value annually. Finally, it outlines how IoT can enable smart infrastructure around transportation, energy grids, homes and cities.
This document presents a real-time hand gesture recognition method. It discusses algorithms like 3D model-based, skeletal-based, and appearance-based for hand gesture recognition. The process involves hand detection, tracking, segmentation, and recognition. Features, advantages, and applications are also covered. The method uses fast hand tracking, segmentation, and multi-scale feature extraction for accurate recognition. It concludes with discussing potential for continued progress in areas like sign language recognition and accessibility.
includes how i Twin Technology works. why it is more popular, Features, Authentication Policies, comparison with the USB and Cloud Computing Services how it is better than these services.
This document describes a student project to develop a driver drowsiness detection system using OpenCV and Python. It includes approval from an internal examiner, declarations by the student, and certificates of completion. The system detects drowsiness based on eye closure and yawning detection using facial landmark tracking and thresholds on eye and mouth aspect ratios. Experimental results showed the system could successfully detect drowsiness and provide alerts when thresholds were exceeded.
This document provides an overview of Kinect motion technology. It describes how Kinect uses an infrared sensor and camera to track a user's full-body motion and interpret gestures and voice commands to control applications without any additional input devices. Applications discussed include gaming, healthcare, virtual pianos, and using Kinect to control robots and provide gesture-based interactions in augmented reality. Advantages are noted as not requiring additional input devices and allowing for voice and facial recognition, while disadvantages include sensitivity to infrared light sources and not detecting certain materials well.
This document provides an introduction to Internet of Things (IoT) and smart cities. It discusses Kevin Ashton who coined the term "Internet of Things" and his vision for using data to increase efficiency. Key enabling technologies for IoT like cheap sensors, bandwidth, processing and wireless coverage are outlined. Examples of IoT applications in various sectors like manufacturing, transportation, agriculture and smart cities are provided. The document also discusses challenges in making sense of the large amounts of data generated by IoT devices and the importance of a citizen-centric approach to building smart cities by leveraging crowdsourcing and citizen engagement.
Unmanned Aircraft (a.k.a. drones) are finding their way into IoT implementations. This presentation explains what’s driving the adoption and how drones relate to IoT and cloud data.
The document is an industrial training report submitted by Aman Jaiswal to fulfill the requirements for a Bachelor of Technology degree. It includes a declaration, certificate, acknowledgement, abstract, and profile of Roboslog Pvt Ltd where the training took place. The report describes various training courses provided by Roboslog on topics like ARM, AVR, IoT, PCB design, 8051 microcontrollers, and Raspberry Pi. It also outlines projects completed during the internship, including an obstacle avoiding robot, NPK soil detection, smart air purifier, and WiFi quadcopter.
IoT Based Garbage Monitoring System pptRanjan Gupta
1) A group of students presented on an IOT Garbage Monitoring System to help keep cities clean.
2) The system uses ultrasonic sensors and a microcontroller to monitor garbage levels in bins and displays the status on an LCD screen and web page.
3) When fully implemented, the system will help support initiatives like Swachh Bharat Mission by enabling real-time garbage monitoring and efficient collection.
This document outlines the syllabus for a course on Internet of Things (IoT) technology taught by Dr. Syed Mustafa at HKBK College of Engineering, Bengaluru. It covers key modules including IoT physical devices and endpoints such as Arduino and Raspberry Pi. The Arduino section describes the Arduino microcontroller board and its components. It also covers Arduino programming basics like setup and loop functions, input/output functions, variables, conditional statements, and serial communication. The Raspberry Pi section provides an overview of the single-board computer and its hardware layout.
IoT and Cloud Computing in Automation ApplicationAreej Qasrawi
IoT and cloud computing can help automate assembly modeling systems to deal with complex products and changes. The paper proposes using an object-oriented product template to define assembly relations and algorithms to retrieve relational matrices. Assembly modeling of aircraft engines is used as a case study. The key innovations include a modular architecture, integrated templates, and automated algorithms to retrieve assembly matrices from CAD models for planning.
The document presents a project on an IOT Garbage Monitoring System. It includes an introduction describing the system, which monitors garbage bins and informs about fill levels via a web page. It then outlines the presentation which covers the introduction, block diagram, hardware/software methodology, applications, and conclusions. The hardware/software section describes the components used including a microcontroller, WiFi modem, sensors, and LCD display. The system aims to help keep cities clean and make the garbage collection process more transparent and efficient.
This document provides an overview of mind reading computer technology. It discusses how computational models of mind reading can infer mental states from facial signals using techniques like facial affect detection and emotional classification. The technology works by measuring blood volume and oxygen levels in the brain using functional near-infrared spectroscopy sensors. Current applications include predicting driver drowsiness or anger, controlling animations, and enabling silent web searches. While the technology shows promise, challenges remain in scaling the techniques for conversational speech recognition and addressing privacy and ethical implications.
The document defines the Internet of Things as connecting physical objects through embedded technology and sensors to communicate over the Internet. It allows objects to be monitored and controlled remotely without human involvement. RFID tags are commonly used to give objects an Internet connection. The Internet of Things has applications in smart homes, cities, healthcare, transportation and more. While it provides advantages like energy savings, there are also disadvantages like privacy breaches and job losses if systems are over-relied on.
This document discusses Internet of Things (IoT) applications in smart cities. It begins by defining what a smart city is and outlines some of the key aspects such as adequate infrastructure, citizen services, sustainability, and technology/data use. The document then discusses how IoT can enhance smart city initiatives by connecting devices to collect and analyze data across various domains like transportation, utilities, security etc. Challenges in implementing large-scale IoT projects in cities are also highlighted, as well as the need for collaboration between different stakeholders to overcome them.
The document discusses the Blue Brain project, which aims to simulate the human brain on a
supercomputer. It provides details on how the project uses neuron-level modeling and supercomputers
like IBM's Blue Gene to simulate small networks of neurons and ultimately work towards simulating the
entire human brain. The document also discusses how uploading and simulating an actual human brain
may be possible using nanobots to scan brain structure and activity at a microscopic level.
This is implemented to designed a simple system called Smart Dustbin using Arduino, Ultrasonic Sensor and Servo Motor, where the lid of the dustbin will automatically open itself upon detection of human hand.
A Research Paper on HUMAN MACHINE CONVERSATION USING CHATBOTIRJET Journal
The document describes a research paper on developing a human-machine conversation chatbot. It discusses using artificial intelligence, natural language processing, and machine learning techniques to create an intelligent tutoring chatbot. The proposed methodology involves two stages: knowledge modeling and representation, and conversation flow design. It defines the chatbot architecture and training process that uses Python libraries, intent data files, trained models, and a GUI interface. The goal is to demonstrate building a basic social media and command line chatbot to showcase chatbot and AI concepts.
The days of simply engaging with a service through a keyboard are over. Users interact with systems more and more by using voice assistants and chatbots. A chatbot is a computer program that can chat with human’s using Artificial Intelligence in messaging platforms. Every time when the chatbot gets input from the user, it saves the input and response, which helps chatbot with little initial knowledge to evolve using gathered responses. With increased responses, precision of the chatbot also gets increase. The ultimate goal of this project is to add a chatbot feature and API. This project will inquire into the advancement of Artificial Intelligence and Machine Learning technology that are being used to improve many services. Most importantly it will look at development of chatbots as a channel for information distribution. The program will select the closest matching response from the matching statement that matches the input utilizing WordNet, it then chooses the response from the known selection of statements for that response. This project aims to implement online chatbot system to assist users who access college website by using tools that expose Artificial Intelligence methods such as Natural Language Processing in allowing users to communicate with college chatbot using natural language input and to train chatbot using appropriate Machine Learning methods in order to be able to generate a response. There are various applications that are incorporating to a human appearance and intends to simulate human dialog, yet in most cases, knowledge of chatbot is stored in a database created by a human expert. Fredrick B Lyngdoh | Raghavendra R. "Chatbot" Published in International Journal of Trend in Scientific Research and Development (ijtsrd), ISSN: 2456-6470, Volume-6 | Issue-3 , April 2022, URL: https://www.ijtsrd.com/papers/ijtsrd49799.pdf Paper URL: https://www.ijtsrd.com/computer-science/cognitive-science/49799/chatbot/fredrick-b-lyngdoh
An Intelligent Career Counselling Bot A System for CounsellingIRJET Journal
This document describes the development of an intelligent career counseling chatbot. The chatbot uses natural language processing and artificial intelligence algorithms to analyze users' career-related questions and respond with relevant answers from its knowledge base. It allows users to ask open-ended career questions without a specific format. The chatbot's responses aim to simulate a conversation with a real career counselor. It helps users choose careers that match their interests and capabilities. The chatbot's processing involves matching user inputs to patterns in its knowledge base to determine an appropriate response. It has the potential to help many users receive career advice without requiring an in-person counselor.
INTELLIGENT CHATBOT FOR COLLEGE ENQUIRY SYSTEMIRJET Journal
The document describes a proposed intelligent chatbot system for answering student inquiries about a college. The chatbot would allow students to get information about admissions, fees, scholarships, course timetables, and required documents from anywhere at any time through natural language conversations. It uses techniques like pattern matching, artificial intelligence, machine learning and natural language processing to understand questions and provide relevant responses from its knowledge database. The goal is to streamline the student information process and reduce the workload on college staff.
This document describes the development of a chatbot application using Python to answer queries about a college. It discusses the existing system of students having to visit the college in person to ask questions, and the limitations thereof. The proposed chatbot system allows students to get college information by chatting with the bot through text. The document outlines the modules, design, and functioning of the chatbot, including its ability to understand natural language queries and provide relevant answers from its database. It concludes discussing the benefits of chatbots and potential for future improvements.
A Chatbot For Medical Purpose Using Deep LearningMartha Brown
This document describes a medical chatbot created using deep learning techniques. The chatbot is designed to help rural and low-income patients in India access healthcare by understanding their symptoms and providing self-care advice or recommending medications. The chatbot uses natural language processing and deep learning models like convolutional neural networks to understand user inputs and generate appropriate responses. It was created to address issues with healthcare access and affordability in India.
IRJET- NEEV: An Education Informational ChatbotIRJET Journal
The document describes the development of an educational chatbot named NEEV. NEEV uses machine learning algorithms and natural language processing to provide students with information about trending courses, guidance on course and college selection, and other educational resources. It was created to address the difficulties students face in keeping up with evolving areas of study and making informed decisions. NEEV is implemented as an Android application using the Dialogflow framework and Firebase database. It is trained using intents, entities, and fulfillment to understand user queries and respond appropriately. The goal of NEEV is to make educational information freely available to students anytime through an intelligent conversational interface.
The document discusses the development of a chatbot using deep learning models like sequence-to-sequence learning with LSTM. It proposes using a movie dialog corpus consisting of over 220,000 conversational exchanges to train the chatbot model. Transfer learning is used with pre-trained word embeddings to improve the model. The chatbot implementation uses an LSTM encoder-decoder architecture in the sequence-to-sequence model.
The document describes the design of a chatbot using deep learning. It proposes using a neural network with multiple hidden layers to learn and process data for the chatbot. The chatbot is intended to be trained on any file based on the user's needs, making it generalized. It will also have text-to-speech conversion to make it more user-friendly. The chatbot is evaluated and achieved 98.24% accuracy in responding to questions within its training data.
IRJET - Mobile Chatbot for Information SearchIRJET Journal
This document summarizes a research paper on developing a mobile chatbot using IBM Watson services to allow students to search for their exam scores. The chatbot uses Watson Assistant for natural language processing, a SQL database as a knowledge base to store score information, and text-to-speech and speech-to-text for input and output. It was built with Android Studio and Java to provide an intuitive mobile interface for users to interact with the chatbot.
This document discusses algorithms used in chatbots. It provides background on early chatbots like ELIZA and ALICE that used pattern matching. It then discusses several algorithms commonly used in modern chatbots: sequence-to-sequence models, pattern matching, LSTM, HEIM, naive Bayes, and natural language processing. The document aims to introduce these design techniques to provide an overview of how chatbots have advanced from early rule-based systems to more intelligent designs using machine learning.
IRJET- A Survey to Chatbot System with Knowledge Base Database by using Artif...IRJET Journal
The document discusses chatbots and artificial intelligence. It provides background on chatbots, including how they have advanced from early rule-based models to more advanced intelligent systems capable of natural conversations. Chatbots analyze user input to formulate relevant responses and are gaining popularity for automating customer service. The document also discusses using knowledge bases and databases to improve chatbot responses and abilities. It reviews different techniques used in building chatbots and their components like classifiers, responders, and knowledge management systems.
IRJET- College Enquiry Chatbot System(DMCE)IRJET Journal
The document describes a college enquiry chatbot system called DMCE that was developed by students and a professor at Datta Meghe College of Engineering. The chatbot uses artificial intelligence and machine learning to answer students' questions about college-related activities and events. It analyzes user queries through natural language processing and provides responses using an artificial intelligence markup language called AIML. The chatbot aims to reduce the need for students to personally visit the college to get information by providing an automated online service via a mobile application with a graphical user-friendly interface.
IRJET - E-Assistant: An Interactive Bot for Banking Sector using NLP ProcessIRJET Journal
This document describes a proposed chatbot called E-Assistant that would be used in the banking sector to help customers complete tasks like opening accounts or applying for loans. It would use natural language processing to understand user queries and respond in text, speech, or visual form. The chatbot's architecture includes modules for context recognition, preprocessing text, intent classification, entity extraction, and context reset. The goal is to provide a helpful and user-friendly assistant to guide customers through banking processes.
A Review Comparative Analysis On Various Chatbots DesignCourtney Esco
The document discusses various techniques used to design chatbots. It presents a survey of chatbot design techniques from nine research papers and compares the main methods used. The document categorizes chatbots into four types - goal-based, knowledge-based, service-based, and response-based. It also describes existing chatbots like Elizabeth bot, Microsoft LUIS, and Alicebot and discusses their approaches to natural language processing and response generation. The document aims to help researchers identify gaps for future chatbot development.
A Voice Based Assistant Using Google Dialogflow And Machine LearningEmily Smith
This document describes the development of a voice-based virtual personal assistant using Google Dialogflow and machine learning. The authors developed an assistant called ERAA using Dialogflow's natural language understanding capabilities. Dialogflow agents contain intents that match user queries to trigger responses. The authors designed a user interface for ERAA using the Flutter platform and integrated it with Dialogflow to handle conversations. They compared Dialogflow to IBM Watson and determined Dialogflow was better for this project due to its ease of maintenance, ability to handle structured data, integration, pricing, and language support. The authors aim to implement ERAA as a smartphone app initially and potentially as a desktop application in the future.
This document summarizes a survey paper on chatbots. It discusses how chatbots can be used to relieve stress in adolescents through continuous dialogue that provides positive information and guidance. The proposed "HappySoul" chatbot system would act as a virtual friend to help stressed adolescents express their negative feelings and release stress. The technology at the core of such chatbots is natural language processing, recurrent neural networks, and a client-server architecture with an Android GUI. Key applications of chatbots discussed include assisting dementia patients, helping insomniacs, allowing marginalized communities to provide feedback, and making medical diagnoses faster.
This document summarizes a survey paper on chatbots. It discusses how chatbots use natural language processing to understand user queries and generate responses in a conversational manner. The document outlines the methodology of the proposed chatbot, which uses a client-server architecture with an Android application as the front-end and a recurrent neural network on the server to process inputs and generate outputs. The chatbot is intended to help relieve stress and anxiety in adolescents through positive conversations.
This document describes a project report submitted for a Bachelor of Technology degree. The report details the development of a chatbot created in Python by two students, Garvit Bajpai and Rakesh Kumar Kannaujiya, under the guidance of their professor Mr. Abhinandan Tripathi. The report provides information on the background, literature review, proposed solution, implementation, advantages and disadvantages of creating a chatbot in Python.
This document is a seminar report on artificial intelligence and chatbots submitted by Akolam Lilian C. to the Department of Computer Science at Enugu State University of Science and Technology. The report discusses the background and objectives of AI and chatbots, including their significance and applications. It also covers the literature review, discussion of ANI and AGI, chatbot architectures, and development platforms. The report is organized into sections on introduction, literature review, discussion, conclusion, and references.
This presentation was provided by Steph Pollock of The American Psychological Association’s Journals Program, and Damita Snow, of The American Society of Civil Engineers (ASCE), for the initial session of NISO's 2024 Training Series "DEIA in the Scholarly Landscape." Session One: 'Setting Expectations: a DEIA Primer,' was held June 6, 2024.
हिंदी वर्णमाला पीपीटी, hindi alphabet PPT presentation, hindi varnamala PPT, Hindi Varnamala pdf, हिंदी स्वर, हिंदी व्यंजन, sikhiye hindi varnmala, dr. mulla adam ali, hindi language and literature, hindi alphabet with drawing, hindi alphabet pdf, hindi varnamala for childrens, hindi language, hindi varnamala practice for kids, https://www.drmullaadamali.com
A workshop hosted by the South African Journal of Science aimed at postgraduate students and early career researchers with little or no experience in writing and publishing journal articles.
How to Build a Module in Odoo 17 Using the Scaffold MethodCeline George
Odoo provides an option for creating a module by using a single line command. By using this command the user can make a whole structure of a module. It is very easy for a beginner to make a module. There is no need to make each file manually. This slide will show how to create a module using the scaffold method.
Physiology and chemistry of skin and pigmentation, hairs, scalp, lips and nail, Cleansing cream, Lotions, Face powders, Face packs, Lipsticks, Bath products, soaps and baby product,
Preparation and standardization of the following : Tonic, Bleaches, Dentifrices and Mouth washes & Tooth Pastes, Cosmetics for Nails.
Assessment and Planning in Educational technology.pptxKavitha Krishnan
In an education system, it is understood that assessment is only for the students, but on the other hand, the Assessment of teachers is also an important aspect of the education system that ensures teachers are providing high-quality instruction to students. The assessment process can be used to provide feedback and support for professional development, to inform decisions about teacher retention or promotion, or to evaluate teacher effectiveness for accountability purposes.
Macroeconomics- Movie Location
This will be used as part of your Personal Professional Portfolio once graded.
Objective:
Prepare a presentation or a paper using research, basic comparative analysis, data organization and application of economic information. You will make an informed assessment of an economic climate outside of the United States to accomplish an entertainment industry objective.
A Strategic Approach: GenAI in EducationPeter Windle
Artificial Intelligence (AI) technologies such as Generative AI, Image Generators and Large Language Models have had a dramatic impact on teaching, learning and assessment over the past 18 months. The most immediate threat AI posed was to Academic Integrity with Higher Education Institutes (HEIs) focusing their efforts on combating the use of GenAI in assessment. Guidelines were developed for staff and students, policies put in place too. Innovative educators have forged paths in the use of Generative AI for teaching, learning and assessments leading to pockets of transformation springing up across HEIs, often with little or no top-down guidance, support or direction.
This Gasta posits a strategic approach to integrating AI into HEIs to prepare staff, students and the curriculum for an evolving world and workplace. We will highlight the advantages of working with these technologies beyond the realm of teaching, learning and assessment by considering prompt engineering skills, industry impact, curriculum changes, and the need for staff upskilling. In contrast, not engaging strategically with Generative AI poses risks, including falling behind peers, missed opportunities and failing to ensure our graduates remain employable. The rapid evolution of AI technologies necessitates a proactive and strategic approach if we are to remain relevant.
Introduction to AI for Nonprofits with Tapp NetworkTechSoup
Dive into the world of AI! Experts Jon Hill and Tareq Monaur will guide you through AI's role in enhancing nonprofit websites and basic marketing strategies, making it easy to understand and apply.
Introduction to AI for Nonprofits with Tapp Network
isl mini project report Akshay
1. A Mini Project Report on
CHATBOT USING NLP
Submitted in partial fulfillment of the requirements for the degree of
Fourth Year of Engineering in Information Technology
Submitted by
Ashish Jaiswal
Akshay Kalapgar
Mohit Kamble
Guided by
Prof. Nilesh Rathod
(Permanently Affiliated to University of Mumbai)
Juhu Versova Link Road, Andheri (West), Mumbai-53
DEPARTMENT OF INFORMATION TECHNOLOGY
UNIVERSITY OF MUMBAI
2020
2. (Permanently Affiliated to University of Mumbai)
Juhu Versova Link Road, Andheri (West), Mumbai-53
DEPARTMENT OF INFORMATION TECHNOLOGY
CERTIFICATE
Date:
This is to certify that, the project work embodied in this report entitled, “Chatbot Using NLP”
submitted by “Ashish Jaiswal bearing Roll No. 729”, “Akshay Kalapgar bearing Roll No.731”,
“Mohit Kamble bearing Roll No. 732” for the award of Fourth year of Engineering (B.E.)degree in
the subject of Artificial Intelligence, is a work carried out by them under my guidance and
supervision within the institute. The work described in this project report is carried out by the
concerned students and has not been submitted for the award of any other degree of the University of
Mumbai.
Further, it is to certify that the students were regular during the academic year 2020- 2021 and
have worked under the guidance of concerned faculty until the submission of this project work at
MCT’s Rajiv Gandhi Institute of Technology, Mumbai.
Mr. Nilesh Rathod
Project Guide
Dr. Sunil B. Wankhade Dr. Sanjay Bokade
Head of Department Principal
3. CERTIFICATE OF APPROVAL
This mini project report entitled
CHATBOT USING NLP
Submitted by:
ASHISH JAISWAL 729
AKSHAY KALAPGAR 731
MOHIT KAMBLE 732
In partial fulfillment of the requirements of the degree of Fourth year of
Engineering in Information Technology is approved.
Internal Examiner
External Examiner
Date:
Place: Mumbai
SEAL OF
INSTITUTE
4. DECLARATION
I declare that this written submission represents my ideas in my own words and where others' ideas or
words have been included, I have adequately cited and referenced the original sources. I also declare
that i have adhered to all principles of academic honesty and integrity and have not misrepresented or
fabricated or falsified any idea/data/fact/source in my submission. I understand that any violation of
the above will be cause for disciplinary action by the Institute and can also evoke penal action from
the sources which have thus not been properly cited or from whom proper permission has not been
taken when needed.
ROLL NO. NAME SIGNATURE
729 Ashish Jaiswal
731 Akshay Kalapgar
732 Mohit Kamble
Date:
Place: Mumbai
5. ACKNOWLEDGEMENT
With all reverence, we take the opportunity to express our deep sense of gratitude and
wholehearted indebtedness to our respected guide, Mr. Nilesh Rathod, Department of Information
Technology, Rajiv Gandhi Institute of Technology, Mumbai. From the day of conception of this
project his active involvement and motivating guidance on day-to-day basis has made it possible for
us to complete this challenging work in time.
We would like to express a deep sense of gratitude to our respected Head of the
Department, Dr. Sunil B. Wankhade who went all the way out to help us in all genuine cases
during the course of doing this project. We wish to express our sincere thanks to Dr. Sanjay
Bokade, Principal, Rajiv Gandhi Institute of Technology, Mumbai and would to like to
acknowledge specifically for giving guidance, encouragement and inspiration throughout the
academics.
We would like to thank all the staff of Information Technology Department who
continuously supported and motivated during our work. Also, we would like to thank our colleagues
for their continuous support and motivation during the project work. Finally, we would like to
express our gratitude to our family for their eternal belief in us. We would not be where we are
today without their support and encouragement.
ASHISH JAISWAL
AKSHAY KALAPGAR
MOHIT KAMBLE
Date:
Place:
6. Abstract
A chatbot is Artificial Intelligence (AI) software that can simulate a conversation (or a chat)
with a user in natural language through messaging applications, websites, and mobile apps or through
the telephone.
It is often described as one of the most advanced and promising expressions of interaction
between humans and machines. However, from a technological point of view, a chatbot only
represents the natural evolution of a Question Answering system leveraging Natural Language
Processing (NLP). Formulating responses to questions in natural language is one of the most typical
Examples of Natural Language Processing applied in various enterprises’ end-use applications.
Chatbot applications streamline interactions between people and services, enhancing customer
experience. At the same time, they offer companies new opportunities to improve the customers
engagement process and operational efficiency by reducing the typical cost of customer service.
To be successful, a chatbot solution should be able to effectively perform both of these tasks. Human
support plays a key role here: Regardless of the kind of approach and the platform, human
intervention is crucial in configuring, training and optimizing the chatbot system.
7. Contents
Table of Contents
Chapters Title of chapters Page No.
Chapter 1 Introduction 1
Chapter 2 Aims and Objectives 2
Chapter 3 Literature Surveyed 3
Chapter 4 Existing System 4
Chapter 5 Problem Statement 5
Chapter 6 Scope 6
Chapter 7 Proposed System 7
Chapter 8 Methodology 8
Chapter 9 Analysis 10
Chapter 10 Details of Hardware and Software 11
Chapter 11 Working 12
Chapter 12 References 21
Table of Figures
Fig No. List of Figures Page No.
1 Process flow Diagram 8
8. 1
CHAPTER 1
INTRODUCTION
The development of Artificial Intelligence applications is challenging because computers traditionally
require humans to speak to them in a programming language that is precise, unambiguous and highly
structured or, perhaps through a limited number of clearly-stated voice commands.
Natural language processing (NLP) is a branch of artificial intelligence, and machine linguistics that enables
computers to derive meaning from human or natural language input. It is used to analyze text, allowing
machines to understand human’s language. NLP considers the hierarchical structure of human language in
which several words make a phrase; several phrases make a sentence and, ultimately, sentences convey
ideas. However, the ambiguity of language in which humans speak is what makes natural language
processing a difficult problem for computers to undertake.
The computer performs Natural Language Understanding (NLG) to overcome this obstacle. It is the process
of disassembling and parsing input because of the occurrence of unknown and unexpected components in
the input and the need to determine the appropriate syntactic and semantic schemes to apply to it. A Chatbot
is a computer program which conducts conversation with human using auditory or textual methods.
Chatbots are based on two basic principles Natural Language Processing and Pattern matching. We aim
towards creating a conversational Chatbot with the help of NLP as well as pattern matching.
9. 2
CHAPTER 2
AIMS AND OBJECTIVES
Aims:
We aim towards creating a conversational Chatbot with the help of NLP as well as pattern matching.
Objectives:
The main objectives of the project were to develop an algorithm that will be used to identify
answers related to user submitted questions.
To develop a database were all the related data will be stored and to develop a web interface.
To provide user friendly interface
To reduce user efforts
10. 3
CHAPTER 3
LITERATURE SURVEY
Paper 1: “Emassnuela Ha Simulates an Historical Figure”
Authors: Dr Raju Shanmugam, Soumya Ranjan Jena.
Publisher: IEEE Conference Publications, July 2013.
Observations:
There may be applications that are incorporating man-like appearance and intending to imitate
human, but in most of the scenarios the information of the conversational bot is stored in a db
created by someone who has prolonged knowledge in that field.
However, few experts may have investigated the idea of creating a Chat Bot using an artificial
character and personality beginning from web-pages or plain-text of a certain person.
The paper elaborates the idea of pointing out the important facts in texts explaining the life of a
ancient figure for creating an agent that is used in school scenarios.
Paper 2: “Teaching Introductory Artificial Intelligence Using A simple Agent Framework”
Authors: Maja Pantic, Reinier Zwitserloot, and Robbert Jan Grootjans
Publisher: IEEE Transactions On Education, Vol. 48, No. 3, August 2005.
Observations:
The paper explain a way of teaching artificial intelligence (AI) using a genuine, naive agent
frameworks only for this course.
Though many agent frameworks have been proposed in the literature, none of the available
structures was easy or simple to be used by to be graduates of CSE.
The main objective of using such a study was to keep busy the students into which they found very
interesting.
A constructive approach and a traditional approach was used so that students learn very effectively.
11. 4
CHAPTER 4
EXISTING SYSTEM
There are many existing chatbots available in every area. Almost all the popular and active websites
have chatbots. The chatbot is run manually by the database. It is difficult to run by the man power
because at a time many customers ask questions so man power is difficult to answers the questions to
each one in a short time, so therefore chatbot comes in study. The user has to manually ask the
questions and thar chatbot database provides the answer so it is quite time consuming.
Drawbacks of Existing System
It is difficult to run by man power
System is run manually by the database
Difficult to respond every user within short time
12. 5
CHAPTER 5
PROBLEM STATEMENT
When one has to make choice out of an extensive alternative, one may face decision paralysis in which
in unable to make decision and even opt out of the decision. Artificial intelligence chatbot is a
technology that makes interactions between man and machines using natural language possible. From
literature, we found out that in general, chatbot are functions like a typical search engine. Although
chatbot just produced only one output instead of multiple outputs/results, the basic process flow is the
same where each time an input is entered, the new search will be done. Nothing related to previous
output.
This research is focused on enabling chatbot to become a search engine that can process the next search
with the relation to the previous search output. In chatbot context, this functionality will enhance the
capability of chatbot’s input processing.
13. 6
CHAPTER 6
SCOPE
The future work include training the chatbot with more varied data; increasing the scope of the
chatbot by adding a speech recognition feature so that users can speak to get responses.
The scopes of the application are:
The system was partially successful in adding empathy since scope of these queries is vast and the
system requires more rigorous data to handle all the questions which are out of script.
To improve the current functionalities of Chatbot, in the future, the scope of the chatbot can be
increased by inserting data for all the departments, training the bot with varied data, testing it on
live website, and based on that feedback inserting more training data to the bot.
14. 7
CHAPTER 7
PROPOSED SYSTEM
As we know the use of automated machines is increasing day by day i.e., the machine-human interaction
is also increasing day by day. The case might as well come true where one day humans would be replaced
by automated bots for performing specific functioning of the system. Where, a central system will be a
chatbot which will receive the input from the user which will be in the form of an audio/ voice. The input
can be received using a mic and then this voice input will be converted to the corresponding textual input
using preexisting python libraries. Then this textual input will be provided to the system which consists of
the chatterbot which will perform Natural Language Processing on the provided input and search within
its database for the query.
Two cases will be generated:
(1) When the input entered is an identifiable query, to which already an answer is known to the system.
This corresponding answer will be directly provided to the user in this case.
(2) When the input entered is not recognized, this is where the intelligence of the bot comes into play and
the system will understand the input and answer it using its intelligence. This is termed as “Artificial
Intelligence”.
16. 9
The following methodology will be used for working of the system:
Once the system knows what output is to be given to the user, the output is generated which is in a
textual format.
This textual format is then converted to voice using pre-existing libraries and a voice note is
generated. This voice clip will be given to the user as an output.
18. 11
CHAPTER 10
DETAILS OF HARDWARE AND SOFTWARE
Hardware Requirements:
PC with following Specifications:
1. 8 GBRAM
2. 64-bit Processor
3. Hard disk— 320 GB or above
4. USB Cable (debugging)
Software Requirements:
Google Collaboratory:
Colab is a free Jupyter notebook environment that runs entirely in the cloud. Most importantly, it does
not require a setup and the notebooks that you create can be simultaneously edited by your team
members - just the way you edit documents in Google Docs. Colab supports many popular machine
learning libraries which can be easily loaded in your notebook.
Google colab can be used to:
Write and execute code in Python
Document your code that supports mathematical equations
Create/Upload/Share notebooks
Import/Save notebooks from/to Google Drive
Import/Publish notebooks from GitHub
Import external datasets e.g. from Kaggle
Integrate PyTorch, TensorFlow, Keras, OpenCV
Free Cloud service with free GPU
19. 12
CHAPTER 11
WORKING
Code:
intents.json
{
"intents": [
{
"tag": "greeting",
"patterns": [
"Hi",
"Hey",
"How are you",
"Is anyone there?",
"Hello",
"Good day"
],
"responses": [
"Hey :-)",
"Hello, thanks for visiting",
"Hi there, what can I do for you?",
"Hi there, how can I help?"
]
},
{
"tag": "goodbye",
"patterns": ["Bye", "See you later", "Goodbye"],
"responses": [
"See you later, thanks for visiting",
"Have a nice day",
"Bye! Come back again soon."
]
},
{
"tag": "thanks",
"patterns": ["Thanks", "Thank you", "That's helpful", "Thank's a lot!"],
"responses": ["Happy to help!", "Any time!", "My pleasure"]
},
{
"tag": "items",
"patterns": [
20. 13
"Which items do you have?",
"What kinds of items are there?",
"What do you sell?"
],
"responses": [
"We sell coffee and tea",
"We have coffee and tea"
]
},
{
"tag": "payments",
"patterns": [
"Do you take credit cards?",
"Do you accept Mastercard?",
"Can I pay with Paypal?",
"Are you cash only?"
],
"responses": [
"We accept VISA, Mastercard and Paypal",
"We accept most major credit cards, and Paypal"
]
},
{
"tag": "delivery",
"patterns": [
"How long does delivery take?",
"How long does shipping take?",
"When do I get my delivery?"
],
"responses": [
"Delivery takes 2-4 days",
"Shipping takes 2-4 days"
]
},
{
"tag": "funny",
"patterns": [
"Tell me a joke!",
"Tell me something funny!",
"Do you know a joke?"
],
"responses": [
"Why did the hipster burn his mouth? He drank the coffee before it was cool.",
"What did the buffalo say when his son left for college? Bison."
]
}
]
}
21. 14
nltk_utils.py
import numpy as np
import nltk
#nltk.download('punkt')
from nltk.stem.porter import PorterStemmer
stemmer = PorterStemmer()
def tokenize(sentence):
"""
split sentence into array of words/tokens
a token can be a word or punctuation character, or number
"""
return nltk.word_tokenize(sentence)
def stem(word):
"""
stemming = find the root form of the word
examples:
words = ["organize", "organizes", "organizing"]
words = [stem(w) for w in words]
-> ["organ", "organ", "organ"]
"""
return stemmer.stem(word.lower())
def bag_of_words(tokenized_sentence, words):
"""
return bag of words array:
1 for each known word that exists in the sentence, 0 otherwise
example:
sentence = ["hello", "how", "are", "you"]
words = ["hi", "hello", "I", "you", "bye", "thank", "cool"]
bog = [ 0 , 1 , 0 , 1 , 0 , 0 , 0]
"""
# stem each word
sentence_words = [stem(word) for word in tokenized_sentence]
# initialize bag with 0 for each word
bag = np.zeros(len(words), dtype=np.float32)
for idx, w in enumerate(words):
if w in sentence_words:
bag[idx] = 1
return bag
22. 15
train.py
import numpy as np
import random
import json
import torch
import torch.nn as nn
from torch.utils.data import Dataset, DataLoader
from nltk_utils import bag_of_words, tokenize, stem
from model import NeuralNet
with open('intents.json', 'r') as f:
intents = json.load(f)
all_words = []
tags = []
xy = []
# loop through each sentence in our intents patterns
for intent in intents['intents']:
tag = intent['tag']
# add to tag list
tags.append(tag)
for pattern in intent['patterns']:
# tokenize each word in the sentence
w = tokenize(pattern)
# add to our words list
all_words.extend(w)
# add to xy pair
xy.append((w, tag))
# stem and lower each word
ignore_words = ['?', '.', '!']
all_words = [stem(w) for w in all_words if w not in ignore_words]
# remove duplicates and sort
all_words = sorted(set(all_words))
tags = sorted(set(tags))
print(len(xy), "patterns")
print(len(tags), "tags:", tags)
print(len(all_words), "unique stemmed words:", all_words)
# create training data
23. 16
X_train = []
y_train = []
for (pattern_sentence, tag) in xy:
# X: bag of words for each pattern_sentence
bag = bag_of_words(pattern_sentence, all_words)
X_train.append(bag)
# y: PyTorch CrossEntropyLoss needs only class labels, not one-hot
label = tags.index(tag)
y_train.append(label)
X_train = np.array(X_train)
y_train = np.array(y_train)
# Hyper-parameters
num_epochs = 1000
batch_size = 8
learning_rate = 0.001
input_size = len(X_train[0])
hidden_size = 8
output_size = len(tags)
print(input_size, output_size)
class ChatDataset(Dataset):
def init (self):
self.n_samples = len(X_train)
self.x_data = X_train
self.y_data = y_train
# support indexing such that dataset[i] can be used to get i-th sample
def getitem (self, index):
return self.x_data[index], self.y_data[index]
# we can call len(dataset) to return the size
def len (self):
return self.n_samples
dataset = ChatDataset()
train_loader = DataLoader(dataset=dataset,
batch_size=batch_size,
shuffle=True,
num_workers=0)
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
model = NeuralNet(input_size, hidden_size, output_size).to(device)
# Loss and optimizer
24. 17
criterion = nn.CrossEntropyLoss()
optimizer = torch.optim.Adam(model.parameters(), lr=learning_rate)
# Train the model
for epoch in range(num_epochs):
for (words, labels) in train_loader:
words = words.to(device)
labels = labels.to(dtype=torch.long).to(device)
# Forward pass
outputs = model(words)
# if y would be one-hot, we must apply
# labels = torch.max(labels, 1)[1]
loss = criterion(outputs, labels)
# Backward and optimize
optimizer.zero_grad()
loss.backward()
optimizer.step()
if (epoch+1) % 100 == 0:
print (f'Epoch [{epoch+1}/{num_epochs}], Loss: {loss.item():.4f}')
print(f'final loss: {loss.item():.4f}')
data = {
"model_state": model.state_dict(),
"input_size": input_size,
"hidden_size": hidden_size,
"output_size": output_size,
"all_words": all_words,
"tags": tags
}
FILE = "data.pth"
torch.save(data, FILE)
print(f'training complete. file saved to {FILE}')
25. 18
model.py
chat.py
import torch
import torch.nn as nn
class NeuralNet(nn.Module):
def init (self, input_size, hidden_size, num_classes):
super(NeuralNet, self). init ()
self.l1 = nn.Linear(input_size, hidden_size)
self.l2 = nn.Linear(hidden_size, hidden_size)
self.l3 = nn.Linear(hidden_size, num_classes)
self.relu = nn.ReLU()
def forward(self, x):
out = self.l1(x)
out = self.relu(out)
out = self.l2(out)
out = self.relu(out)
out = self.l3(out)
# no activation and no softmax at the end
return out
import random
import json
import torch
from model import NeuralNet
from nltk_utils import bag_of_words, tokenize
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
with open('intents.json', 'r') as json_data:
intents = json.load(json_data)
FILE = "data.pth"
data = torch.load(FILE)
input_size = data["input_size"]
hidden_size = data["hidden_size"]
output_size = data["output_size"]
all_words = data['all_words']
26. 19
tags = data['tags']
model_state = data["model_state"]
model = NeuralNet(input_size, hidden_size, output_size).to(device)
model.load_state_dict(model_state)
model.eval()
bot_name = "Sam"
print("Let's chat! (type 'quit' to exit)")
while True:
# sentence = "do you use credit cards?"
sentence = input("You: ")
if sentence == "quit":
break
sentence = tokenize(sentence)
X = bag_of_words(sentence, all_words)
X = X.reshape(1, X.shape[0])
X = torch.from_numpy(X).to(device)
output = model(X)
_, predicted = torch.max(output, dim=1)
tag = tags[predicted.item()]
probs = torch.softmax(output, dim=1)
prob = probs[0][predicted.item()]
if prob.item() > 0.75:
for intent in intents['intents']:
if tag == intent["tag"]:
print(f"{bot_name}: {random.choice(intent['responses'])}")
else:
print(f"{bot_name}: I do not understand...")
27. 20
Output:
The result of the chatbot that we have implemented is shown below.
The Chatbot has been trained using seq2seq architecture and has been tested.