100% found this document useful (2 votes)
38 views55 pages

Where Can Buy Building An Enterprise Chatbot: Work With Protected Enterprise Data Using Open Source Frameworks Abhishek Singh Ebook With Cheap Price

Using

Uploaded by

drnekmbiabo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (2 votes)
38 views55 pages

Where Can Buy Building An Enterprise Chatbot: Work With Protected Enterprise Data Using Open Source Frameworks Abhishek Singh Ebook With Cheap Price

Using

Uploaded by

drnekmbiabo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 55

Experience Seamless Full Ebook Downloads for Every Genre at textbookfull.

com

Building an Enterprise Chatbot: Work with


Protected Enterprise Data Using Open Source
Frameworks Abhishek Singh

https://textbookfull.com/product/building-an-enterprise-
chatbot-work-with-protected-enterprise-data-using-open-
source-frameworks-abhishek-singh/

OR CLICK BUTTON

DOWNLOAD NOW

Explore and download more ebook at https://textbookfull.com


Recommended digital products (PDF, EPUB, MOBI) that
you can download immediately if you are interested.

Reinforcement Learning: With Open AI, TensorFlow and Keras


Using Python 1st Edition Abhishek Nandy

https://textbookfull.com/product/reinforcement-learning-with-open-ai-
tensorflow-and-keras-using-python-1st-edition-abhishek-nandy/

textboxfull.com

Data simplification : taming information with open source


tools 1st Edition Berman

https://textbookfull.com/product/data-simplification-taming-
information-with-open-source-tools-1st-edition-berman/

textboxfull.com

Building Enterprise IoT Applications 1st Edition


Chandrasekar Vuppalapati

https://textbookfull.com/product/building-enterprise-iot-
applications-1st-edition-chandrasekar-vuppalapati/

textboxfull.com

Beginning EJB in Java EE 8: Building Applications with


Enterprise JavaBeans Jonathan Wetherbee

https://textbookfull.com/product/beginning-ejb-in-java-ee-8-building-
applications-with-enterprise-javabeans-jonathan-wetherbee/

textboxfull.com
GeoServer beginner s guide share geospatial data using
open source standards Second Edition. Edition Iacovella

https://textbookfull.com/product/geoserver-beginner-s-guide-share-
geospatial-data-using-open-source-standards-second-edition-edition-
iacovella/
textboxfull.com

SQL Server Data Automation Through Frameworks: Building


Metadata-Driven Frameworks with T-SQL, SSIS, and Azure
Data Factory Andy Leonard
https://textbookfull.com/product/sql-server-data-automation-through-
frameworks-building-metadata-driven-frameworks-with-t-sql-ssis-and-
azure-data-factory-andy-leonard/
textboxfull.com

Data Science Using Oracle Data Miner and Oracle R


Enterprise Transform Your Business Systems into an
Analytical Powerhouse 1st Edition Sibanjan Das (Auth.)
https://textbookfull.com/product/data-science-using-oracle-data-miner-
and-oracle-r-enterprise-transform-your-business-systems-into-an-
analytical-powerhouse-1st-edition-sibanjan-das-auth/
textboxfull.com

Data simplification taming information with open source


tools First Edition (Online-Ausg.) Berman

https://textbookfull.com/product/data-simplification-taming-
information-with-open-source-tools-first-edition-online-ausg-berman/

textboxfull.com

Practical Data Science with SAP Machine Learning


Techniques for Enterprise Data 1st Edition Greg Foss

https://textbookfull.com/product/practical-data-science-with-sap-
machine-learning-techniques-for-enterprise-data-1st-edition-greg-foss/

textboxfull.com
Building an
Enterprise Chatbot
Work with Protected Enterprise Data
Using Open Source Frameworks

Abhishek Singh
Karthik Ramasubramanian
Shrey Shivam
Building an Enterprise
Chatbot
Work with Protected
Enterprise Data Using Open
Source Frameworks

Abhishek Singh
Karthik Ramasubramanian
Shrey Shivam
Building an Enterprise Chatbot: Work with Protected Enterprise Data
Using Open Source Frameworks

Abhishek Singh Karthik Ramasubramanian


New Delhi, Delhi, India New Delhi, Delhi, India
Shrey Shivam
Donegal, Donegal, Ireland

ISBN-13 (pbk): 978-1-4842-5033-4 ISBN-13 (electronic): 978-1-4842-5034-1


https://doi.org/10.1007/978-1-4842-5034-1

Copyright © 2019 by Abhishek Singh, Karthik Ramasubramanian, Shrey Shivam


This work is subject to copyright. All rights are reserved by the Publisher, whether the whole or
part of the material is concerned, specifically the rights of translation, reprinting, reuse of
illustrations, recitation, broadcasting, reproduction on microfilms or in any other physical way,
and transmission or information storage and retrieval, electronic adaptation, computer software,
or by similar or dissimilar methodology now known or hereafter developed.
Trademarked names, logos, and images may appear in this book. Rather than use a trademark
symbol with every occurrence of a trademarked name, logo, or image we use the names, logos,
and images only in an editorial fashion and to the benefit of the trademark owner, with no
intention of infringement of the trademark.
The use in this publication of trade names, trademarks, service marks, and similar terms, even if
they are not identified as such, is not to be taken as an expression of opinion as to whether or not
they are subject to proprietary rights.
While the advice and information in this book are believed to be true and accurate at the date of
publication, neither the authors nor the editors nor the publisher can accept any legal
responsibility for any errors or omissions that may be made. The publisher makes no warranty,
express or implied, with respect to the material contained herein.
Managing Director, Apress Media LLC: Welmoed Spahr
Acquisitions Editor: Celestin Suresh John
Development Editor: Matthew Moodie
Coordinating Editor: Aditee Mirashi
Cover designed by eStudioCalamar
Cover image designed by Freepik (www.freepik.com)
Distributed to the book trade worldwide by Springer Science+Business Media New York, 233
Spring Street, 6th Floor, New York, NY 10013. Phone 1-800-SPRINGER, fax (201) 348-4505, e-mail
[email protected], or visit www.springeronline.com. Apress Media, LLC is a
California LLC and the sole member (owner) is Springer Science + Business Media Finance Inc
(SSBM Finance Inc). SSBM Finance Inc is a Delaware corporation.
For information on translations, please e-mail [email protected], or visit www.apress.com/
rights-permissions.
Apress titles may be purchased in bulk for academic, corporate, or promotional use. eBook
versions and licenses are also available for most titles. For more information, reference our Print
and eBook Bulk Sales web page at www.apress.com/bulk-sales.
Any source code or other supplementary material referenced by the author in this book is
available to readers on GitHub via the book’s product page, located at www.apress.com/
978-1-4842-5033-4. For more detailed information, please visit www.apress.com/source-code.
Printed on acid-free paper
Abhishek and Karthik dedicate this book to their parents
for their unwavering support and love.

Shrey dedicates this book in memory of his grandparents,


the late Mr. Ravindra Narayan Singh and
late Dr. Ganga Prasad Singh, for being the source of
his inspiration and pride.
Table of Contents
About the Authors������������������������������������������������������������������������������xiii
About the Technical Reviewer����������������������������������������������������������xvii
Acknowledgments�����������������������������������������������������������������������������xix
Introduction���������������������������������������������������������������������������������������xxi

Chapter 1: Processes in the Banking and Insurance Industries�����������1


Banking and Insurance Industries������������������������������������������������������������������������1
A Customer-Centric Approach in Financial Services���������������������������������������������6
Benefits from Chatbots for a Business�����������������������������������������������������������������9
Chatbots in the Insurance Industry���������������������������������������������������������������������10
Automated Underwriting�������������������������������������������������������������������������������12
Instant Quotations�����������������������������������������������������������������������������������������13
AI-Based Personalized Experience����������������������������������������������������������������13
Simplification of the Insurance Buying Process��������������������������������������������13
Registering a Claim���������������������������������������������������������������������������������������13
Finding an Advisor�����������������������������������������������������������������������������������������13
Answering General Queries���������������������������������������������������������������������������14
Policy Status��������������������������������������������������������������������������������������������������14
Instant Notifications��������������������������������������������������������������������������������������14
New Policy or Plan Suggestions��������������������������������������������������������������������14
Conversational Chatbot Landscape���������������������������������������������������������������������14
Summary������������������������������������������������������������������������������������������������������������17

v
Table of Contents

Chapter 2: Identifying the Sources of Data�����������������������������������������19


Chatbot Conversations����������������������������������������������������������������������������������������19
General Conversations�����������������������������������������������������������������������������������20
Specific Conversations����������������������������������������������������������������������������������20
Training Chatbots for Conversations�������������������������������������������������������������������21
Self-Generated Data��������������������������������������������������������������������������������������22
Customer Interactions�����������������������������������������������������������������������������������23
Customer Service Experts�����������������������������������������������������������������������������25
Open Source Data������������������������������������������������������������������������������������������26
Crowdsourcing����������������������������������������������������������������������������������������������26
Personal Data in Chatbots�����������������������������������������������������������������������������������27
Introduction to the General Data Protection Regulation (GDPR)��������������������������29
Data Protected Under the GDPR��������������������������������������������������������������������29
Data Protection Stakeholders������������������������������������������������������������������������30
Customer Rights Under the GDPR�����������������������������������������������������������������30
Chatbot Compliance to GDPR������������������������������������������������������������������������32
Summary������������������������������������������������������������������������������������������������������������33

Chapter 3: Chatbot Development Essentials���������������������������������������35


Customer Service-Centric Chatbots��������������������������������������������������������������������35
Business Context�������������������������������������������������������������������������������������������36
Policy Compliance�����������������������������������������������������������������������������������������38
Security, Authentication, and Authorization���������������������������������������������������39
Accuracy of User Input Translation to Systems���������������������������������������������41
Chatbot Development Approaches����������������������������������������������������������������������42
Rules-Based Approach����������������������������������������������������������������������������������43
AI-Based Approach����������������������������������������������������������������������������������������45
Conversational Flow��������������������������������������������������������������������������������������������47

vi
Table of Contents

Key Terms in Chatbots����������������������������������������������������������������������������������������49


Utterance�������������������������������������������������������������������������������������������������������49
Intent�������������������������������������������������������������������������������������������������������������50
Entity�������������������������������������������������������������������������������������������������������������50
Channel���������������������������������������������������������������������������������������������������������51
Human Takeover��������������������������������������������������������������������������������������������51
Use Case: 24x7 Insurance Agent�������������������������������������������������������������������������52
Summary������������������������������������������������������������������������������������������������������������53

Chapter 4: Building a Chatbot Solution����������������������������������������������55


Business Considerations�������������������������������������������������������������������������������������55
Chatbots vs. Apps������������������������������������������������������������������������������������������56
Growth of Messenger Applications����������������������������������������������������������������57
Direct Contact vs. Chat����������������������������������������������������������������������������������57
Business Benefits of Chatbots����������������������������������������������������������������������������58
Cost Savings��������������������������������������������������������������������������������������������������58
Customer Experience������������������������������������������������������������������������������������59
Success Metrics��������������������������������������������������������������������������������������������������60
Customer Satisfaction Index��������������������������������������������������������������������������60
Completion Rate��������������������������������������������������������������������������������������������60
Bounce Rate��������������������������������������������������������������������������������������������������61
Managing Risks in Chatbots Service������������������������������������������������������������������61
Third-Party Channels�������������������������������������������������������������������������������������61
Impersonation�����������������������������������������������������������������������������������������������62
Personal Information�������������������������������������������������������������������������������������62
Confirmation Check���������������������������������������������������������������������������������������63

vii
Table of Contents

Generic Solution Architecture for Private Chatbots���������������������������������������������63


Workflow Description������������������������������������������������������������������������������������64
Key Features��������������������������������������������������������������������������������������������������67
Technology Stack������������������������������������������������������������������������������������������68
Maintenance��������������������������������������������������������������������������������������������������68
Summary������������������������������������������������������������������������������������������������������������69

Chapter 5: Natural Language Processing, Understanding,


and Generation�����������������������������������������������������������������������������������71
Chatbot Architecture�������������������������������������������������������������������������������������������73
Popular Open Source NLP and NLU Tools������������������������������������������������������������76
NLTK��������������������������������������������������������������������������������������������������������������77
spaCy�������������������������������������������������������������������������������������������������������������77
CoreNLP���������������������������������������������������������������������������������������������������������79
gensim�����������������������������������������������������������������������������������������������������������80
TextBlob���������������������������������������������������������������������������������������������������������81
fastText����������������������������������������������������������������������������������������������������������82
Natural Language Processing�����������������������������������������������������������������������������82
Processing Textual Data��������������������������������������������������������������������������������83
Word Search Using Regex�����������������������������������������������������������������������������85
Word Search Using the Exact Word���������������������������������������������������������������86
NLTK��������������������������������������������������������������������������������������������������������������87
spaCy�������������������������������������������������������������������������������������������������������������94
CoreNLP�������������������������������������������������������������������������������������������������������106
TextBlob�������������������������������������������������������������������������������������������������������110
Multilingual Text Processing������������������������������������������������������������������������113
Natural Language Understanding���������������������������������������������������������������������116
Sentiment Analysis��������������������������������������������������������������������������������������117
Language Models����������������������������������������������������������������������������������������118

viii
Table of Contents

Information Extraction Using OpenIE�����������������������������������������������������������133


Topic Modeling Using Latent Dirichlet Allocation����������������������������������������136
Natural Language Generation���������������������������������������������������������������������������141
Markov Chain-Based Headline Generator����������������������������������������������������142
SimpleNLG���������������������������������������������������������������������������������������������������145
Deep Learning Model for Text Generation���������������������������������������������������152
Applications������������������������������������������������������������������������������������������������������168
Topic Modeling Using spaCy, NLTK, and gensim Libraries���������������������������169
Gender Identification�����������������������������������������������������������������������������������175
Document Classification������������������������������������������������������������������������������179
Intent Classification and Question Answering���������������������������������������������184
Summary����������������������������������������������������������������������������������������������������������191

Chapter 6: A Novel In-House Implementation of a


Chatbot Framework��������������������������������������������������������������������������193
Introduction to IRIS�������������������������������������������������������������������������������������������194
Intents, Slots, and Matchers�����������������������������������������������������������������������������195
Intent Class��������������������������������������������������������������������������������������������������197
IntentMatcherService Class�������������������������������������������������������������������������198
The getIntent Method of the IntentMatcherService class����������������������������201
Matched Intent Class�����������������������������������������������������������������������������������205
Slot Class�����������������������������������������������������������������������������������������������������207
IRIS Memory������������������������������������������������������������������������������������������������������212
Long- and Short-Term Sessions������������������������������������������������������������������212
The Session Class���������������������������������������������������������������������������������������213
Dialogues as Finite State Machines������������������������������������������������������������������219
State������������������������������������������������������������������������������������������������������������221
Shields���������������������������������������������������������������������������������������������������������222

ix
Table of Contents

Transition�����������������������������������������������������������������������������������������������������223
State Machine���������������������������������������������������������������������������������������������224
Building a Custom Chatbot for an Insurance Use Case�������������������������������������230
Creating the Intents�������������������������������������������������������������������������������������233
IrisConfiguration������������������������������������������������������������������������������������������243
Managing State�������������������������������������������������������������������������������������������271
Exposing a REST Service�����������������������������������������������������������������������������273
Adding a Service Endpoint��������������������������������������������������������������������������277
Summary����������������������������������������������������������������������������������������������������������278

Chapter 7: Introduction to Microsoft Bot, RASA, and


Google Dialogflow�����������������������������������������������������������������������������281
Microsoft Bot Framework���������������������������������������������������������������������������������281
Introduction to QnA Maker���������������������������������������������������������������������������282
Introduction to LUIS�������������������������������������������������������������������������������������290
Introduction to RASA�����������������������������������������������������������������������������������������292
RASA Core���������������������������������������������������������������������������������������������������294
RASA NLU����������������������������������������������������������������������������������������������������295
Introduction to Dialogflow���������������������������������������������������������������������������������296
Summary����������������������������������������������������������������������������������������������������������301

Chapter 8: Chatbot Integration Mechanism��������������������������������������303


Integration with Third-Party APIs����������������������������������������������������������������������303
Market Trends����������������������������������������������������������������������������������������������304
Stock Prices�������������������������������������������������������������������������������������������������310
Weather Information������������������������������������������������������������������������������������316
Connecting to an Enterprise Data Store������������������������������������������������������������321
Integration Module��������������������������������������������������������������������������������������������325

