Building a Chatbot for Libraries

Building a Chatbot for Libraries

DOI: 10.4018/978-1-6684-7693-2.ch015
(Individual Chapters)
No Current Special Offers


Natural language processing (NLP) is a very important science because it helps make human language understandable to machines. In addition, it helps add numeric structure to the unstructured data that is needed for many applications, such as speech recognition or text analytics. The importance of improving speech recognition is not limited to individual applications that make life easier. Speech recognition technology is very important for many businesses, as it can provide customer service benefits and enrich the customer experience. For example, voice recognition technologies have proven to be very secure, and even banks use them to authorize access to individuals' accounts. This chapter consists of the execution of a chatbot using different machine learning algorithms to help provide answers to users and provide basic customer service support.
Chapter Preview


A dialogue system such as “Chatbot” is a computer system meant to mimic human conversation. Dialogue systems may employ text, graphics, gestures, and other ways of communication to make conversation as realistic as possible. Natural Language Processing (NLP) is of great interest in dialogue systems, as many companies use them to save both time and money by employing chatbots. It is exciting to train bots to be as close as possible to human interaction, logic, way of thinking, and emotions. We find these bot/dialogue systems everywhere around us, on many websites, in many services providing applications, as well as Apple Siri, Google Assistant, and Microsoft Cortana.

Machine Learning

Machine Learning (ML) is a rising field of Artificial Intelligence (AI), in ML researchers build models (mathematical and statistical models) from the data collected by researchers. Therefore, models based on machine-learning algorithms can predict and make decisions based on input data. Researchers divide machine learning tasks into these main types (Bishop, 2006):

  • 1.

    Classification: In classification tasks, the researcher identifies a set of categories to which the input data belongs.

  • 2.

    Regression tasks are based on predictions using historical data as inputs.

Goodfellow et al. (2016) classified machines into the following types.

  • Supervised learning is based on learning a function from training sets that are composed of an input feature vector x and the desired output for this specific input y. Scientists train our model to a function that maps the input to the output, hence predicting y from x (normally by calculating the probability).

  • Unsupervised learning is based on the learning representation of input transformation without any targeted output. The model here learns the properties of the structure of the dataset, for example, learning the probability distribution p(x).

Key Terms in this Chapter

CUDA: Is a parallel computing platform and application programming interface that allows software to use certain types of graphics processing units for general purpose processing.

Feature Extraction: Refers to the process of manipulating data into a numerical feature that can be processed by the machine while preserving the information in the original dataset.

JSON File: Is an open standard file (.json) and data format used for data interchange through various forms of technology. The most common use of JSON data and files is to read data from a server for a website or web application to display—and change data given the correct permissions.

NumPy: NumPy is a library for the Python programming language, adding support for large, multi-dimensional arrays and matrices, along with a large collection of high-level mathematical functions to operate on these arrays.

Supervised Machine Learning: This type of machine learning happens using labeled datasets to train artificial intelligence algorithms to cluster datasets accurately.

PyTorch: A machine learning framework based on the Torch library, used for applications such as computer vision and natural language processing.

Unsupervised Machine Learning: The machine uses artificial intelligence algorithms to cluster unlabeled datasets.

Machine Learning (ML): The development of algorithms that enable machines to mimic human intelligence.

Tensorflow: Is a free and open-source software library for machine learning and artificial intelligence.

Apache Spark: An open-source unified analytics engine for large-scale data processing.

Complete Chapter List

Search this Book: