Natural Language Processing in The Real World Text Processing Analytics and Classification 1st Edition Jyotika Singh Download
Natural Language Processing in The Real World Text Processing Analytics and Classification 1st Edition Jyotika Singh Download
https://ebookbell.com/product/natural-language-processing-in-the-
real-world-text-processing-analytics-and-classification-1st-
edition-jyotika-singh-50165494
https://ebookbell.com/product/natural-language-processing-in-the-real-
world-text-processing-analytics-and-classification-jyotika-
singh-58954076
https://ebookbell.com/product/applied-natural-language-processing-in-
the-enterprise-teaching-machines-to-read-write-and-understand-1st-
edition-ankur-a-patel-33946944
https://ebookbell.com/product/the-application-of-natural-language-
processing-to-open-source-intelligence-for-ontology-development-in-
the-advanced-persistent-threat-domain-corey-t-holzer-10517910
https://ebookbell.com/product/a-free-press-if-you-can-keep-it-what-
natural-language-processing-reveals-about-freedom-of-the-press-in-
hong-kong-giovanna-maria-dora-dore-50166064
Natural Language Processing As A Foundation Of The Semantic Web
Foundations And Trends In Web Science Yorick Wilks
https://ebookbell.com/product/natural-language-processing-as-a-
foundation-of-the-semantic-web-foundations-and-trends-in-web-science-
yorick-wilks-1908784
https://ebookbell.com/product/supertagging-using-complex-lexical-
descriptions-in-natural-language-processing-srinivas-
bangalore-48955428
https://ebookbell.com/product/natural-language-processing-in-action-
second-edition-meap-v08-2-chapters-1-to-8-of-12-hobson-lane-49479024
Natural Language Processing
in the Real World
Natural Language Processing in the Real World is a practical guide for applying data science
and machine learning to build Natural Language Processing (NLP) solutions. Where traditional,
academic-taught NLP is often accompanied by a data source or dataset to aid solution building,
this book is situated in the real world where there may not be an existing rich dataset.
This book covers the basic concepts behind NLP and text processing and discusses the appli-
cations across 15 industry verticals. From data sources and extraction to transformation and
modeling, and classic Machine Learning to Deep Learning and Transformers, several popular
applications of NLP are discussed and implemented.
This book provides a hands-on and holistic guide for anyone looking to build NLP solutions,
from students of Computer/Data Science to those working as Data Science professionals.
CHAPMAN & HALL/CRC DATA SCIENCE SERIES
Reflecting the interdisciplinary nature of the field, this book series brings together researchers,
practitioners, and instructors from statistics, computer science, machine learning, and analyt-
ics. The series will publish cutting-edge research, industry applications, and textbooks in data
science.
The inclusion of concrete examples, applications, and methods is highly encouraged. The scope
of the series includes titles in the areas of machine learning, pattern recognition, predictive ana-
lytics, business analytics, Big Data, visualization, programming, software, learning analytics,
data wrangling, interactive graphics, and reproducible research.
Published Titles
Urban Informatics
Using Big Data to Understand and Serve Communities
Daniel T. O’Brien
Introduction to Environmental Data Science
Jerry Douglas Davis
Hands-On Data Science for Librarians
Sarah Lin and Dorris Scott
Geographic Data Science with R
Visualizing and Analyzing Environmental Change
Michael C. Wimberly
Practitioner’s Guide to Data Science
Hui Lin and Ming Li
Data Science and Analytics Strategy
An Emergent Design Approach
Kailash Awati and Alexander Scriven
Telling Stories with Data
With Applications in R
Rohan Alexander
Data Science for Sensory and Consumer Scientists
Thierry Worch, Julien Delarue, Vanessa Rios De Souza and John Ennis
Big Data Analytics
A Guide to Data Science Practitioners Making the Transition to Big Data
Ulrich Matter
Data Science in Practice
Tom Alby
Natural Language Processing in the Real World
Text Processing, Analytics, and Classification
Jyotika Singh
Jyotika Singh
First edition published 2023
by CRC Press
6000 Broken Sound Parkway NW, Suite 300, Boca Raton, FL 33487-2742
and by CRC Press
4 Park Square, Milton Park, Abingdon, Oxon, OX14 4RN
CRC Press is an imprint of Taylor & Francis Group, LLC
© 2023 Jyotika Singh
Reasonable efforts have been made to publish reliable data and information, but the author and publisher cannot
assume responsibility for the validity of all materials or the consequences of their use. The authors and publishers
have attempted to trace the copyright holders of all material reproduced in this publication and apologize to copyright
holders if permission to publish in this form has not been obtained. If any copyright material has not been acknowl-
edged please write and let us know so we may rectify in any future reprint.
Except as permitted under U.S. Copyright Law, no part of this book may be reprinted, reproduced, transmitted, or
utilized in any form by any electronic, mechanical, or other means, now known or hereafter invented, including pho-
tocopying, microfilming, and recording, or in any information storage or retrieval system, without written permission
from the publishers.
For permission to photocopy or use material electronically from this work, access www.copyright.com or contact the
Copyright Clearance Center, Inc. (CCC), 222 Rosewood Drive, Danvers, MA 01923, 978-750-8400. For works that are
not available on CCC please contact [email protected]
Trademark notice: Product or corporate names may be trademarks or registered trademarks and are used only for
identification and explanation without intent to infringe.
List of Figures xv
Preface xxiii
Acknowledgments xxix
vii
viii ■ Contents
1.5 SETUP 26
1.6 TOOLS 27
3.2 VISUALIZATION 85
3.3 DATA AUGMENTATION 87
3.4 DATA TRANSFORMATION 89
3.4.1 Encoding 90
3.4.2 Frequency-based vectorizers 92
3.4.3 Co-occurrence matrix 94
3.4.4 Word embeddings 95
Bibliography 337
Index 357
List of Figures
xv
xvi ■ List of Figures
8.1 Books whose descriptions were used to build our LDA model. Source
doc1 [23], doc2 [82], doc3 [90], doc4 [76]. 232
8.2 The book used to test our LDA model. Source [188]. 234
8.3 The book description to test our LDA model. 234
8.4 Confusion matrix for spam vs ham classification model using Multi-
nomial Naive Bayes classifier. 245
8.5 Training and validation accuracy and loss for ham/spam CNN model. 252
8.6 Curating labeled data using clustering experiments. 254
8.7 Where data science modeling fits within a business’s goal and its
driving factors. 262
9.9 nlu.yml intents related to greeting, user agreement, and user disagree-
ment. 278
9.10 nlu.yml intents related to pizza ordering. 279
9.11 RASA pizza-ordering chatbot - sample conversations. 282
9.12 RASA chatbot conversation with typos. 282
9.13 RASA chatbot bad conversation samples. 282
10.1 Performing comment review analysis from a company KPI perspective. 288
10.2 Data science tasks breakdown for customer review analysis project. 289
10.3 Data science tasks breakdown for customer review analysis project
(sentiment analysis). 292
10.4 Word cloud for positive comments. 293
10.5 Word cloud for negative comments. 293
10.6 Word cloud for positive comments (nouns only). 295
10.7 Word cloud for negative comments (nouns only). 295
10.8 Data science tasks breakdown for customer review analysis project
(identification of topics and themes). 296
10.9 Room-word cloud. 299
10.10 Location-word cloud. 299
10.11 Service and staff-word cloud. 300
10.12 Data science tasks breakdown for customer review analysis project
(curating training data). 301
10.13 Confusion matrix for hotel review classification model. 302
10.14 Data science tasks breakdown for customer review analysis project
(training a classification model). 302
10.15 Data science tasks breakdown for customer review analysis project
(model evaluation). 304
10.16 Data science tasks breakdown for customer review analysis project
(pipeline). 305
10.17 Data science tasks breakdown for customer review analysis project
(curating training data). 307
11.7 Next word prediction BiLSTM model accuracy and loss at 20 and 40
epochs. 323
11.8 Next word prediction output from the BiLSTM model with the pre-
dicted words in bold. 324
xxi
Preface
In the modern day, data digitization has scaled and there are means to store every
interaction happening across the world. Text data is heavily generated across the
globe. Some common sources of text data include social media data, consumer inter-
action, reviews, articles, documents, emails, and others. More and more businesses
have started leveraging machine learning, and a large majority have some type of text
data available to them. Over the last decade, several businesses have explored and
been successful in getting intelligence out of text data generated by them or publicly
available from the web. While many are on that path, many want to get on that path
and exploit the potential of building data-driven offerings. Thus, knowing about NLP
and how you can use it is prime in today’s time.
Natural language processing (NLP) is a hot topic with a lot of applications and
an increasing amount of research across the globe. NLP refers to a machine’s process
to understand language. With the immense amount of text data generated today,
there is an increase in the scope for leveraging NLP to build intelligent solutions.
Google Trends suggests a 112% increase in searches on the topic of natural language
processing in the past seven years. Many businesses today offer products and ser-
vices powered by NLP. Common examples include Amazon Alexa, Gmail sentence
auto-completion, and Google Translate for language translation. With the increasing
demand for NLP-based products and services, there is a strong need for a workforce
that is able to understand and implement NLP solutions.
I started working in the industry as a Data Scientist after finishing grad school.
At the time, I didn’t have any guidance in my field at the company I was working at.
I was faced with tasks that seemed impossible to solve given my grad school back-
ground. In an educational setting, you are working on defined problems. In the real
world, you need to define these problems yourself given the knowledge of the business
objective. In an educational setting, you have data available. You’re either working on
publicly available datasets or one available at your educational institution. In the real
world, you may not have labeled data, you may not have enough data, and you may
not even have any data at all. Having faced these obstacles, I learned several lessons
that over time helped me to excel at my work. I would often share my learnings
and findings with the Python and Data Science community in the form of talks and
presentations at conferences across the globe. After accumulating close to a decade
of experience in working with language data and building NLP solutions in the real
world, I wrote this book.
xxiii
xxiv Preface
open-source tools and the Python programming language, readers will gain hands-on
experience and be able to apply the solutions in your work. Readers will be able to
learn the concepts and refer back to the book any time they need to brush up on
their understanding of NLP usage and applications across industry verticals.
Assuming the reader has a basic understanding of machine learning and program-
ming in Python, this book focuses on practical aspects of NLP, covering the basic
concepts from a practical perspective, rather than diving into detailed architectures.
As such, this book is set to be a valuable resource for anyone looking to develop
practical NLP solutions.
The solutions we build involve using classic machine learning approaches, deep
learning models, and transformers, covering everything from the basics to the state-
of-the-art solutions that are used by companies for building real-world applications.
The reader will:
• Gain knowledge about necessary concepts and methods to build NLP solutions.
• Curate, extract, process, transform, and model text data for various use cases.
• Learn about how several industries solve NLP problems and apply the learnings
to new and unseen NLP tasks.
• Get practical tips throughout the book around different scenarios with data,
processing, and modeling.
Author Bio
For nearly a decade, Jyotika has focused her career on Machine Learning (ML) and
Natural Language Processing (NLP) across various industry verticals, using practical
real-world datasets to develop innovative solutions. Her work has resulted in multiple
patents that have been utilized by well-known tech companies for their advancements
in NLP and ML. Jyotika’s expertise in the subject has made her a highly sought-after
public speaker, having presented at more than 20 conferences and events around the
world.
Her work on building proprietary NLP solutions for ICX Media, a previous em-
ployer, resulted in unique business propositions that played a pivotal role in secur-
ing multi-million dollar business and the successful acquisition by Salient Global.
Jyotika currently holds the position of Director of Data Science at Placemakr, a
leading technology-enabled hospitality company in the USA. Moreover, Jyotika is
the creator and maintainer of open-source Python libraries, such as pyAudioProcess-
ing, that have been downloaded over 24,000 times.
Jyotika’s commitment to promoting diversity in STEM is evident through her ac-
tive support of women and underrepresented communities. She provides early-career
mentorship to build a diverse talent pool and volunteers as a mentor at Data Science
Nigeria, where she engages in mentorship sessions with young Nigerians aspiring for
a career in data and technology. Furthermore, Jyotika serves as a mentor at Women
Impact Tech, US, supporting women in technology, product, and engineering.
Jyotika has received numerous awards for her contributions to the field, including
being recognized as one of the top 50 Women of Impact in 2023 and being named
one of the top 100 most Influential people in Data 2022 by DataIQ. Additionally,
Jyotika has been honored with the Data Science Leadership award in 2022, Leadership
Excellence in Technology award in 2021, and other accolades.
xxvii
Acknowledgments
Writing this book would not have been possible without the plethora of excellent
resources, such as papers, articles, open-source code, conferences, and online tools.
I am thankful to the Python, machine learning, and natural language processing
community for their efforts and contributions toward knowledge sharing. Along my
journey, I have asked a lot of individuals I do not personally know a lot of questions
about this topic and the book publishing process. Thank you all for selflessly taking
the time to answer my questions. Thank you to all the companies and publishers that
have permitted me to use their figures to aid the material of my book. I am grateful
for your contributions to this field and your prompt responses.
I am grateful to everyone who has reviewed sections and chapters of this book.
Thank you Shubham Khandelwal, Manvir Singh Walia, Neeru, Jed Divina, Rebecca
Bilbro, Steven McCord, Neha Tiwari, Sumanik Singh, Joey McCord, Daniel Jolicoeur,
Rekha, and Devesh for taking the time and sharing all your helpful suggestions along
my writing journey. Your feedback helped shape this book into what it is today, and
I could not have completed it without your input and support. It has been a pleasure
knowing each one of you and being able to count on your support.
The team at Taylor and Francis has been incredibly helpful throughout this pro-
cess. Your prompt responses and incredible input into this book are huge contributors.
Thank you, Randi (Cohen) Slack, for being a part of this journey.
I am grateful to my employer, Placemakr, for always encouraging and supporting
my book-writing journey. Thank you for sharing my excitement and supporting me
with everything I needed to be able to write this book.
On a personal note, I want to thank my family, the Walias and the Khandelwals,
for motivating me throughout this process. I wrote this book alongside my full-time
job responsibilities, volunteer mentorship work, and other life struggles. It has in-
volved a lot of late nights and weekends to get this book completed. My husband
and my parents have been tremendously helpful in taking care of everything else so
I got to focus on this book. Thank you Shubham, Mumma, and Papa. Your support
means the world to me. I want to especially acknowledge my late grandparents, Sar-
dar Sardul Singh and Raminder Kaur, and my husband’s grandmother, Radhadevi
Khandelwal. I have received nothing but love, support, and blessings from you all.
Thank you for being a part of my life.
xxix
I
NLP Concepts
In this section, we will go over some basic concepts that lead up to natural lan-
guage processing (NLP). Believe it or not, each one of us has at some point interacted
with a technology that uses NLP. Yes, it is that common! We will describe NLP and
share some examples of where you may have seen a product or technology powered
by NLP.
We will dive into where it all starts from and is centered around, i.e., language.
We will follow it with a brief introduction to concepts of linguistics that form the
basis for many NLP tasks. Often when thinking of how to implement a method for a
machine to do a task that humans perform well, it is useful to consider the perspective
– how would I (human) solve this? The answer often inspires mathematical modeling
and computer implementation for the task. Thus, we will spend some time in this
section on how the human-based understanding of language influences NLP tasks.
Language data needs preparation before a machine can find meaning from it. Have
you ever received a text message from a friend with a term you didn’t understand that
you had to look up on the Internet? Have you ever needed to translate a sentence from
one language to another to understand its meaning? Machines can require similar and
various additional types of preprocessing before they can make sense of the language
input. In general, language is not numeric (not represented as numbers), whereas a
machine understands data in only binary numbers – 1’s and 0’s. We’ll introduce the
basic concepts of converting language into numeric features before diving into further
details in the later chapters.
To build successful NLP solutions, it is important to note challenges in NLP and
why they arise. There are many challenges, some that remain challenging, and some
that can be fully or partially solved by using certain techniques. We will introduce
NLP challenges and potential solution options.
Finally, we will list setup requirements and introduce popular tools that we will
use in the rest of the book.
This section entails the following topics:
• Language concepts
• NLP challenges
• Setup
• Tools
CHAPTER 1
NLP Basics
DOI: 10.1201/9781003264774-1 5
6 ■ Natural Language Processing in the Real-World
TV turns on
You: Pause TV
You: Play TV
4. Text similarity: Text similarity is a popular NLP application that finds use in
systems that depend on finding documents with close affinities. A popular ex-
ample is content recommendations seen on social media platforms. Ever noticed
that when you search for a particular topic, your next-to-watch recommended
list gets flooded with very similar content? Credit goes to text similarity al-
gorithms, among some other data points that help inform user interest and
ranking.
While natural language is not only text but also other forms of com-
munication, such as speech or gestures, the methods and implementation
in this book are focused primarily on text data. Here are a few reasons for that.
- A lot of popular products using speech as input often first transcribe speech
to text and then process the text data for further analysis. The resultant
text is converted to speech after analysis for applications using a speech output.
- Speech processing is a large field of its own. On the other hand, gesture
detections fall under the realm of image processing and computer vision, which
is also a large field of its own. These fields are different, rich, diverse, and call for
a massive write-up like an entire book pertaining to these individual topics to
do them justice. For reference, a brief introduction, some resources, and open-
source Python tools are listed below that you might find useful if interested in
diving further into language processing for speech or gestures.
10 ■ Natural Language Processing in the Real-World
Speech
Introduction
Speech is a form of audio that humans use to communicate with one another.
Speaking is the exercise where forced air is passed through the vocal cords, and
depending on the pressure areas and amount, certain sounds are produced. Reading
speech using a Python program, speech signals are seen as time-series events where
the amplitude of one’s speech varies at different points. Often in speech processing,
frequency is of massive interest. Any sound contains underlying frequencies of its
component sounds. Frequency can be defined as the number of waves that pass a fixed
place in a given amount of time. These frequencies convey a great deal of information
about speech and the frequency domain representation is called the spectrum. Derived
from the spectrum is another domain of speech, called cepstrum. Common features
used from speech signals for machine learning applications include spectral features,
cepstral features, and temporal (time-domain) features.
Challenges
Common challenges in this field include the quality and diversity of data. Speech
in the presence of different background noises forms challenges for a machine to
interpret the signals and distinguish between the main speech versus the background
sounds. Basic techniques such as spectral subtraction [186], and more sophisticated
and actively researched noise removal models are used. There is scope for speech
recognition to be made available for more languages and cover wider topics [164].
Tools
Some popular tools help extract features from speech and audio and build
machine learning models [154]. Examples of such open-source tools include
pyAudioProcessing3 [156], pyAudioAnalysis,4 pydub,5 and librosa.6
Gestures
Introduction
Gestures form an important type of language. Many individuals rely on gestures
as their primary source of communication. Building systems that understand gestures
and smart machines that can interact with gestures is a prime application vertical.
Other applications include programming a system to understand specific gestures and
programming smart devices to optionally take an action based on the gesture, e.g.,
turn off a room light, play music, etc. For gesture analysis, there has been ongoing
research in improving and creating gesture detection and recognition systems [79].
Challenges
Some of the main issues have been around image quality and dataset sizes. Train-
ing a model to recognize images from a clean/fixed dataset may seem simpler. But
in a more realistic setting, the image quality is not always homogeneous or clean,
and training a model to recognize images that it hasn’t seen before in real-time can
be challenging. Data augmentation techniques to artificially add noise to clean sam-
3
https://github.com/jsingh811/pyAudioProcessing
4
https://pypi.org/project/pyAudioAnalysis/
5
https://pypi.org/project/pydub/
6
https://librosa.org/doc/latest/index.html
NLP Basics ■ 11
ples have been popularly implemented in this area to build a model that is able to
circumvent the noise.
Tools
Popular libraries include OpenCV7 , scikit-image8 , SciPy9 and PIL10 . Artificial
neural networks have been popular in image processing. [79] walks through a simple
model to understand gestures. Here’s another guide to developing a gesture recogni-
tion model using convolutional neural networks (CNN) [36].
We have visited several applications and products powered by NLP. How does a
machine make sense of language? A lot of the inspiration comes from how humans
understand language. Before diving further into machine processes, let’s discuss how
humans understand language and some basic linguistic concepts.
Ears
Per Sound Relief Healing Center [43], the human ear is fully developed at birth
and responds to sounds that are very faint as well as very loud sounds. Even
before birth, infants respond to sound. Three parts in the human ear help relay
signals to the brain; the outer ear, middle ear, and inner ear. The outer ear canal
collects sounds and causes the eardrum to vibrate. The eardrum is connected to
three bones called ossicles. These tiny bones are connected to the inner ear at the
other end. Vibrations from the eardrum cause the ossicles to vibrate which, in
turn, creates movement of the fluid in the inner ear. The movement of the fluid
in the inner ear, or cochlea, causes changes in tiny structures called hair cells
that sends electric signals from the inner ear up the auditory nerve to the brain.
The brain then interprets these electrical signals as sound.
7
https://opencv.org/
8
https://scikit-image.org/
9
https://scipy.org/
10
https://pillow.readthedocs.io/en/stable/
12 Natural Language Processing in the Real-World
Eyes
An article in Scientific Journal on ‘The Reading Brain in the Digital Age: The
Science of Paper versus Screens’ [88] yields insights on how the eyes help in
reading. Regarding reading text or understanding gestures, the part of the brain
that processes visual information comes into play, the visual cortex. Reading
is essentially object detection done by the brain. Just as we learn that certain
features—roundness, a twiggy stem, smooth skin—characterize an apple, we learn
to recognize each letter by its particular arrangement of lines, curves, and hollow
spaces. Some of the earliest forms of writing, such as Sumerian cuneiform, began
as characters shaped like the objects they represented—a person’s head, an ear of
barley, or a fish. Some researchers see traces of these origins in modern alphabets:
C as a crescent moon, S as a snake. Especially intricate characters—such as
Chinese hanzi and Japanese kanji—activate motor regions in the brain involved
in forming those characters on paper: The brain goes through the motions of
writing when reading, even if the hands are empty.
How we make sense of these signals as a language that conveys meaning comes
from our existing knowledge about language rules and different components of lan-
guage including form, semantics, and pragmatics. Even though some language rules
apply, because of the different ways people can communicate, often there are no
regular patterns or syntax that natural language follows. The brain relies on an in-
dividual’s understanding of language and context that lies outside of linguistic rules.
Whether we are consciously aware of it or not, any external sound, gesture, or
written text is converted to signals that the brain can operate with. To perform
the same tasks using a machine, language needs to be converted to signals that a
computer can interpret and understand. The processing required to do so is referred
to as Natural Language Processing (See Figure 1.4).
1. Form
FIGURE 1.5 Some popular applications of NLP that leverage different language com-
ponents.
Each component described above forms a basis for how we, as humans, interpret
the meaning of speech or text. It also forms the basis for many language features that
are used popularly in NLP to understand language. Figure 1.5 shows popular NLP
applications that make use of the different language components discussed above.
Tokenization refers to breaking down sentences into words, and words into the base
form. Part-of-speech tagging marks words in the text as parts of speech such as nouns,
verbs, etc.
it requires to have seen such data and its usage patterns before and learn the language
rules that humans are likely to follow. This section lists some methods and factors
that are important when thinking of using language as data.
1.3.1 Look-up
Consider a task where you need to find all the entries in a dataset of sentences
where the entry contains content about the movie – Ghostbusters. What solutions
come to mind? Curate training data, manually label some samples, and train a model
that predicts – Ghostbusters versus not-Ghostbusters?
Let’s look at a much easier and much faster solution. Why not look up the pres-
ence of the string ‘ghostbusters’ in each data sample? If it is present, mark it as
Ghostbusters, else not-Ghostbusters.
Limitations?
Some samples may mention ‘ecto-1’ which is the vehicle name in the movie and
not the term ‘ghostbusters’. Such a sample would be missed by our approach. Solution
– how about using multiple relevant keywords to search the samples with, including
popular actor names, character names, director names, and popular movie elements
such as the vehicle name? The results may not be all-encompassing but would cer-
tainly return an easy and fast solution and could serve as a great first approach before
a complex solution needs to be scoped out. Furthermore, this method can form a first
step for curating data labels for your dataset that can come in handy for future model
building.
Look-ups and similarly other basic approaches to NLP tasks such as using word
counts work as a great starting point for simpler tasks and result in simple yet effective
solutions.
1.3.2 Linguistics
Let’s look at the following sentence where the task is to identify location names from
text:
How could we solve this problem? One simple solution might be to have a list
of all location names and search for their presence in the sentence. While it is not
an incorrect solution and would work perfectly for many use cases, there are certain
limitations.
16 ■ Natural Language Processing in the Real-World
The look-up approach would detect ‘Arizona’ and ‘New York’ as location names.
We, as humans, know that Arizona is a location name, but based on the sentence
above, it refers to a person and not the location.
There are advanced techniques that can distinguish between Arizona and New
York in the above example. The process of being able to recognize such entities
is called named-entity recognition, information extraction, or information retrieval
and leverages the syntax rules of language. How does it work? The process includes
tagging the text, detecting the boundaries of the sentence, and capitalization rules.
You can use a collection of data sets containing terms, and their relationships or use
a deep learning approach using word embeddings to understand the semantic and
syntactic relationship between various words. Don’t worry if this sounds unfamiliar.
We’ll dive further into it in Section III and Section V. The best part is that there
are existing tools that offer models that do a reasonable job for such tasks. Using the
spaCy library en_core_web_sm trained model, the below results can be accomplished:
With the knowledge of linguistics and the relationship between terms, the machine
can accomplish the detection of location names from a challenging sentence.
Many other NLP tasks can be solved using the knowledge of linguistics as seen
previously in Figure 1.5.
Humans may guess ‘meal’, ‘game’, ‘date’, ‘movie’, ‘vacation’, or ‘holiday’. Given
enough text samples, a machine could guess the same answers. The guesses can only
be as good as the data it has seen before. If all our training dataset contains is a
few samples of someone going out for a ‘movie’ with their spouse, then that’s the
best prediction we can get. But if the dataset is more representative, we could have
the machine capture many other possible answers, such as ‘date’, ‘game’, ‘meal’,
‘vacation’, ‘grocery run’, and even the less common events that every human may
not be able to guess. Why may that be? We as humans meet several people in our
lives, watch TV and movies, text our friends, read, and perform many such activities
that open our imagination to different degrees. Let’s consider a person named Emma.
Emma is unmarried and has very few married friends. She may not able to guess where
one may go out with their spouse. This is because Emma hasn’t seen many examples
of such an event. However, a machine has the capacity to learn from a lot more data
NLP Basics 17
than what a human brain can process and remember. Having large enough datasets
can not only represent Emma’s imagination of what David may be going out with his
spouse for, but also represent the imagination of several such individuals, and thus
make guesses that a single individual may not think of.
Now we know that data quantity matters, let’s consider something a bit more
ambiguous now. Let’s say we want to infer which sentence is related to Art:
While ‘safflower oil’ is used in both examples, the topic of the first is completely
different from the second. This is known to humans because when we see the word
‘fry’ or ‘onions’ used with ‘oil’, it becomes apparent that it is likely not about art.
Similarly, ‘oil paints’ and ‘safflower oil’ used together seem likely to be about art. We
are able to make that inference because we know what food is and what paints are.
To make a machine understand the same, it is important to feed in relevant
training data so it can make similar inferences based on prior knowledge. If the
machine has never seen food items used in a sentence or has not seen it enough,
it would be an easy mistake to mark the first sentence as art if it has seen enough
samples of ‘safflower oil’ usage in art.
To successfully build an art/not-art classifier, we not only need a representative,
relevant, and good quantity of training dataset, but also preprocessing and cleaning
of data, a machine learning model, and numerical features constructed from the text
that can help the model learn.
1.3.4 Preprocessing
Data preprocessing refers to the process of passing the data through certain cleaning
and modification methods before analyzing or converting it into numerical represen-
tation for modeling. Depending on the source of data, the text can contain certain
noises that may make it hard for the machine to interpret.
For instance, consider a task where you have a list of text documents that were
written by people regarding a private review of a product. The product owners have
permission to display these reviews selectively on their websites. Now let’s talk about
18 Natural Language Processing in the Real-World
constraints. The program that needs these reviews as input to display on the website
cannot parse language other than English. So as a preprocessing step, you’ll remove
any non-English language content. Furthermore, the product managers desire to not
display any reviews having less than 10 characters of text on the website. Thus, you’ll
further apply a filtering step where you only pass the documents that have a length
of more than 10. But when you further look at the data samples resulting after the
filters are applied, you find some reviews contain meaningless information in the form
of random URLs and non-alphabets. Thus, for a cleaner output, you may pass the
data through further steps, such as removing URLs, checking for the presence of
alphabets, stripping leading and trailing spaces to get the relevant text lengths, etc.
All these steps count as preprocessing and are very tailored towards the goal.
It is often found useful to communicate to the machine that ‘grad’ and ‘gradua-
tion’ mean the same, and words with or without apostrophes can be considered the
same for a dataset as such. There are techniques to achieve normalization as such,
such as stemming, lemmatizing, ensuring diverse dataset representation, and creat-
ing custom maps for word normalizations. This will be further discussed in detail in
Chapter 3 (Section 3.1).
Additionally, different geographical locations can represent different accents and
usage of words. Not only is the way of saying the same word different for the same
language across the world, but what they mean at times changes with geography. For
Random documents with unrelated
content Scribd suggests to you:
expedition, nor could it be of use or value, but rather a great
vexation and care to all; that he would consider the matter well as
the case demanded, and if it were advisable he would be the first to
assist in its execution, as he desired it."
CHAPTER VII
P hilip II was much annoyed at the result of his interview with the
Nuncio Ormanetto, because he saw that the Pope was seriously
thinking of raising D. John from his dependent position by giving him
a crown, and that D. John, on his part, would go as far as his
chivalrous loyalty permitted. Antonio Pérez confirmed the King's
fears, making him see that the preservation of the forts of Tunis
contrary to D. Philip's opinion, and Juan de Soto's secret journey to
Rome, were acts of real independence; and, although he did not
dare to accuse D. John openly, he threw the blame on the secretary
Soto, attributing everything to his influence and intrigues, and again
insisted on the necessity of separating D. John from such a
dangerous adviser, and of substituting for him an energetic,
temperate man, who would know how to moderate these fiery
ambitions. This temperate, energetic man whom Pérez now ventured
to propose was Juan de Escovedo, a former retainer of the Prince of
Évoli and completely his creature, who was then secretary of the
King at the Treasury.
All this irritated and perplexed D. Philip. He did not wish to vex the
Pope, whose disinterestedness and holy aims he well knew; nor did
he wish either to deprive his brother of all hope, because, although
he did not doubt D. John's loyalty, he was afraid, having become
suspicious, of subjecting it to undue proof.
In this difficulty he judged very wisely that the danger would
cease with the opportunity, and he resolved to get rid, as far as
possible, of "this care and worry of Tunis," and in this sense wrote to
D. John the letter which we have already quoted. He also decided to
follow the advice of Antonio Pérez, appointing Juan de Escovedo as
secretary to D. John; and as his natural prudence and judgment saw
no reason for injuring Juan de Soto, or motive for depriving himself
of Soto's useful services elsewhere, he confirmed him in the
appointment of Commissary of the Fleet in Italy, which was both an
honourable and lucrative post.
So Juan de Escovedo set out to join D. John at Naples, bearing
express orders from the King and strong recommendations from
Antonio Pérez, to moderate D. John's ambitious aspirations, and
reduce him to a mere instrument of the policy of his brother, without
any views of his own. This man, celebrated afterwards for the
gloomy drama of which he was the victim, was then between forty-
five and fifty years old. He appeared rather a clownish peasant from
anywhere than a noble of the Asturias. He was of middle height,
thick-set, with heavy shoulders, and so swarthy and bilious-looking,
that in the secret correspondence of Philip II and Antonio Pérez he is
often designated by the name of "verdinegro" (the dark green one).
However, he compensated with interest for his rough ways and
absolute want of manners by his generous, unselfish nature, his
sterling honesty, clear understanding, and energetic activity, which
rendered him capable of facing all obstacles. Ruy Gómez and Luis
Quijada esteemed him much and the latter honoured him not a little
in his lifetime, and Doña Magdalena de Ulloa had retained, in her
retirement, such a happy recollection of his honesty and
uprightness, that no sooner did she hear of his new appointment
than she hastened to write him the following letter:
"Illustrious Sir; I desire to write to you to tell you the
pleasure that it gives me to see you in the company of the
Lord D. John, because I desire nothing in the world so much
as to see such persons about him, for I know the necessity
he has of this, and how he will profit by it, and as H.H. does
not neglect to keep me informed, I have begged him to
make the duty over to you, whom I ask to write by every
post whatever you think that I might care to hear about D.
John and what he does, and I also beg of you that no post
should leave without bringing me information, because if this
is not carried out, and the post comes with nothing, it gives
me a great shock, and you can send the letters to the house
of D. Pedro Manuel, and I will reply by the same means or as
you may direct; and because I think that, although it will be
a trouble to you, you will do it as a favour to me, I end by
praying Our Lord to give you as good a journey and as much
success as I wish you. May Our Lord keep and prosper your
illustrious person as I wish. At your service,
Doña Magdalena de Ulloa."
Gregory XIII, on his part, never wavered in his ideas, and losing
all hope that Philip II would help him in his plans for the kingdom of
Tunis, he turned to another scheme which had been a failure in the
time of Pius V, but which he desired to resuscitate with fresh life and
vigour by confiding its execution to D. John of Austria, "because of
his valour and good fortune," quoth the Pontiff, who matured in
silence his secret project, which was to bring so much good to
Christendom and so much glory to D. John, and until he could
divulge it he contented himself with lavishing proofs of esteem and
affection on him, such as were then only shown to kings and
reigning princes.
In March of that year, 1574, he sent to Naples by his Chamberlain
the Golden Rose, blessed on Palm Sunday, which, according to
ancient custom, the Pope was in the habit of sending to the king or
queen who had deserved the most gratitude from the Holy See
during the year. This unusual honour frightened the Viceroy of
Naples, Cardinal de Granvelle, who was no friend of D. John, and he
hastened to apprise Philip II of the fact. The Chamberlain arrived at
Naples with the Golden Rose on the 24th of March, and on the 25th
the solemn presentation took place in the church of St. Clara. The
friars of St. Clara, great admirers of D. John, put a crimson velvet
carpet on the Gospel side, to receive him, with a chair and curtain,
as they would have done for an Infante of Spain. Granvelle knew of
this, but held his tongue and let it pass, in order to have something
against D. John, if he had accepted the honour; but he, warned in
time, ordered the canopy to be removed and another chair to be
placed at the left of his own for Granvelle.
Great was the enthusiasm in Naples over the new honour
bestowed on D. John, and all wished to take part in it. It was a point
of honour with the ladies to go to the festival with symbolical roses
in their head-dresses and at their breasts, and they bombarded
everyone, from the Cardinal to the smallest acolyte, with demands
for seats. It was, however, impossible to satisfy them all, and on this
day noble ladies were seen in the gutter, crowded on the stairs, in
the doorways, and even in the recesses of the chapel, anxious to see
everything and to be seen.
There were faintings from lack of air, cries of protest, bad-
tempered pushing, crumpled ruffs, crooked caps, creased petticoats,
unfastened shawls, lost jewels, and heaps of petals from the roses
that had occupied such honourable positions. The necklace of the
wife of an important Councillor was broken; it was a string of pearls,
and only half a dozen could be recovered.
D. John came between the Cardinal Granvelle and the Archbishop
of Monreale, and was followed by all the numerous princes,
marquises and counts who were in Naples, and by a crowd of
gentlemen. A Bishop celebrated the Mass, and the Bishop of
Castellamare, who was Chaplain to the King, gave D. John the Pax
and presented him with the Gospels to kiss. The Pope's Chamberlain
was on the Epistle side, on a seat without a back covered with
crimson velvet. He wore a black velvet cassock, and over it a
crimson garment. The Golden Rose was displayed on the high altar
in a big silver jar. It was of massive gold, with its foliage a foot high;
it had diamonds sprinkled over it like drops of dew, and the green
leaves were made of emeralds, some of enormous size. Mass over,
the Chamberlain took a brief of the Pope and gave it to D. John to
kiss, and then to a secretary to read aloud. The reading finished, D.
John knelt down on a cushion of crimson velvet before the Bishop
who had celebrated the Mass, and who, taking the Golden Rose from
the hands of an ecclesiastic, gave it to D. John, saying, "Our Holy
Father, Gregory XIII, Very Serene Prince, sends you this consecrated
rose, in token of his benevolence and paternal love. By his orders I
give it to your Highness."
To which D. John replied, "I kiss the feet of His Holiness for so
great a favour, and I receive the rose with the veneration due to
something so sacred, sent by the Vicar of Christ, universal Shepherd
and head of the Church."
At this time there broke out in Genoa the famous disturbances
between the old and the new nobility, called respectively "the Porch
of St. Luke" and "the Porch of St. Peter," and Philip II, who held the
protectorate of this republic, hastened to send D. John of Austria
with a few galleys to pacify the insurgents with skill and cleverness;
and if it were not possible to quiet them by any other means, to do
so by force of arms. The Pope heard of his passing Gaeta, which was
only twenty leagues from Rome, and on the pretext of greeting him,
sent his son Jacobo Boncompagni, who carried secret instructions to
apprise D. John of those mysterious plans over which the Pope had
long been meditating. Marco Antonio Colonna accompanied Jacobo
on his own account, as also did the Spanish ambassador in Rome, D.
Juan de Zúñiga.
The three illustrious personages came to visit D. John on the 18th
of April on board his galley with a numerous and brilliant suite, and
the next day D. John landed to give them a royally sumptuous
banquet in the house of the Governor of Gaeta. The long, wide table
was set in the principal saloon, with two places side by side laid with
services of rich plate, D. John giving the place of honour to Jacobo.
On the right, but at a respectful distance, was a similar place for
Marco Antonio Colonna, and at an equal distance on the left another
for D. Juan de Zúñiga. One hundred and twenty-three dishes were
served with all the viands and exquisite sauces for which Italian
cooking was then so famous, without counting dessert, which
covered the table three times, with different conceits of towers,
tournaments, castles, and wild beasts, with pastry and delicious
sweetmeats; more than forty kinds of wine were passed round. The
merriment and good temper of the illustrious guests never flagged
for a moment, and the crowd of noble gentlemen, who stood
respectfully watching the banquet, snatched a mouthful at the
sideboard, and were satisfied with abundant cups of wine.
At the end of dinner Boncompagni asked D. John's permission to
present him with the gift that Gregory XIII had sent: some very rich
tournament armour, a great black velvet pouch full of gold medals
that had been blessed, which D. John divided among those present,
and a little chest of red velvet containing a beautiful group of the
Crucifixion, of great artistic merit. The Pope kept this chest in his
rooms, and it was enriched with numerous indulgences.
In return for these presents D. John gave Boncompagni a horse
worth 500 ducats, and its trappings which cost 2500, and a sword
ornamented with gold worth 800 ducats.
The next day, on board the galley "Real," under the awning of
striped red and white damask which stretched in front of D. John's
cabin, Boncompagni confided to him the mysterious enterprise which
Gregory XIII proposed to undertake with D. John's help. D. John
listened attentively in silence, from time to time his blue eyes flashed
with enthusiasm. It was a question of setting at liberty a beautiful
captive queen and snatching a kingdom from the heretics.
CHAPTER VIII
M eanwhile the capture of Tunis had made patent to all Europe how
deep was the wound that the credit and power of the Ottoman
Empire had received at Lepanto. This great defeat was no doubt a
disaster for the Turks; but a glorious disaster, both on account of the
deeds of valour they had performed, and the titanic efforts it cost
the victors to gain the triumph. The flight from Tunis without firing a
shot, at the mere presence of D. John two years after this rude
warning, showed how deeply rooted was the terror in the souls of
the infidels, and how the renown of the Christian bravery had been
enhanced, especially that of the Spaniards. All this cruelly wounded
the overweening pride of Selim, and he was consumed with the
desire of avenging himself by reconquering Tunis and Goletta. He
was urged, with malicious eagerness, to undertake this enterprise by
Aluch Ali and the renegade Mustafa, one of the engineers who built
Goletta in the time of Charles V. The name of this traitor was Jacobo
Zitolomini. Resenting the treatment he had received from Philip II,
he fled to Algiers to Aluch Ali, who took him to Constantinople,
where he revealed to Selim a sure and secret way of taking Goletta.
At the beginning of May, 1574, D. John received an urgent
message from Gabrio Cervelloni, to say that the Turks were
preparing a very powerful fleet; that it was feared that they would
fall suddenly upon Tunis, and that, in consequence of this, funds
should be sent as quickly as possible to finish the new fort, which
was not yet completed. D. John was at Genoa, quieting the
disturbances there, and he hastened to send the Commissary of the
Fleet Juan de Soto to Madrid, to warn Philip II of the danger which
threatened. The King was not much alarmed about this, and,
perhaps, saw a prompt and certain opportunity of ridding himself of
this care and worry of Tunis. At any rate, his answer makes it clear
that this new conquest was the least of his cares, and while writing
to Cardinal Granvelle, Viceroy of Naples, and to the Duque de
Terranova, Regent of Sicily, that they were to guard the ports and
reinforce the garrisons, especially in Messina, Augusta, Syracuse,
Trapani and Palermo, he contented himself with adding that they
were not to forget to help his brother, and to look after the coast of
Barbary. He also ordered D. García de Toledo and the Marqués de
Santa Cruz to watch how D. John was garrisoning Goletta, and to
the latter the King wrote that he was to do what he judged best in
the matter, but that he was to remember that he had said that 2000
foot soldiers were enough to defend Goletta. D. John then sent D.
Juan de Cardona with all the galleys under his command to Tunis
without loss of time, taking the help for which Gabrio Cervelloni
craved. This was not sufficient, and those in Tunis reiterated their
request. D. John then exhausted all his resources, and sent D.
Bernardino de Velasco with twenty Neapolitan galleys and four
companies of Italian infantry. With these comings and goings
summer was getting old, and on the 13th of August, at the Cape of
Carthage, appeared the dreaded Turkish fleet of 300 ships and
60,000 soldiers, the fleet being commanded by Aluch Ali, and the
troops by Selim's son-in-law Sinan Pasha, the renegade.
A great outcry arose at the extreme peril of the Barbary
Christians, and by every means in their power they sent to ask help
from Granvelle, Terranova, and, above all, from D. John of Austria, in
virtue of his office and Christian piety. He wished to fly to their aid,
abandoning everything. He wrote first, however, to the Duque de
Sesa, "To urge the Cardinal to send people to help Goletta, as that
province was in his charge." But the imperturbable Granvelle replied
coldly, "That he had much to guard in the Kingdom, and that it did
not suit him to divide his forces." "This was," says Vander Hammen,
commenting on the fact, "to give colour to the excuse. The real
reason was Granvelle's dislike to support D. John, jealous of his
favours with Mars and Venus, and because he was a foreigner, and
because his brothers conspired in the Flemish rebellion;" and Luis
Cabrera de Córdoba expresses himself in similar words, equally
severe, not forgetting Mars and Venus. And D. John himself wrote to
his sister Donna Margarita: "In short, Lady, everything goes badly;
and in truth it is not entirely the fault of His Majesty, except for
permitting those who govern his States to forget that those in their
vicinity, or those that are not, are as much His Majesty's as those
which each minister has charge of."
Meanwhile D. John, tired of waiting for orders, troops and money
which did not come, and making it a point of honour to go to Tunis,
moved with desperate activity from Genoa to Naples, Messina and
Palermo, recruiting soldiers everywhere, chartering ships, and
pledging for all this his plate, his jewels, and even his word, until he
had collected at Messina a moderate fleet with no lack of fighting
men. He was all ready to sail for Africa, when he met with another
obstacle, more powerful than the calculated coldness of Philip II, or
the jealous hatred of the Cardinal. The sea! The terrible sea which
rose in a furious storm which threw him to Trapani, much against his
will, and kept him there days and days, giving time for Christians to
perish and for the Turks to become victorious. Three times he tried
to leave the port, defying the storm, and as often had to retire
before the surging waves. Then he sent four galleys without quarter-
decks and platforms on the forecastles to take the mere hope of
help to Goletta, but the implacable tempest prevented this by
destroying two of them. At last the weather improved; but before D.
John could put to sea, a French galley, without masts and knocked
about by the storm, was driven into the port of Trapani. On board of
her was D. Juan Zagonera, with fifty soldiers, all that remained at
liberty of the garrison that D. John had left in Barbary. From them he
heard of the terrible disaster. The Turks were in possession of Tunis;
three thousand soldiers were dead, and the rest wounded or
captives; Pagano Doria had been beheaded; Gabrio Cervelloni, D.
Pedro Portocarrero and D. Francisco de Avila were the slaves of
Sinan; the new fort razed before it was finished; and Goletta, the
glorious legacy of Charles V, blown up by mines, and erased from
the African soil by Aluch Ali, as the wind of the desert obliterates
footprints.
Those who were jealous of D. John blamed him for this
catastrophe, with which he had had nothing to do; the sensible
public opinion, at times so right and sharp, blamed Granvelle, and
songs, which have come down to us, were sung on the subject in
the streets. A few, but very few, said in a whisper, as in those days it
was necessary to do, that the Cardinal was not responsible, since in
refusing aid to Goletta he had obeyed secret orders from Madrid. Of
this, however, absolutely no proof exists.
The energetic nature of D. John was not depressed by this bad
news; but it awoke a thousand different sentiments in his mind, and
under the impression of disgust, sorrow and wounded dignity, and,
above all, his loyal frankness, which always urged him to treat
questions openly and in a straightforward manner, he resolved to go
to Spain to confer with his brother Philip II face to face about three
different questions which were connected with each other—as to his
remaining permanently in Italy as Lieutenant-Governor of those
States, his recognition as Infante of Castille, and the mysterious
scheme that Gregory XIII had proposed to him.
So it fell out, and by January, 1575, D. John was already in
Madrid. On the 15th of February he wrote to his sister Donna
Margarita:
"Lady, I, praised be God, arrived a few days ago at this
Court, where I have received such kindness from His Majesty
that only to have gained this I consider that I have spent my
life well. Since my arrival I think that he understands Italian
affairs very differently from what he did before. I had
thought, as I had prayed His Majesty, to stay some time in
Madrid; but in the end he is resolved to order me to return
to those parts, and is in a great hurry to send me off. I think
that I shall start in the middle of the coming month, and I
also think that I go to begin a new sort of service according
to what suits His Majesty. Meanwhile one has to overcome
difficulties and hasten on the things required for this
summer's campaign.
"To all this I pay so much attention that each day, in
councils and out of them, I do nothing else. It is already
drawing so near summer, that I am satisfied with nothing
that I do not see. Here, Lady, everything is councils; every
day I hold two, besides a thousand other occupations, which
leave me no time that I can call my own."
D. Philip was under the spell of the fascination that D. John always
exercised, and, notwithstanding the groundless suspicions of Antonio
Pérez, he received his brother with loving affection and the gratitude
and graciousness due to a leader who had added such lustre and
glory to the arms and name of Spain. He listened long, and with
great interest, to D. John's information about Italian affairs,
changing his opinion much about them. He agreed with D. John in
blaming the Ministers and Viceroys of those States, especially
Granvelle and the Duque de Terranova. He talked over and fixed the
loans which should be made to the various councils to enable them
to guard themselves that summer against the Turk, whose pride had
to be humbled after the recent capture of Tunis; and finally
appointed him, with the approval of the whole council, and to the
secret horror of Antonio Pérez, his Lieutenant-General of all Italy,
with authority over all the Viceroys and Ministers who governed
those States. This, however, was to remain a secret, to spare the
reputations and prestige of these functionaries, and was only to be
manifested in case of abuse of authority or boast of independence.
"This for Y. Highness only, I beg for many reasons," wrote D. John
from Naples to Donna Margarita. "I also bring an order that
everyone has to act with obedience; but this is only to be used when
some Minister persuades himself to the contrary, which I do not
think will happen, as by letters they have learnt what concerns
them."
D. John, encouraged by this, dared to present the second part of
his programme, which was that, in order to wound no one and to
give an outward sign of this supremacy over the Italian Ministers,
the King should concede to him the rank and title of Infante, which
was spontaneously given him by all, great and small. D. Philip did
not like to refuse this well-deserved favour, but with excuses made
D. John understand that the time was not ripe for this. He did not do
this out of ill-will, or from miserly stinginess, or still less from
jealousy of his fame and renown, as some say, but because it was
one of the maxims of this prudent King, inherited from his father
Charles V, to stimulate the services of the Grandees with a reward in
proportion to their rank; and without giving D. John a crown, which
Philip did not wish to do, there remained no other reward worthy of
him but the title of Infante, and it seemed premature to give him
this now, considering the many and important services Philip hoped
to obtain from him in the future.
As to the project of Gregory XIII, D. John did not have to broach
the subject to his brother. D. Philip himself began it, having already
talked over and settled it with the Nuncio Ormanetto.
CHAPTER IX
F our years before these events, in June, 1571, a little old, nervous
and active Italian arrived in Madrid. He called himself Giulio
Benasai, a merchant from Genoa; he stopped at an inn, near the
gate of the Viper, now the Puerta Cerrada, and very early the next
day began his visits, which were anything but commercial ones. He
visited Monsignor Ormanetto, the Pope's Nuncio; Dr. Milio, governor,
in the Duke's absence, of the Alba estates; the secretaries Zayas and
Mateo Vázguez, and lastly, five days after his arrival, on the 28th, he
visited the King, Philip II, at the Castle. This visit, however, was very
different from the others, it was paid secretly at night, and once
inside the Castle he no longer called himself Giulio Benasai, or a
native of Genoa, or a merchant. His name was Roberto Ridolfi, a
banker in London, and secret agent of His Holiness Pius V in that
heretic country.
Ridolfi gave three letters, substantially alike, into Philip's own
hands. These begged him to give Ridolfi his entire confidence, and
to undertake what he would explain, granting all the resources he
deemed prudent in order to further the enterprise. They were from
no less personages than Pius V, the Queen of Scots, Mary Stuart,
then a prisoner in England, and the third one from the Duke of
Norfolk.
The project was this; to capture the heretic Queen of England,
Elizabeth, and the lords of her Council, and shut them up in the
Tower of London; to marry the lawful Queen, Mary Stuart, to the
Duke of Norfolk, and in this way to re-establish Catholicism in
England and Scotland. Philip's aid was sought for the plan, and they
had already obtained the support of the most influential English
lords and of Mary's partisans in Scotland, who were then numerous
and powerful. The Pope had prepared the way by hurling his terrible
Bull against Elizabeth, declaring her to be an obstinate heretic and
an abettor of heresy, deposing her from the English throne and
absolving her subjects from their oaths of fealty and obedience. He
promised, moreover, all the funds that the Holy See had at its
disposal.
For this enterprise the Duke of Norfolk asked the King of Spain for
6000 arquebusiers, 4000 arquebuses, 2000 cuirasses and 25 pieces
of artillery, with the necessary money and ammunition. He promised,
for his part, to raise in England 3000 horsemen and 2000 foot
soldiers and to undertake the dangerous task of capturing the Queen
and her Councillors and of setting Mary Stuart free. He also
promised to remain on his estates in Norfolk, facing the coast of
Holland, to protect the landing of the troops that the Duque de Alba
was to send from Flanders. The Duque had talked to Ridolfi in
Brussels and approved of the plan, with certain reservations, and
even thought it an easy one, once Elizabeth was either captured or
dead; he waited, however, for the orders and consent of his
Sovereign.
Philip II listened to Ridolfi with his usual reserve and caution, and
sent him to the Escorial, where the Duque de Feria examined him at
length, and where an important council was held on the 7th of July,
the minutes of which are preserved in the archives at Simancas.
They all approved of the plan and agreed to order its prompt
execution by the Duque de Alba. But such was the slowness of Philip
in settling the details and such was his indecision about dictating the
last orders, that time was given for Norfolk to be denounced, tried,
and publicly beheaded in London.
It was this scheme, ruined by the death of Norfolk, which Gregory
XIII wished to resuscitate. He sent another Bull, similar to the one of
Pius V, giving the sovereignty of England to her legitimate Queen,
Mary Stuart, and marrying her to D. John of Austria, who was to
command the Spanish hosts which were to invade England. The
Pope had already consulted the English and Scotch lords and other
magnates who were willing to support Norfolk's movement, and they
undertook to perform all that they had previously promised to the
unhappy Duke. To reinstate the plan in the same advantageous
position it had held in the days of Pius V only the consent and help
of Philip and D. John were lacking. At his interview at Gaeta with
Jacobo Boncompagni D. John enthusiastically gave his consent,
subject to his brother's will, which was for him an unbreakable law.
But Philip, on his part, received the proposal coldly when it was
unfolded to him in the name of Gregory XIII by the Nuncio
Ormanetto; he very courteously thanked the Pope for the favour
shown to his brother, but excused himself from helping the
enterprise because of the necessity there was of concentrating large
armies in Italy for fear of the Turk, who had been heartened by the
triumph of Tunis, and in Flanders where the rebels were also
encouraged by the departure of the Duque de Alba. And as the
Nuncio argued, pointing out the truth so well known to the
politicians of the day, that the focus of the rebellion had to be
stamped out, not in Flanders, but in England, where the Queen was
always stirring it up and helping the rebels in every way, D. Philip
answered that this was true and that he knew it full well; but that all
the same he could not remove a single pike from Flanders until the
new policy of gentleness and reconciliation, which he had entrusted
to the Knight Commander Requesens, had taken effect. Then he
would consider whether or no the expedition to England would suit
him.
Philip gave his brother the same answer when they treated of the
circumstance, adding other reasons, all tending to bind D. John
tighter to his service, without disappointing him or at once
dissipating the dreams he might have woven round such a romantic
plan as conquering a kingdom by setting a beautiful captive queen at
liberty, which must have appealed so strongly to D. John's chivalrous
fancy. So D. Philip promised, without any intention of fulfilling it,
according to Antonio Pérez, or as we think, meaning to do so if it
suited the plans of his policy to favour Gregory's scheme when the
danger of a fresh war with the Turk, which then threatened, was
over.
And as if to bring D. John down from the sphere of heroic ideas,
where genius usually dwells, to the petty weaknesses among which
most mortals struggle, in the next line the King spoke of what in
certain ways was the only thing which could humiliate and shame D.
John, and which embittered his life—the conduct of his mother—
which had reached such a pitch that no one frequented her house
but low persons, among whom was an Englishman, supposed to be
on too intimate terms with her. The Duque de Alba, who, though
severe, was not straitlaced, had upbraided her without success
several times, and, tired out, had decided to write the following
letter to the secretary Zayas:
"Very magt. Sir. An affair is taking place here which much
troubles me, because I have tried by every means to remedy
it, without success, and it has reached such lengths, that it
would be well if H.M. should quickly cure it. You will be doing
me a favour to tell H.M. that the mother of D. John lives with
so much liberty, in a manner so unlike that in which the
mother of such a son should live, that it is necessary to put a
stop to it, as the affair is so public and so free and open that
they tell me that no honourable woman will enter her doors.
Things have come to such a pass that they are changing the
servants every week, and in my absence she has gone so far,
that most days there are dances and banquets. She has
turned out the two honourable old spinsters I placed near
her and has filled their places with low women. She is
dreadful and very obstinate. His Majesty will order what he
wills, I had resolved to take her by night and put her in a
convent, but I did not like to do so without first consulting
him."
D. Philip answered the Duque de Alba by the following letter
written in cipher.
"The King.
"Duke and Cousin. Cayas has shown me the letter you
wrote about my brother D. John's mother, which, for reasons
you mention and enter into, grieves me much, because she
does not live with seemly modesty and respectability; and it
appears to me, as it does to you, that the only thing to do is
to bring her here, and her son is also of the same opinion, to
whom I have sent Juan de Soto, to say I have done it for her
welfare, these States being in the condition they are, without
saying more, as there was no need to do so, and, as I
understand the journey is to be by sea, if they were to tell
her beforehand, it is very likely that she would do something
foolish; it would be well to keep her in the dark until a safe
ship is found, and then, everything being ready and the
weather fine, to put her on board, whether she likes it or
not, with a suitable retinue, giving orders that everything
necessary for the journey should be provided, and that
during it she should be well treated. Let me know in time,
that she may be met at the port, and from there taken to the
nearest and most suitable convent, which I have not yet
decided on."
It was not the first time that the brothers had talked about this
painful subject; but now D. John knew all, without palliation or
reserve. D. Philip told him in wise and tactful words, like a kind
surgeon, who, without wishing to pain, probes a wound, and
suggested the remedy like a father who discusses a sad family
matter. As there was no other way, they determined to remove
Barbara Blombergh from Flanders by deceiving her, and to bring her
to Spain, where, by D. John's proposal, she should be given into the
charge of Doña Magdalena de Ulloa, that this noble lady should
settle her in her own proximity, wherever, in her prudence, discretion
and charity, she deemed best. This idea appeared an excellent one
to D. Philip, and a few days later D. John set out for Abrojo, where
Doña Magdalena was expecting him.
Never had the mourning figure seemed so dignified to him, or had
he found such sweet and deep repose in her company, or thought
that he saw in her still beautiful eyes such intense love, such
maternal solicitude, or such tender grace as when she showed him
the big coffers of linen which she had ready for him, neckties of
Flemish point which she herself tried on, and the full starched ruffs,
very full as she knew that he liked them.
And it was his yearning for a mother, exasperated by the
disillusion about his own parent, that was comforted by the pure
love and great virtues of that other whom a merciful Heaven had
sent to him. D. John stayed four days at Abrojo, confiding everything
that was on his mind to Doña Magdalena, joys and sorrows, hopes
and fears, triumphs and disappointments, errors and repentances;
and when she said good-bye at the convent door, she thought, as
she did the first time she saw him on the staircase of Villagarcia, "It
is a pity he is not really my son!" And he said to himself with infinite
bitterness, as he kissed her hand for the last time, "It is a pity that
she is not really my mother."
D. John left Abrojo with the profound regret and vague mistrust
that a wanderer feels who sets out on the desert sand after a day's
rest in an oasis. A friendly voice, however, encouraged him all that
day, telling him that a glorious future was his, if he fought with
firmness and waited with patience, which is the advice constancy
gives that fiery activity should achieve its purpose: that Gregory
XIII's idea was certain to be realised because it was great and just,
and easy and feasible, and in the end he would share the throne
with the hitherto unfortunate Queen of Scots; the England of D.
John and the Spain of Philip being the two strong pillars of the Holy
Catholic Church.
He who spoke thus to D. John was Escovedo, whom Philip had
commissioned to moderate D. John's ambitious thoughts. And the
most strange thing is that Escovedo was clever and honest and was
talking seriously.
CHAPTER X
ebookbell.com