x
Table of Contents

Demonstration of AskIris Chatbot in Facebook Messenger������������������������������338


Account Balance������������������������������������������������������������������������������������������338
Claim Status������������������������������������������������������������������������������������������������339
Weather Today���������������������������������������������������������������������������������������������340
Frequently Asked Questions������������������������������������������������������������������������341
Context Switch Example������������������������������������������������������������������������������342
Summary����������������������������������������������������������������������������������������������������������344

Chapter 9: Deployment and a Continuous Improvement


Framework���������������������������������������������������������������������������������������345
Deployment to the Cloud�����������������������������������������������������������������������������������345
As a Stand-Alone Spring Boot JAR on AWS EC2������������������������������������������346
As a Docker Container on AWS EC2�������������������������������������������������������������349
As an ECS Service���������������������������������������������������������������������������������������352
Smart IRIS Alexa Skill Creation in Less Than 5 Minutes�����������������������������������357
Continuous Improvement Framework���������������������������������������������������������������368
Intent Confirmation (Double-Check)������������������������������������������������������������369
Predict Next Intent���������������������������������������������������������������������������������������371
A Human in the Loop�����������������������������������������������������������������������������������373
Summary����������������������������������������������������������������������������������������������������������375

Index�������������������������������������������������������������������������������������������������377

xi
About the Authors
Abhishek Singh is on a mission to profess
the de facto language of this millennium, the
numbers. He is on a journey to bring machines
closer to humans, for a better and more
beautiful world by generating opportunities
with artificial intelligence and machine
learning. He leads a team of data science
professionals solving pressing problems in
food security, cyber security, natural disasters,
healthcare, and many more areas, all with the
help of data and technology. Abhishek is in
the process of bringing smart IoT devices to smaller cities in India so that
people can leverage technology for the betterment of life.
He has worked with colleagues from many parts of the United States,
Europe, and Asia, and strives to work with more people from various
backgrounds. In seven years at big corporations, he has stress-tested
the assets of U.S. banks at Deloitte, solved insurance pricing models at
Prudential, made telecom experiences easier for customers at Celcom,
and created core SaaS data products at Probyto. He is now creating data
science opportunities with his team of young minds.
He actively participates in analytics-related thought leadership,
authoring, public speaking, meetups, and training in data science. He is a
staunch supporter of responsible use of AI to remove biases and fair use of
AI for a better society.
Abhishek completed his MBA from IIM Bangalore, a B.Tech. in
Mathematics and Computing from IITGuwahati, and has a PG Diploma in
Cyber Law from NALSAR University, Hyderabad.

xiii
About the Authors

Karthik Ramasubramanian has over seven


years of practice in data science and business
analytics in retail, FMCG, e-commerce, and
information technology for a multi-national
and two unicorn startups. He is a researcher
and problem solver with a diverse set of
experiences in the data science lifecycle,
starting from a data problem discovery to
creating a data science prototype/product.
On the descriptive side of data science, he
designed, developed, and spearheaded many A/B experiment frameworks
for improving product features, conceptualized funnel analysis for
understanding user interactions and identifying the friction points within
a product, and designed statistically robust metrics and visual dashboards.
On the predictive side, he developed intelligent chatbots which
understand human-like interactions, customer segmentation models,
recommendation systems, identified medical specialization from a patient
query for telemedicine, and other projects.
He actively participates in analytics-related thought leadership,
authoring blogs and books, public speaking, meet-ups, and training and
mentoring for data science.
Karthik completed his M.Sc. in Theoretical Computer Science at
PSG College of Technology, India, where he pioneered the application of
machine learning, data mining, and fuzzy logic in his research work on the
computer and network security.

xiv
About the Authors

Shrey Shivam has extensive experience in


leading the design, development, and delivery
of solutions in the field of data engineering,
stream analytics, machine learning, graph
databases, and natural language processing. In
his seven years of experience, he has worked
with various conglomerates, startups, and
big corporations, and has gained relevant
exposure to digital media, e-commerce,
investment banking, insurance, and a suite of
transaction-led marketplaces across the music, food, lifestyle, news, legal,
and travel domains.
He is a keen learner and is actively engaged in designing the next
generation of systems powered by artificial intelligence-based analytical
and predictive models. He has taken up various roles in product
management, data analytics, digital growth, system architecture, and full
stack engineering. In this era of rapid acceptance and adoption of new and
emerging technologies, he believes in strong technical fundamentals and
advocates continuous improvement through self-learning.
Shrey is currently leading a team of machine learning and big data
engineers across the U.S., Europe, and India to build robust and scalable
big data pipelines to implement various statistical and predictive models.
Shrey completed his BTech in Information Technology from Cochin
University of Science and Technology, India.

xv
About the Technical Reviewer
Santanu Pattanayak currently works at
GE, Digital as a Staff Data Scientist and
is the author of Pro Deep Learning with
TensorFlow - A Mathematical Approach to
Advanced Artificial Intelligence in Python. He
has 12 years of overall work experience with
8 years of experience in the data analytics/
data science field. He also has a background
in development and database technologies.
Prior to joining GE, Santanu worked at
companies such as RBS, Capgemini, and
IBM. He graduated with a degree in Electrical Engineering from Jadavpur
University, Kolkata and is an avid math enthusiast. Santanu is currently
pursuing a master’s degree in Data Science from Indian Institute of
Technology (IIT), Hyderabad. He also devotes time to data science
hackathons and Kaggle competitions where he ranks within the top 500
across the globe. Santanu was born and brought up in West Bengal, India
and currently resides in Bangalore, India with his wife.

xvii
Acknowledgments
We are grateful to our teachers at various universities and their continued
support in our professional lives.
Abhishek Singh thanks his colleagues at Probyto who inspire him to
write impactful content for better use of AI for public use; the idea of this
book evolved through discussions with his colleagues and his work in the
EU market. A special mention goes to his parents, Mr. Charan Singh and
Mrs. Jayawati, for their intriguing insights on how to think about general
human use of AI. Their support and demand for the simplistic design of
solutions using AI-generated data inspires his day-to-day design of data
products.
Karthik is immensely grateful to his parents, Mr. S Ramasubramanian
and Mrs. Kanchana, for their unwavering support throughout his life
and during the development of this book. This book was made possible
by hundreds of researchers who shared their life’s work as open-source
offerings. He thanks all such researchers who make this world better and
passionately share their work with everyone. Lastly, a large part of his work
and success comes from his mentors and colleagues from work, where he
continuously learns and improves.
Shrey is hugely grateful to his parents, Mr. Vijay Pratap Singh and Mrs.
Bharti Singh, for their love, care, and sacrifice in helping him fulfill his
dreams. He expresses gratitude to his uncle, Mr. Tarun Singh, for being
a pillar of strength. Shrey also thanks his past and current colleagues,
including Dipesh Singh and Jaspinder Singh Virdee, for their continuous
encouragement and support in taking up challenging and innovative ideas
to execution.

xix
Acknowledgments

Finally, this book would not have been possible without the support of
the Apress team: Aditee, Celestin, Matthew, and the production support
staff. We also acknowledge and thank our Technical Reviewer (TR) for their
critical reviews that helped to make the book even better.

xx
Introduction
There are numerous frameworks and propriety off-the-shelf chatbot
offerings, but most do not clearly map out the much-needed control
of data by an organization. Often the propriety offerings take an
organization’s private data for training on the cloud and provide the
outcome as a model. In this book, we will focus on data privacy and
control over the development process. The chatbot that you will learn how
to develop could be completely built in-house using open-source JAVA
frameworks and NLP libraries in Python.
The beginning of the book helps you understand the processes in
the banking industry and delves into identifying the sources of data to
mine for the intent from customer queries. The second part focuses on
natural language processing, understanding, and generation, which
are demonstrated using Python. These three concepts are the core
components of a chatbot. In the final part, you take up the development of
a chatbot called IRIS using open-source frameworks written in JAVA.
The following are the key topics this book offers:

• Identify the business processes where chatbots could


be used in an industry and suitably guide the design in
a solution architecture

• Focus on building a chatbot for one industry and one


use-case, rather than building a ubiquitous and generic
chatbot

• Natural language understanding, processing, and


generation

xxi
Introduction

• Learn how to deploy a complete in-house-built chatbot


using an open source technology stack like RASA and
Botpress (such chatbots avoid sharing any PIIs with any
third-party tools)
• Develop a chatbot called IRIS from scratch by
customizing an existing open-source chatbot
framework

• Use APIs for chatbot integration with internal data


sources

• Deployment and continuous improvement framework


through representational learning

We hope you enjoy the journey.

xxii
CHAPTER 1

Processes in
the Banking and
Insurance Industries
According to Darwin’s On the Origin of Species, it is not the most
intellectual of the species that survives; it is not the strongest that survives;
the species that survives is the one that is best able to adapt and adjust to
the changing environment in which it finds itself. The same analogy can
apply to enterprises and their survival opportunities in the 21st century. In
this digital era, it is of utmost importance for enterprises to adapt to the
latest trends and technology advancements. With this book, we intend to
prepare you with an emerging skill of building chatbots in the financial
services domain, with a specific use case of an insurance agent (replicable
to a bank assistant as well).

Banking and Insurance Industries


Banks and insurers have been in existence for a long time and facilitate
economic activities for us. Banking and insurance play essential roles in
the economic growth of a country and society. Both institutions provide
the essential services of commercial transactions and covering risks.

© Abhishek Singh, Karthik Ramasubramanian, Shrey Shivam 2019 1


A. Singh et al., Building an Enterprise Chatbot,
https://doi.org/10.1007/978-1-4842-5034-1_1
Chapter 1 Processes in the Banking and Insurance Industries

Insurance services evolved from the practice of risk management


for uncertain events. The risk is defined as the uncertainty of outcome
in the normal process. The risks are quantified in monetary terms with
consequences that are unfavorable to the process. The insurance function
tends to manage the risk by providing a security net against a payment. In
financial terms, insurance transfers the risk of the unfavorable event to the
insurer against a payment of a premium.
As seen in Figure 1-1 , the primary function of an insurance company
is to manage the fund created by the premiums paid by the insured. The
critical function of an insurance company is to measure the risk of loss
arising from the pool to decide on premiums and, in case of an accident/
adverse outcome, pay the policyholder the loss amount. As the count
of adverse outcomes decreases with an increasing population, smaller
premiums can be levied while a higher payout can be made to the insured
who faces an adverse outcome.

Figure 1-1. Theoretical framework of insurance

2
Chapter 1 Processes in the Banking and Insurance Industries

The insurance industry is comprises of evolved financial services


and products which are centuries old. With the advent of technology, the
insurance industry has seen a surge in number of big insurance companies
and deeper penetration with new products. Having a concentration brings
better premiums for the insured and allows companies to cover a broader
set of risks. As seen in Figure 1-2, typically the insurance products can be
divided into two categories: life insurance and general insurance.

Insurance

Life Insurance General Insurance

• Health
• Vehicle
• Travel
• Home
• Corporate
• Others

Figure 1-2. Insurance product categorization

Life insurance provides coverage to the risk of mortality. The insured


beneficiary receives a face amount in case of death during the coverage
period. In this manner, this insurance product safeguards against financial
losses arising from the death of a critical member of the family. The
risk covered is called mortality risk. The actuarial science is the study of
mortality behavior and used in study of fair pricing of premiums for the
given subject for life insurance.
Insurance is not just limited to insuring against the risk of death. The
insurance concept has been extended to other forms of risk as well. The
other bucket of coverage is known as general insurance; this includes
health insurance covering the financial risk of ill health, vehicle insurance

3
Chapter 1 Processes in the Banking and Insurance Industries

for accidents, travel insurance for flight delays, and so on. The established
insurance companies offer multiple products to customers and institutions
as per their needs. Some of these products have standard features, where
some insurance companies can create custom deals as per client needs, for
instance covering the risk of severe weather during a significant event. The
key differentiator between a good and bad insurer is how diligently and
accurately it can measure the risk involved in the underlying events.
Banking services, on the other hand, do not cover uncertain risk,
but they work in economic activities of a financial nature. Banking has
also evolved to be of many types, serving different purposes for different
commercial entities. However, the basic premise of banking remains as a
broker between lenders and borrowers. The spread between lending and
borrowing rates is also called a spread, and the bank manages to create
economic activities in the system.
Figure 1-3 depicts a fundamental framework of a bank or a banking
company.

Figure 1-3. Theoretical framework of banking

Lenders have access to capital, such as institutional members having


excess cash or a small retail customer who has some savings. The borrower
is short of capital, but they have some economic activities which can bring
returns on their investment. The bank comes into the play to solve this gap
in the financial system and creates an opportunity for the lender to earn
interest on deposits and lets the borrower get the required capital for an

4
Chapter 1 Processes in the Banking and Insurance Industries

interest rate. In the example in Figure 1-3, a lender deposits $10,000 into
the bank and receives 2% interest (i.e., $200), while the bank lends $10,000
to the borrower at 9% interest (i.e., gaining $900 in the transaction). The
spread of 7% (i.e., 900-200=700) is the income for bank, which it can use to
run operations and create new products.
Like insurance, banks have also evolved to provide various services for
different types of customers and entities. Figure 1-4 is basic classification
of types of banks. It is a not an exhaustive list of the types of banks and
banking services. However, they are the primary type of banks.

Figure 1-4. Common types of banks

Within the scope of this book, we will point out the typical process for
an end customer for accessing financial service. The customer for a retail
bank and life insurance company are the same, except for a few cases.
This makes it easier to illustrate how insurance company touchpoints with
customers are similar to those for banking customers. Once we set up the
generic nature of these touchpoints, we will move ahead with the chatbot
build process.

5
Chapter 1 Processes in the Banking and Insurance Industries

In retail banking, an end customer, usually an entity or individual,


deposits savings in a bank, and other entities or individuals borrow that
money for other purposes. Apart from that, banks also facilitate online
transactions, paying billers, transferring money to other entities, timed
deposits, and many other services for retail customers.

 Customer-Centric Approach in Financial


A
Services
Customer behavior and interactions have evolved to a personalized
approach over the last two decades. Competition and greater reliance on
technology for delivery of services are keys to this change in customer
behavior. The importance of a customer-centric approach in products and
services is far greater than ever before. The customer-centric approach
involves many direct and indirect interventions through multiple channels
(see Figure 1-5).

Design the Empower the


experience front line

Understanding Metrics that


your customer matter

Feedback
Customer-
focused
Customer drives
continuous
leadership centricity improvement

Figure 1-5. Customer centricity in financial services

6
Chapter 1 Processes in the Banking and Insurance Industries

The core element of customer centricity is a focused customer


leadership. If the leadership aligns the strategy to become a customer-­
centric organization, the whole outlook and communications become
customer-centric. Amazon has proved this and is now seen as the
benchmark for a customer-centric approach. Understanding the customer
and designing experiments to validate the hypothesis form the next steps
in a customer-centric approach. Once we set up a successful connection
with customers, we need to empower the front line, track essential metrics,
and keep the feedback cycle. These are some indicative steps to achieve a
customer-centric approach.
In financial services, primarily referring to retail products/services,
the interaction points are many, and all touchpoints are critical to being
customer focused. Banks and insurance companies deal with many
individuals customers daily via multiple channels.
Digital interventions are redefining the ways customer engagement
happens. There are some critical trends among customers accessing
banking and insurance services.

• More natural interactions: The user experience is of


the utmost importance. The customers are looking for
easier access to products, an appealing experience, and
easy action in a few clicks.

• More touchpoints and flexibility: The customer does


not want fixed 9 am to 5 pm branch visits or no access
on weekends. Customers want to be able to access and
buy products anytime and via multiple channels. It may
be a mobile app or a web app or phone banking, but
they want more flexibility in how they interact.

7
Chapter 1 Processes in the Banking and Insurance Industries

• Responsive service: Customers expect that the bank/


insurer knows about them and is responsive to their
needs. They want individual attention and appreciate
responsive customer service.
• Clear product information: With so many players
and products, customers want concise and relevant
information to be delivered to them. Additional details
they can seek with follow-ups. The customer does not
want a pile of information or to get confused.

• Great value from the products: The product features


are numerous and many times the customer is unaware
of how to make the best use of them. Customers expect
the bank/insurer to keep reminding them to draw the
best value out of a product and if possible, offer new
products that might be useful.

The growing digital presence of financial institutions also requires


multiple changes in the technology landscape. Traditional database systems
and applications are now becoming obsolete. Powerful endpoint computing
(i.e., smartphones), excellent internet connectivity (i.e., 4G/5G), and cloud
platforms are the magic trinity for a digital revolution in the financial sector.
In this book, we will explore the evolution and working of chatbots
in many endpoint interactions with customers. While conversational
agents have existed for a long time (remember the IVRS systems?), new
technology developments have made them driven by natural language,
offering customer-centric delivery of information. Chatbots are designed
to carry out specific and structured interactions; the complex service
interactions are still better served by an experienced customer service
representative. In coming chapters, we will cover different aspects of
building a chatbot for an insurance agent.

8
Chapter 1 Processes in the Banking and Insurance Industries

Benefits from Chatbots for a Business


According to the Grand View Research 2018 report,1 the global chatbot
market is expected to reach $1.25 billion by 2025, with a CAGR of 24.3%
(average annual growth rate). The chatbot market will grow significantly
across the financial services sectors, as they are among the largest
customer-facing businesses (in our context, the insurance business).
The immediate value creation for institutions happens by significantly
reducing the operating cost and bringing customer satisfaction.
Technically speaking, chatbots are a combination of technology,
artificial intelligence (AI), and business process designs.

• The technology provides the carrier for exchanging


messages between chatbots and customers, and
chatbots and internal systems, delivering information
in real time over mobile phone or the Web.

• The AI builds the core brain of the chatbot, which


understands the natural language decoded from
machine instructions. They also make decisions during
conversations.

• The most critical piece is the business process design,


which identifies the standard process to access
information, what information can be shared with
whom, and convenient ways to buy/sell/inquire about
current products.

While chatbots offer immense monetary value for the company


regarding reducing the cost of customer service and as a new channel for
revenue by sales of products and services, they also add immense value to
the customer’s experience.

1
www.grandviewresearch.com/press-release/global-chatbot-market

9
Chapter 1 Processes in the Banking and Insurance Industries

• 24x7 availability: Chatbots are available 24x7 through


phones or the Web. This gives the customer options of
when to interact with the services.

• Zero human touch experience: Chatbots allow


customers to have a zero human touch experience
for their basic requirements. This way of getting the
necessary information without going through the
manual route is entirely new.

• Simplicity: Chatbots simplify the process for customers


by decoding the process into clear steps. The
information delivered by chatbots is also very concise
and to the point, as per the customer query.

Daily, the ever-changing chatbot market is coming up with disruptive


ideas and delivering value across the spectrum.

Chatbots in the Insurance Industry


Gone are the days of waiting for the next available operator or taking the
effort to get the information. The customer-centric approach is one of the
critical differentiators for a company today. Chatbots are helping augment
customer engagement and brand presence, and they are proving to be very
useful in most industries including the insurance industry. The emergence
of mobile and social media has not only provided new channels of
communication between people but has also made people feel closer to
businesses. Companies are investing heavily in creating and maintaining a
robust digital presence and implementing new solutions so they can have
a better customer reach.

10
Discovering Diverse Content Through
Random Scribd Documents
are very valuable for some kinds of medical work. The application of
these currents is quite painless, and but for the strange-looking
apparatus the patient probably would not know that anything unusual
was taking place. To some extent the effect maybe said to be not
unlike that of a powerful tonic. Insomnia and other troubles due to
disordered nerves are quickly relieved, and even such obstinate
complaints as neuritis and crippling rheumatism have been cured.
The treatment is also of great value in certain forms of heart trouble.
By increasing the strength of the high frequency currents the tissues
actually may be destroyed, and this power is utilized for
exterminating malignant growths, such as lupus or cancer.
The heat produced by a current of electricity is made use of in
cauterizing. The burner is a loop of platinum wire, shaped according
to the purpose for which it is intended, and it is used at a dull red
heat. Very tiny electric incandescent lamps, fitted in long holders of
special shape, are largely used for examining the throat and the
various cavities of the body.
In the Finsen light treatment electric light is used for a very
different purpose. The spectrum of white light consists of the colours
red, orange, yellow, green, blue, indigo, and violet. Just beyond the
violet end of the spectrum are the ultra-violet rays. Ultra-violet light
consists of waves of light which are so short as to be quite invisible
to the eye, and Dr. N. R. Finsen, a Danish physician, made the
discovery that this light is capable of destroying bacterial germs. In
the application of ultra-violet rays to medical work, artificial light is
used in preference to sunlight; for though the latter contains ultra-
violet light, a great deal of it is absorbed in passing through the
atmosphere. Besides this, the sun sends out an immense amount of
radiant heat, and this has to be filtered out before the light can be
used. The usual source of light is the electric arc, and the arc is
much richer in ultra-violet rays if it is formed between electrodes of
iron, instead of the usual carbon rods. The light, which, in addition to
the ultra-violet rays, includes the blue, indigo, and violet parts of the
spectrum, is passed along a tube something like that of a telescope,
and is focused by means of a double lens, consisting of two separate
plates of quartz. Glass cannot be used for the lens, because it is
opaque to the extreme ultra-violet rays. A constant stream of water is
passed between the two plates forming the lens, and this filters out
the heat rays, which are not wanted. In some forms of Finsen lamp
an electric spark is used as the source of light, in place of the arc.
The most important application of the Finsen light is in the cure
of the terribly disfiguring disease called lupus. This is a form of
tuberculosis of the skin, and it is produced by the same deadly
microbe which, when it attacks the lungs, causes consumption. In all
but extreme cases the Finsen light effects a remarkable cure. A
number of applications are necessary, each of half an hour or more;
and after a time the disease begins to disappear, leaving soft, normal
skin. The exact action of the light rays is a disputed point. Finsen
himself believed that the ultra-violet rays attacked and exterminated
the microbe, but a later theory is that the rays stimulate the tissues to
such an extent that they are enabled to cure themselves. As early as
the year 1899 Finsen had employed his light treatment in 350 cases
of lupus, and out of this number only five cases were unsuccessful.
The ultra-violet rays are said to have a very beneficial effect
upon the teeth. Experiments carried out in Paris, using a mercury
vapour lamp as the source of light, show that discoloured teeth are
whitened and given a pearly lustre by these rays, at the same time
being sterilized so that they do not easily decay. The Röntgen rays
are used for the treatment of lupus, and more particularly for deeper
growths, such as tumours and cancers, for which the Finsen rays are
useless, owing to their lack of penetrating power. The action of these
two kinds of rays appears to be similar, but the X-rays are much the
more active of the two.
Electricity is often applied to the body through water, in the form
of the hydro-electric bath, and such baths are used in the treatment
of different kinds of paralysis. Electric currents are used too for
conveying drugs into the tissues of the body. This is done when it is
desired to concentrate the drug at some particular point, and it has
been found that chemicals can be forced into the tissues for a
considerable distance.
Dr. Nagelschmidt, a great authority on medical electricity, has
suggested the use of electricity for weight reducing. In the ordinary
way superfluous flesh is got rid of by a starvation diet coupled with
exercise, but in many cases excessively stout people are troubled
with heart disorders and asthma, so that it is almost impossible for
them to undergo the necessary muscular exertion. By the application
of electric currents, however, the beneficial effects of the gentle
exercise may be produced without any exertion on the part of the
patient, and an hour’s treatment is said to result in a decrease in
weight of from 200 to 800 grammes, or roughly 7 to 27 ounces.
CHAPTER XXVI
OZONE

The great difference between the atmospheric conditions before and


after a thunderstorm must have been noticed by everybody. Before
the storm the air feels lifeless. It does not satisfy us as we draw it
into our lungs, and however deeply we breathe, we feel that
something is lacking. After the storm the air is delightful to inhale,
and it refreshes us with every breath. This remarkable transformation
is brought about to a very large extent by ozone produced by the
lightning discharges.
As far back as 1785 it was noticed that oxygen became changed
in some way when an electric spark was passed through it, and that
it acquired a peculiar odour. No particular attention was paid to the
matter however until about 1840, when Schönbein, a famous
German chemist, and the discoverer of gun-cotton and collodion,
became interested in it. He gave this strange smelling substance the
name of “ozone,” and he published the results of his experiments
with it in a treatise entitled, “On the Generation of Ozone.”
Schönbein showed that ozone could be produced by various
methods, chemical as well as electrical. For instance, if a piece of
phosphorus is suspended in a jar of air containing also a little water,
in such a manner that it is partly in the water and partly out of it, the
air acquires the characteristic smell of ozone, and it is found to have
gained increased chemical energy, so that it is a more powerful
oxidizing agent. For a long time the exact chemical nature of ozone
could not be determined, mainly because it was impossible to obtain
the substance in quantities sufficiently large for extensive
experimental research, but also on account of its extremely energetic
properties, which made it very troublesome to examine. These
difficulties were so great that investigators were in doubt as to
whether ozone was an element or a compound of two or more
elements; but finally it was proved that it was simply oxygen in a
condensed or concentrated state.
Apparently ozone is formed by the contraction of oxygen, so that
from three volumes of oxygen two volumes of ozone are produced.
In other words, ozone has one and a half times the density of
oxygen. Ozone has far greater oxidizing power than oxygen itself; in
fact it is probably the most powerful of all oxidizing agents, and
herein lies its great value. It acts as nature’s disinfectant or sterilizer,
and plays a very important part in keeping the air pure, by destroying
injurious organic matter. Bacteria apparently have a most decided
objection to dying; at any rate they take an extraordinary amount of
killing. Ozone is more than a match for them however, and under its
influence they have a short life and probably not a merry one.
Ozone exists naturally in the atmosphere in the open country,
and more especially at the seaside. It is produced by lightning
discharges, by silent electrical discharges in the atmosphere, by the
evaporation of water, particularly salt water, by the action of sunlight,
and also by the action of certain vegetable products upon the air.
The quantity of ozone in the air is always small, and even pure
country or sea air contains only one volume of ozone in about
700,000 volumes of air. No ozone can be detected in the air of large
towns, or over unhealthy swamps or marshes. The exhilarating
effects of country and sea air, and the depressing effects of town air,
are due to a very large extent to the presence or absence of ozone.
A great proportion of our common ailments are caused directly
or indirectly by a sort of slow poisoning, produced by the impure air
in which we live and work. It is popularly supposed that the tainting
of the air of rooms in which large numbers of people are crowded
together is due to an excessive amount of carbonic acid gas. This is
a mistake, for besides being tasteless and odourless, carbonic acid
gas is practically harmless, except in quantities far greater than ever
exist even in the worst ventilated rooms. The real source of the
tainted air is the great amount of animal matter thrown off as waste
products from the skin and lungs, and this tainting is further
intensified by the absence of motion in the air. Even in an over-
crowded room the conditions are made much more bearable if the
air is kept in motion, and in a close room ladies obtain relief by the
use of their fans. What we require, therefore, in order to maintain an
agreeable atmosphere under all conditions, is some means of
keeping the air in gentle motion, and at the same time destroying as
much as possible of the animal matter contained in it. Perhaps the
most interesting and at the same time the most scientific method of
doing this is by ozone ventilation.
In the well-known “Ozonair” system of ventilation, ozone is
generated by high-tension current. Low-tension current is taken from
the public mains or from accumulators, and raised to a very high
voltage by passing it through a step-up transformer. The secondary
terminals of the transformer are connected to a special form of
condenser, consisting of layers of fine metal gauze separated by an
insulating substance called “micanite.” The high tension between the
gauze layers produces a silent electrical discharge or glow. A small
fan worked by an electric motor draws the air over the condenser
plates, and so a certain proportion of the oxygen is ozonized, and is
driven out of the other side of the apparatus into the room. The
amount of ozone generated and the amount of air drawn over the
condenser are regulated carefully, so that the ozonized air contains
rather less than one volume of ozone in one million volumes of air,
experiment having shown that this is the most suitable strength for
breathing. Ozone diluted to this degree has a slight odour which is
very refreshing, and besides diminishing the number of organic
germs in the air, it neutralizes unpleasant smells, such as arise from
cooking or stale tobacco smoke. Ozone ventilation is now employed
successfully in many hotels, steamships, theatres and other places
of entertainment, municipal and public buildings, and factories.
By permission of] [Ozonair, Ltd.

Fig. 42.—Diagram of Ozonizing Plant, Central London Tube Electric Railway.

One of the most interesting examples of ozone ventilation is that


of the Central London tube electric railway. The installation consists
of a separate ozonizing plant at every station, except Shepherd’s
Bush, which is close to the open end of the tunnel. Fig. 42 is a
diagram of the general arrangement of one of these plants, and it
shows how the air is purified, ozonized, and sent into the tunnel. The
generating plant is seen at the top left-hand corner of the figure. Air
is drawn in as shown by the arrows, and by passing through the filter
screen F it is freed from dirt and smuts, and from most of the
injurious gases which always are present in town air. The filter
screen is kept moist by a continual flow of water from jets above it,
the waste water falling into the trough W. The ozone generator is
shown at O. Continuous current at about 500 volts, from the power
station, is passed through a rotary converter, which turns it into
alternating current at 380 volts. This current goes to the transformer
T, from which it emerges at a pressure of 5000 volts, and is supplied
to the ozone generator. From the generator the strongly ozonized air
is taken by way of the ozone pipe P, to the mixing chamber of the
large ventilating fan M, where it is mixed with the main air current
and then blown down the main air trunk. From this trunk it is
distributed to various conduits, and delivered at the air outlets
marked A. Altogether the various plants pump more than eighty
million cubic feet of ozonized air into the tunnels every working day.
In many industries pure air is very essential, especially during
certain processes. This is the case in brewing, in cold storage, and in
the manufacture and canning of food products; and in these
industries ozone is employed as an air purifier, with excellent results.
Other industries cannot be carried on without the production of very
unpleasant fumes and smells, which are a nuisance to the workers
and often also to the people living round about; and here again
ozone is used to destroy and remove the offending odours. It is
employed also in the purification of sewage and polluted water; in
bleaching delicate fabrics; in drying and seasoning timber; in
maturing tobacco, wines and spirits, and in many other processes
too numerous to mention.
CHAPTER XXVII
ELECTRIC IGNITION

The petrol motor, which to-day is busily engaged all over the world in
driving thousands upon thousands of self-propelled vehicles or
automobiles, belongs to the important class of internal-combustion
engines. Combustion means the operation of burning, and an
internal-combustion engine is one in which the motive power is
produced by the combustion of a highly explosive mixture of gases.
In the ordinary petrol motor this mixture consists of petrol and air,
and it is made by means of a device called a “carburetter.” By
suction, a quantity of petrol is forced through a jet with a very fine
nozzle, so that it is reduced to an extremely fine spray. A certain
proportion of air is allowed to enter, and the mixture passes into the
cylinder. Here it is compressed by the rising piston so that it
becomes more and more heated, and at the right point it is ignited.
Combustion takes place with such rapidity that it takes the form of an
explosion, and the energy produced in this way drives forward the
piston, which turns the crank-shaft and so communicates motion to
the driving-wheels.
The part played by electricity in this process is confined to the
ignition of the compressed charge of petrol and air. This may be
done in two ways; by means of an accumulator and a small induction
coil, or by means of a dynamo driven by the engine. At one time the
first method was employed exclusively, but to-day it is used as a rule
only for starting the car engine, the second or magneto method
being used when the engine has started up.
In accumulator ignition the low-tension current from the
accumulator passes through an induction coil, and is thus
transformed to high-tension current. This current goes through a
sparking plug, which is fixed in the head of the cylinder. The sparking
plug contains two metal points separated by a tiny air gap of from
about 1/30 to 1/50 inch. This gap provides the only possible path for
the high-tension current, so that the latter leaps across it in the form
of a spark. The spark is arranged to take place when the piston is at
the top of its stroke, that is, when the explosive mixture is at its
maximum compression, and the heat of the spark ignites the
mixture, the resulting explosion forcing down the piston with great
power. In practice it is found better as a rule to cause the spark to
pass very slightly before the piston reaches the extreme limit of its
stroke. The reason of this is that the process of igniting and
exploding the charge occupies an appreciable, though of course
exceedingly small amount of time. Immediately on reaching the top
of its stroke the piston begins to descend again, and if the spark and
the top of the stroke coincide in time the explosion does not take
place until the piston has moved some little distance down the
cylinder, and so a certain amount of power is lost. By having the
spark a little in advance of the piston, the explosion occurs at the
instant when the piston begins to return, and so the full force of the
explosion is utilized.
In magneto ignition the current is supplied by a small dynamo.
This generates alternating current, and it is driven by the car engine.
The current is at first at low pressure, and it has to be transformed to
high-tension current in order to produce the spark. There are two
methods of effecting this transformation. One is by turning the
armature of the dynamo into a sort of induction coil, by giving it two
separate windings, primary and secondary; so that the dynamo
delivers high-tension current directly. The other method is to send
the low-tension current through one or more transformer coils, just
as in accumulator ignition. Accumulators can give current only for a
certain limited period, and they are liable consequently to run down
at inconvenient times and places. They also have the defect of
undergoing a slight leakage of current even when they are not in
use. Magneto ignition has neither of these drawbacks, and on
account of its superior reliability it has come into universal use.
In the working of quarries and mines of various kinds, and also in
large engineering undertakings, blasting plays a prominent part.
Under all conditions blasting is a more or less dangerous business,
and it has been the cause of very many serious accidents to the men
engaged in carrying it out. Many of these accidents are due to the
carelessness resulting from long familiarity with the work, but apart
from this the danger lies principally in uncertainty in exploding the
charge. Sometimes the explosion occurs sooner than expected, so
that the men have not time to get away to a safe distance. Still more
deadly is the delayed explosion. After making the necessary
arrangements the men retire out of danger, and await the explosion.
This does not take place at the expected time, and after waiting a
little longer the men conclude that the ignition has failed, and return
to put matters right. Then the explosion takes place, and the men are
killed instantly or at least seriously injured. Although it is impossible
to avoid altogether dangers of this nature, the risk can be reduced to
the minimum by igniting the explosives by electricity.
Electrical shot firing may be carried out in different ways,
according to circumstances. The current is supplied either by a
dynamo or by a battery, and the firing is controlled from a
switchboard placed at a safe distance from the point at which the
charge is to be exploded, the connexions being made by long
insulated wires. The actual ignition is effected by a hot spark, as in
automobile ignition, or by an electric detonator or fuse. Explosives
such as dynamite cannot be fired by simple ignition, but require to be
detonated. This is effected by a detonator consisting of a small cup-
shaped tube, made of ebonite or other similar material. The wires
conveying the current project into this tube, and are connected by a
short piece of very fine wire having a high resistance. Round this
wire is packed a small quantity of gun-cotton, and beyond, in a sort
of continuation of the tube, is placed an extremely explosive
substance called “fulminate of mercury,” the whole arrangement
being surrounded by the dynamite to be fired. When all is ready the
man at the switchboard manipulates a switch, and the current
passes to the detonator and forces its way through the resistance of
the thin connecting wire. This wire becomes sufficiently hot to ignite
the gun-cotton, and so explode the fulminate of mercury. The
explosion is so violent that the dynamite charge is detonated, and
the required blasting carried out. Gunpowder and similar explosives
do not need to be detonated, and so a simple fuse is used. Electric
fuses are much the same as detonators, except that the tube
contains gunpowder instead of fulminate of mercury, this powder
being ignited through an electrically heated wire in the same way.
These electrical methods do away with the uncertainty of the slow-
burning fuses formerly employed, which never could be relied upon
with confidence.
Enormous quantities of explosives are now used in blasting on a
large scale, where many tons of hard rock have to be removed. One
of the most striking blasting feats was the blowing up of Flood Island,
better known as Hell Gate. This was a rocky islet, about 9 acres in
extent, situated in the East River, New York. It was a continual
menace to shipping, and after many fine vessels had been wrecked
upon it the authorities decided that it should be removed. The rock
was bored and drilled in all directions, the work taking more than a
year to complete; and over 126 tons of explosives were filled into the
borings. The exploding was carried out by electricity, and the mighty
force generated shattered nearly 300,000 cubic yards of solid rock.
CHAPTER XXVIII
ELECTRO-CULTURE

About thirty years ago a Swedish scientist, Professor Lemström,


travelled extensively in the Polar regions, and he was greatly struck
by the development of the Polar vegetation. In spite of the lack of
good soil, heat, and light, he observed that this vegetation came to
maturity quicker than that of regions having much more favourable
climates, and that the colours of the flowers were remarkably fresh
and clear, and their perfumes exceptionally strong. This was a
surprising state of things, and Lemström naturally sought a clue to
the mystery. He knew that peculiar electrical conditions prevailed in
these high latitudes, as was shown by the wonderful displays of the
Aurora Borealis, and he came to the conclusion that the
development of the vegetation was due to small currents of
electricity continually passing backwards and forwards between the
atmosphere and the Earth. On his return to civilization Lemström at
once began a series of experiments to determine the effect of
electricity upon the growth of plants, and he succeeded in proving
beyond all doubt that plants grown under electrical influence
flourished more abundantly than those grown in the ordinary way.
Lemström’s experiments have been continued by other investigators,
and striking and conclusive results have been obtained.
The air surrounding the Earth is always charged to some extent
with electricity, which in fine weather is usually positive, but changes
to negative on the approach of wet weather. This electricity is always
leaking away to the earth more or less rapidly, and on its way it
passes through the tissues of the vegetation. An exceedingly slow
but constant discharge therefore is probably taking place in the
tissues of all plants. Experiments appear to indicate that the upper
part of a growing plant is negative, and the lower part positive, and at
any rate it is certain that the leaves of a plant give off negative
electricity. In dull weather this discharge is at its minimum, but under
the influence of bright sunshine it goes on with full vigour. It is not
known exactly how this discharge affects the plant, but apparently it
assists its development in some way, and there is no doubt that
when the discharge is at its maximum the flow of sap is most
vigorous. Possibly the electricity helps the plant to assimilate its
food, by making this more readily soluble.
This being so, a plant requires a regular daily supply of
uninterrupted sunshine in order to arrive at its highest possible state
of maturity. In our notoriously variable climate there are many days
with only short intermittent periods of bright sunshine, and many
other days without any sunshine at all. Now if, on these dull days, we
can perform at least a part of the work of the sunshine, and
strengthen to some extent the minute currents passing through the
tissues of a plant, the development of this plant should be
accelerated, and this is found to be the case. Under electrical
influence plants not only arrive at maturity quicker, but also in most
cases their yield is larger and of finer quality.
Lemström used a large influence machine as the source of
electricity in his experiments in electro-culture. Such machines are
very suitable for experimental work on a small scale, and much
valuable work has been done with them by Professor Priestly and
others; but they have the great drawback of being uncertain in
working. They are quite satisfactory so long as the atmosphere
remains dry, but in damp weather they are often very erratic, and
may require hours of patient labour to coax them to start. For this
reason an induction coil is more suitable for continuous work on an
extensive scale.
The most satisfactory apparatus for electro-culture is that used in
the Lodge-Newman method, designed by Sir Oliver Lodge and his
son, working in conjunction with Mr. Newman. This consists of a
large induction coil supplied with current from a dynamo driven by a
small engine, or from the public mains if available. This coil is fitted
with a spark gap, and the high-tension current goes through four or
five vacuum valve globes, the invention of Sir Oliver Lodge, which
permit the current to pass through them in one direction only. This is
necessary because, as we saw in Chapter VIII., two opposite
currents are induced in the secondary winding of the coil, one at the
make and the other at the break of the primary circuit. Although the
condenser fitted in the base of the coil suppresses to a great extent
the current induced on making the circuit, still the current from the
coil is not quite uni-directional, but it is made so by the vacuum
rectifying valves. These are arranged to pass only the positive
current, and this current is led to overhead wires out in the field to be
electrified. Lemström used wires at a height of 18 inches from the
ground, but these were very much in the way, and in the Lodge-
Newman system the main wires are carried on large porcelain
insulators fixed at the top of poles at a height of about 15 feet. This
arrangement allows carting and all other agricultural operations to be
carried on as usual. The poles are set round the field, about one to
the acre, and from these main wires finer ones are carried across the
field. These wires are placed about 30 feet apart, so that the whole
field is covered by a network of wires. The electricity supplied to the
wires is at a pressure of about 100,000 volts, and this is constantly
being discharged into the air above the plants. It then passes
through the plants, and so reaches the earth. This system may be
applied also to plants growing in greenhouses, but owing to the
confined space, and to the amount of metal about, in the shape of
hot-water pipes and wires for supporting plants such as vines and
cucumbers, it is difficult to make satisfactory arrangements to
produce the discharge.
The results obtained with this apparatus at Evesham, in
Gloucestershire, by Mr. Newman, have been most striking. With
wheat, increases of from 20 per cent. to nearly 40 per cent. have
been obtained, and the electrified wheat is of better quality than
unelectrified wheat grown at the same place, and, apart from
electrification, under exactly the same conditions. In some instances
the electrified wheat was as much as 8 inches higher than the
unelectrified wheat. Mr. Newman believes that by electrification land
yielding normally from 30 to 40 bushels of wheat per acre can be
made to yield 50 or even 60 bushels per acre. With cucumbers
under glass increases of 17 per cent. have been obtained, and in the
case of strawberries, increases of 36 per cent. with old plants, and
80 per cent. with one-year-old plants. In almost every case
electrification has produced a marked increase in the crop, and in
the few cases where there has been a decrease the crops were
ready earlier than the normal. For instance, in one experiment with
broad beans a decrease of 15 per cent. resulted, but the beans were
ready for picking five days earlier. In another case a decrease of 11½
per cent. occurred with strawberries, but the fruit was ready for
picking some days before the unelectrified fruit, and also was much
sweeter. In some of the experiments resulting in a decrease in the
yield it is probable that the electrification was overdone, so that the
plants were over-stimulated. It seems likely that the best results will
be obtained only by adjusting the intensity and the duration of the
electrification in accordance with the atmospheric conditions, and
also with the nature of the crop, for there is no doubt that plants vary
considerably in their electrical requirements. A great deal more
experiment is required however to enable this to be done with
anything like certainty.
Unlike the farmer, the market gardener has to produce one crop
after another throughout the year. To make up for the absence of
sufficient sunshine he has to resort to “forcing” in many cases, but
unfortunately this process, besides being costly, generally results in
the production of a crop of inferior quality. Evidently the work of the
market gardener would be greatly facilitated by some artificial
substitute for sunshine, to keep his plants growing properly in dull
weather. In 1880, Sir William Siemens, knowing that the composition
of the light of the electric arc was closely similar to that of sunlight,
commenced experiments with an arc lamp in a large greenhouse.
His idea was to add to the effects of the solar light by using the arc
lamp throughout the night. His first efforts were unsuccessful, and he
discovered that this was due to the use of the naked light, which
apparently contained rays too powerful for the plants. He then
passed the light through glass, which filtered out the more powerful
rays, and this arrangement was most successful, the plants
responding readily to the artificial light. More scientifically planned
experiments were carried out at the London Royal Botanic Gardens
in 1907, by Mr. B. H. Thwaite, and these showed that by using the
arc lamp for about five hours every night, a great difference between
the treated plants and other similar plants grown normally could be
produced in less than a month. Other experiments made in the
United States with the arc lamp, and also with ordinary electric
incandescent lamps, gave similar results, and it was noticed that the
improvement was specially marked with cress, lettuce, spinach, and
other plants of this nature.
In 1910, Miss E. C. Dudgeon, of Dumfries, commenced a series
of experiments with the Cooper-Hewitt mercury vapour lamp. Two
greenhouses were employed, one of which was fitted with this lamp.
Seeds of various plants were sown in small pots, one pot of each
kind being placed in each house. The temperature and other
conditions were kept as nearly alike as possible in both houses, and
in the experimental house the lamp was kept going for about five
hours every night. In every case the seeds in the experimental house
germinated several days before those in the other house, and the
resulting plants were healthy and robust. Later experiments carried
out by Miss Dudgeon with plants were equally successful.
From these experiments it appears that the electric arc, and still
more the mercury vapour lamp, are likely to prove of great value to
the market gardener. As compared with the arc lamp, the mercury
vapour lamp has the great advantage of requiring scarcely any
attention, and also it uses less current. Unlike the products of
ordinary forcing by heat, the plants grown under the influence of the
mercury vapour light are quite sturdy, so that they can be planted out
with scarcely any “hardening off.” The crop yields too are larger, and
of better quality. The wonderful effects produced by the Cooper-
Hewitt lamp are certainly not due to heat, for this lamp emits few
heat rays. The results may be due partly to longer hours worked by
the plants, but this does not explain the greater accumulation of
chlorophyll and stronger development of fibre.
Most of us are familiar with the yarn about the poultry keeper
who fitted all his nests with trap-doors, so that when a hen laid an
egg, the trap-door opened under the weight and allowed the egg to
fall through into a box lined with hay. The hen then looked round,
and finding no egg, at once set to work to lay another. This in turn
dropped, another egg was laid, and so on. It is slightly doubtful
whether the modern hen could be swindled in this bare-faced
manner, but it is certain that she can be deluded into working
overtime. The scheme is absurdly simple. Electric lamps are fitted in
the fowl-house, and at sunset the light is switched on. The
unsuspecting hens, who are just thinking about retiring for the night,
come to the conclusion that the day is not yet over, and so they
continue to lay. This is not a yarn, but solid fact, and the increase in
the egg yield obtained in this way by different poultry keepers ranges
from 10 per cent. upwards. Indeed, one poultry expert claims to have
obtained an increase of about 40 per cent.
The ease with which a uniform temperature can be maintained
by electric heating has been utilized in incubator hatching of
chickens. By means of a specially designed electric radiator the
incubator is kept at the right temperature throughout the hatching
period. When the chickens emerge from the eggs they are
transferred to another contrivance called a “brooder,” which also is
electrically heated, the heat being decreased gradually day by day
until the chicks are sturdy enough to do without it. Even at this stage
however the chickens do not always escape from the clutches of
electricity. Some rearers have adopted the electric light swindle for
the youngsters, switching on the light after the chickens have had a
fair amount of slumber, so that they start feeding again. In this way
the chickens are persuaded to consume more food in the twenty-four
hours, and the resulting gain in weight is said to be considerable.
More interesting than this scheme is the method of rearing chickens
under the influence of an electric discharge from wires supplied with
high-tension current. Comparative tests show that electrified
chickens have a smaller mortality and a much greater rate of growth
than chickens brought up in the ordinary way. It even is said that the
electrified chickens have more kindly dispositions than their
unelectrified relatives!
Possibly the high-tension discharge may turn out to be as
beneficial to animals as it has been proved to be for plants, but so far
there is little reliable evidence on this point, owing to lack of
experimenters. A test carried out in the United States with a flock of
sheep is worth mention. The flock was divided into two parts, one-
half being placed in a field under ordinary conditions, and the other
in a field having a system of overhead discharge wires, similar to
those used in the Lodge-Newman system. The final result was that
the electrified sheep produced more than twice as many lambs as
the unelectrified sheep, and also a much greater weight of wool. If
further experiments confirm this result, the British farmer will do well
to consider the advisability of electrifying his live-stock.
CHAPTER XXIX
SOME RECENT APPLICATIONS OF
ELECTRICITY—AN ELECTRIC PIPE LOCATOR

One of the great advantages of living in a town is the abundant


supply of gas and water. These necessary substances are conveyed
to us along underground pipes, and a large town has miles upon
miles of such pipes, extending in all directions and forming a most
complex network. Gas and water companies keep a record of these
pipes, with the object of finding any pipe quickly when the necessity
arises; but in spite of such records pipes are often lost, especially
where the whole face of the neighbourhood has changed since the
pipes were laid. The finding of a lost pipe by digging is a very
troublesome process, and even when the pipe is known to be close
at hand, it is quite surprising how many attempts are frequently
necessary before it can be located, and its course traced. As may be
imagined, this is an expensive business, and often it has been found
cheaper to lay a new length of pipe than to find the old one. There is
now an electrical method by which pipe locating is made
comparatively simple, and unless it is very exceptionally deep down,
a pipe never need be abandoned on account of difficulty in tracing it.
The mechanism of an electric pipe locator is not at all
complicated, consisting only of an induction coil with battery, and a
telephone receiver connected to a coil of a large number of turns of
thin copper wire. If a certain section of a pipe is lost, and has to be
located, operations are commenced from some fitting known to be
connected with it, and from some other fitting which may or may not
be connected with the pipe, but which is believed to be so
connected. The induction coil is set working, and its secondary
terminals are connected one to each of these fittings. If the second
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade

Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.

Let us accompany you on the journey of exploring knowledge and


personal growth!

textbookfull.com

You might also like