Immediate download (Ebook) Natural Language Processing Recipes: Unlocking Text Data with Machine Learning and Deep Learning Using Python by Akshay Kulkarni, Adarsha Shivananda ISBN 9781484273517, 9781484273500, 1484273508, 1484273516 ebooks 2024
Immediate download (Ebook) Natural Language Processing Recipes: Unlocking Text Data with Machine Learning and Deep Learning Using Python by Akshay Kulkarni, Adarsha Shivananda ISBN 9781484273517, 9781484273500, 1484273508, 1484273516 ebooks 2024
com
OR CLICK HERE
DOWLOAD EBOOK
ebooknice.com
ebooknice.com
(Ebook) Applied Natural Language Processing with Python:
Implementing Machine Learning and Deep Learning Algorithms
for Natural Language Processing by Taweh Beysolow II ISBN
9781484237328, 1484237323
https://ebooknice.com/product/applied-natural-language-processing-
with-python-implementing-machine-learning-and-deep-learning-
algorithms-for-natural-language-processing-7185412
ebooknice.com
ebooknice.com
https://ebooknice.com/product/sat-ii-success-
math-1c-and-2c-2002-peterson-s-sat-ii-success-1722018
ebooknice.com
Akshay Kulkarni
Adarsha Shivananda
Natural Language Processing Recipes: Unlocking Text Data with Machine Learning
and Deep Learning Using Python
Akshay Kulkarni Adarsha Shivananda
Bangalore, Karnataka, India Bangalore, Karnataka, India
Introduction������������������������������������������������������������������������������������������������������������xxi
v
Table of Contents
vi
Table of Contents
vii
Table of Contents
Problem��������������������������������������������������������������������������������������������������������������������������������� 55
Solution��������������������������������������������������������������������������������������������������������������������������������� 55
How It Works������������������������������������������������������������������������������������������������������������������������� 55
Problem��������������������������������������������������������������������������������������������������������������������������������� 56
Solution��������������������������������������������������������������������������������������������������������������������������������� 56
How It Works������������������������������������������������������������������������������������������������������������������������� 57
Problem��������������������������������������������������������������������������������������������������������������������������������� 58
Solution��������������������������������������������������������������������������������������������������������������������������������� 58
How It Works������������������������������������������������������������������������������������������������������������������������� 58
Recipe 2-11. Building a Text Preprocessing Pipeline������������������������������������������������������������������ 59
Problem��������������������������������������������������������������������������������������������������������������������������������� 59
Solution��������������������������������������������������������������������������������������������������������������������������������� 59
How It Works������������������������������������������������������������������������������������������������������������������������� 60
viii
Table of Contents
ix
Table of Contents
x
Table of Contents
Solution������������������������������������������������������������������������������������������������������������������������������� 131
How It Works����������������������������������������������������������������������������������������������������������������������� 131
Recipe 4-11. Translating Speech���������������������������������������������������������������������������������������������� 132
Problem������������������������������������������������������������������������������������������������������������������������������� 132
Solution������������������������������������������������������������������������������������������������������������������������������� 132
How It Works����������������������������������������������������������������������������������������������������������������������� 132
xi
Table of Contents
xii
Table of Contents
Index��������������������������������������������������������������������������������������������������������������������� 277
xiii
About the Authors
Akshay Kulkarni is a renowned AI and machine learning
evangelist and thought leader. He has consulted several
Fortune 500 and global enterprises on driving AI and
data science–led strategic transformation. Akshay has
rich experience in building and scaling AI and machine
learning businesses and creating significant impact. He
is currently a data science and AI manager at Publicis
Sapient, where he is part of strategy and transformation
interventions through AI. He manages high-priority
growth initiatives around data science and works on
various artificial intelligence engagements by applying
state-of-the-art techniques to this space.
Akshay is also a Google Developers Expert in machine learning, a published author
of books on NLP and deep learning, and a regular speaker at major AI and data science
conferences.
In 2019, Akshay was named one of the top “40 under 40 data scientists” in India.
In his spare time, he enjoys reading, writing, coding, and mentoring aspiring data
scientists. He lives in Bangalore, India, with his family.
xv
About the Authors
xvi
About the Technical Reviewer
Aakash Kag is a data scientist at AlixPartners and is a
co-founder of the Emeelan application. He has six years
of experience in big data analytics and has a postgraduate
degree in computer science with a specialization in big data
analytics. Aakash is passionate about developing social
platforms, machine learning, and meetups, where he often
talks.
xvii
Acknowledgments
We are grateful to our families for their motivation and constant support.
We want to express our gratitude to out mentors and friends for their input,
inspiration, and support. A special thanks to Anoosh R. Kulkarni, a data scientist at
Quantziq, for his support in writing this book and his technical input. A big thanks to the
Apress team for their constant support and help.
Finally, we would like to thank you, the reader, for showing an interest in this book
and making your natural language processing journey more exciting.
Note that the views and opinions expressed in this book are those of the authors.
xix
Introduction
According to industry estimates, more than 80% of the data being generated is in an
unstructured format in the form of text, images, audio, or video. Data is being generated
as we speak, write, tweet, use social media platforms, send messages on messaging
platforms, use ecommerce to shop, and do various other activities. The majority of this
data exists in textual form.
So, what is unstructured data? Unstructured data is information that doesn't reside
in a traditional relational database. Examples include documents, blogs, social media
feeds, pictures, and videos.
Most of the insights are locked within different types of unstructured data. Unlocking
unstructured data plays a vital role in every organization wanting to make improved and
better decisions. This book unlocks the potential of textual data.
Textual data is the most common and comprises more than 50% of unstructured
data. Examples include tweets/posts on social media, chat conversations, news, blogs,
articles, product or services reviews, and patient records in the healthcare sector. Recent
examples include voice-driven bots like Siri and Alexa.
xxi
Introduction
To retrieve significant and actionable insights from textual data and unlock its
potential, we use natural language processing coupled with machine learning and deep
learning.
But what is natural language processing? Machines and algorithms do not
understand text or characters, so it is very important to convert textual data into
a machine-understandable format (like numbers or binary) to analyze it. Natural
language processing (NLP) allows machines to understand and interpret the human
language.
If you want to use the power of unstructured text, this book is the right starting point.
This book unearths the concepts and implementation of natural language processing
and its applications in the real world. NLP offers unbounded opportunities for solving
interesting problems in artificial intelligence, making it the latest frontier for developing
intelligent, deep learning–based applications.
xxii
Introduction
The book covers both fundamental and state-of-the-art techniques used in machine
learning applications and deep learning natural language processing. This edition
includes various advanced techniques to convert text to features, like GloVe, ELMo,
and BERT. It also explains how transformers work, using Sentence-BERT and GPT as
examples.
The book closes by discussing some of the advanced industrial applications of
NLP with a solution approach and implementation, also leveraging the power of deep
learning techniques for natural language processing and natural language generation
problems, employing advanced RNNs, like long short-term memory, to solve complex
text generation tasks. It also explores embeddings—high-quality representations of
words in a language.
In this second edition, few advanced state-of-art embeddings and industrial
applications are explained along with end-to-end implementation using deep learning.
Each chapter includes several code examples and illustrations.
By the end of the book, you will have a clear understanding of implementing natural
language processing. You will have worked on multiple examples that implement NLP
techniques in the real world. Readers will be comfortable with various NLP techniques
coupled with machine learning and deep learning and its industrial applications,
making the NLP journey much more interesting and improving your Python coding
skills.
xxiii
Introduction
xxiv
Introduction
spaCy is a trending library that comes with the added flavors of a deep learning
framework. Although spaCy doesn’t cover all NLP functionalities, it does many things well.
CoreNLP is a Python wrapper for Stanford CoreNLP. The toolkit provides robust,
accurate, and optimized techniques for tagging, parsing, and analyzing text in various
languages.
There are hundreds of other NLP libraries, but these are the widely used and
important ones.
There is an immense number of NLP industrial applications that are leveraged to
uncover insights. By the end of the book, you will have implemented many of these use
cases, from framing a business problem to building applications and drawing business
insights. The following are some examples.
xxv
Introduction
xxvi
CHAPTER 1
I ntroduction
Before getting into the details of the book, let’s look at generally available data sources.
We need to identify potential data sources that can help with solving data science use
cases.
C
lient Data
For any problem statement, one of the sources is the data that is already present. The
business decides where it wants to store its data. Data storage depends on the type of
business, the amount of data, and the costs associated with the sources. The following
are some examples.
1
© Akshay Kulkarni and Adarsha Shivananda 2021
A. Kulkarni and A. Shivananda, Natural Language Processing Recipes,
https://doi.org/10.1007/978-1-4842-7351-7_1
Chapter 1 Extracting the Data
• SQL databases
• HDFS
• Cloud storage
• Flat files
F ree Sources
A large amount of data is freely available on the Internet. You just need to streamline the
problem and start exploring multiple free data sources.
• Wikipedia
W
eb Scraping
Extracting the content/data from websites, blogs, forums, and retail websites for reviews
with permission from the respective sources using web scraping packages in Python.
There are a lot of other sources, such as news data and economic data, that can be
leveraged for analysis.
2
Chapter 1 Extracting the Data
P
roblem
You want to collect text data using Twitter APIs.
S
olution
Twitter has a gigantic amount of data with a lot of value in it. Social media marketers
make their living from it. There is an enormous number of tweets every day, and every
tweet has some story to tell. When all of this data is collected and analyzed, it gives a
business tremendous insights about their company, product, service, and so forth.
Let’s now look at how to pull data and then explore how to leverage it in the coming
chapters.
How It Works
Step 1-1. Log in to the Twitter developer portal
Log in to the Twitter developer portal at https://developer.twitter.com.
Create your own app in the Twitter developer portal, and get the following keys.
Once you have these credentials, you can start pulling data.
# Install tweepy
!pip install tweepy
3
Chapter 1 Extracting the Data
import numpy as np
import tweepy
import json
import pandas as pd
from tweepy import OAuthHandler
# credentials
consumer_key = "adjbiejfaaoeh"
consumer_secret = "had73haf78af"
access_token = "jnsfby5u4yuawhafjeh"
access_token_secret = "jhdfgay768476r"
# calling API
# Provide the query you want to pull the data. For example, pulling data
for the mobile phone ABC
query ="ABC"
# Fetching tweets
This query pulls the top ten tweets when product ABC is searched. The API pulls
English tweets since the language given is 'en'. It excludes retweets.
Problem
You want to read a PDF file.
4
Chapter 1 Extracting the Data
Solution
The simplest way to read a PDF file is by using the PyPDF2 library.
How It Works
Follow the steps in this section to extract data from PDF files.
Note You can download any PDF file from the web and place it in the location
where you are running this Jupyter notebook or Python script.
pdf = open("file.pdf","rb")
pdf_reader = PyPDF2.PdfFileReader(pdf)
print(pdf_reader.numPages)
page = pdf_reader.getPage(0)
5
Chapter 1 Extracting the Data
print(page.extractText())
pdf.close()
Please note that the function doesn’t work for scanned PDFs.
Problem
You want to read Word files.
Solution
The simplest way is to use the docx library.
How It Works
Follow the steps in this section to extract data from a Word file.
#Install docx
!pip install docx
#Import library
from docx import Document
Note You can download any Word file from the web and place it in the location
where you are running a Jupyter notebook or Python script.
6
Chapter 1 Extracting the Data
doc = open("file.docx","rb")
document = docx.Document(doc)
#create an empty string and call this document. #This document variable
stores each paragraph in the Word document.
#We then create a "for" loop that goes through each paragraph in the Word
document and appends the paragraph.
docu=""
for para in document.paragraphs.
docu += para.text
Problem
You want to read a JSON file/object.
Solution
The simplest way is to use requests and the JSON library.
7
Chapter 1 Extracting the Data
How It Works
Follow the steps in this section to extract data from JSON.
import requests
import json
#output
{
"success": {
"total": 1
},
"contents": {
"quotes": [
{
"quote": "Where there is ruin, there is hope for a treasure.",
"length": "50",
"author": "Rumi",
"tags": [
"failure",
"inspire",
"learning-from-failure"
],
"category": "inspire",
"date": "2018-09-29",
8
Chapter 1 Extracting the Data
"permalink": "https://theysaidso.com/quote/
dPKsui4sQnQqgMnXHLKtfweF/
rumi-where-there-is-ruin-there-is-hope-for-a-treasure",
"title": "Inspiring Quote of the day",
"background": "https://theysaidso.com/img/bgs/
man_on_the_mountain.jpg",
"id": "dPKsui4sQnQqgMnXHLKtfweF"
}
],
"copyright": "2017-19 theysaidso.com"
}
}
#extract contents
q = res['contents']['quotes'][0]
q
#output
{'author': 'Rumi',
'background': 'https://theysaidso.com/img/bgs/man_on_the_mountain.jpg',
'category': 'inspire',
'date': '2018-09-29',
'id': 'dPKsui4sQnQqgMnXHLKtfweF',
'length': '50',
'permalink': 'https://theysaidso.com/quote/dPKsui4sQnQqgMnXHLKtfweF/
rumi-where-there-is-ruin-there-is-hope-for-a-treasure',
'quote': 'Where there is ruin, there is hope for a treasure.',
'tags': ['failure', 'inspire', 'learning-from-failure'],
'title': 'Inspiring Quote of the day'}
#output
It wasn't raining when Noah built the ark....
-- Howard Ruff
9
Chapter 1 Extracting the Data
Problem
You want to read parse/read HTML pages.
Solution
The simplest way is to use the bs4 library.
How It Works
Follow the steps in this section to extract data from the web.
response = urllib2.urlopen('https://en.wikipedia.org/wiki/
Natural_language_processing')
html_doc = response.read()
10
Chapter 1 Extracting the Data
#Parsing
soup = BeautifulSoup(html_doc, 'html.parser')
# Formating the parsed html file
strhtm = soup.prettify()
#output
<!DOCTYPE html>
<html class="client-nojs" dir="ltr" lang="en">
<head>
<meta charset="utf-8"/>
<title>
Natural language processing - Wikipedia
</title>
<script>
document.documentElement.className = document.documentElement.className.
replace( /(^|\s)client-nojs(\s|$)/, "$1client-js$2" );
</script>
<script>
(window.RLQ=window.RLQ||[]).push(function(){mw.config.set({"wgCanonical
Namespace":"","wgCanonicalSpecialPageName":false,"wgNamespaceNumber":
0,"wgPageName":"Natural_language_processing","wgTitle":"Natural language
processing","wgCurRevisionId":860741853,"wgRevisionId":860741853,
"wgArticleId":21652,"wgIsArticle":true,"wgIsRedirect":false,"wgAction":
"view","wgUserName":null,"wgUserGroups":["*"],"wgCategories":["Web
archive template wayback links","All accuracy disputes","Articles
with disputed statements from June 2018","Wikipedia articles with
NDL identifiers","Natural language processing","Computational
linguistics","Speech recognition","Computational fields of stud
11
Chapter 1 Extracting the Data
print(soup.title)
print(soup.title.string)
print(soup.a.string)
print(soup.b.string)
#output
<title>Natural language processing - Wikipedia</title>
Natural language processing - Wikipedia
None
Natural language processing
#sample output
None
Jump to navigation
Jump to search
Language processing in the brain
None
None
automated online assistant
customer service
[1]
computer science
artificial intelligence
natural language
speech recognition
natural language understanding
natural language generation
12
Chapter 1 Extracting the Data
#sample output
Natural language processing (NLP) is an area of computer science and
artificial intelligence concerned with the interactions between computers
and human (natural) languages, in particular how to program computers to
process and analyze large amounts of natural language data.
Note that the p tag extracted most of the text on the page.
Problem
You want to parse text data using regular expressions.
Solution
The best way is to use the re library in Python.
13
Chapter 1 Extracting the Data
How It Works
Let’s look at some of the ways we can use regular expressions for our tasks.
The basic flags are I, L, M, S, U, X.
• re.I ignores casing.
• re.L finds a local dependent.
• re.M finds patterns throughout multiple lines.
• re.S finds dot matches.
• re.U works for Unicode data.
• re.X writes regex in a more readable format.
• Start of a string: ^
• End of a string: $
• Non-word boundary: \B
The re.match() and re.search() functions find patterns, which are then processed
according to the requirements of the application.
Let’s look at the differences between re.match() and re.search().
• re.match() checks for a match only at the beginning of the string. So,
if it finds a pattern at the beginning of the input string, it returns the
matched pattern; otherwise, it returns a noun.
Tokenizing
Tokenizing means splitting a sentence into words. One way to do this is to use re.split.
# Import library
import re
15
Chapter 1 Extracting the Data
#Output
xyz@abc.com
pqr@mno.com
new_email_address = re.sub(r'([\w\.-]+)@([\w\.-]+)',
r'pqr@mno.com', doc)
print(new_email_address)
#Output
For more details please mail us at pqr@mno.com
16
Chapter 1 Extracting the Data
([a-zA-Z0-9+._-]+@[a-zA-Z0-9._-]+\.[a-zA-Z0-9_-]+)
There are even more complex ones to handle all the edge cases (e.g., “.co.in” email
IDs). Please give it a try.
# Import library
import re
import requests
#function to extract
def get_book(url).
# Sends a http request to get the text from project Gutenberg
raw = requests.get(url).text
# Discards the metadata from the beginning of the book
start = re.search(r"\*\*\* START OF THIS PROJECT GUTENBERG EBOOK
.* \*\*\*",raw ).end()
# Discards the metadata from the end of the book
stop = re.search(r"II", raw).start()
# Keeps the relevant text
text = raw[start:stop]
return text
# processing
def preprocess(sentence).
return re.sub('[^A-Za-z0-9.]+' , ' ', sentence).lower()
17
Chapter 1 Extracting the Data
book = get_book(url)
processed_book = preprocess(book)
print(processed_book)
# Output
produced by martin adamson david widger with corrections by andrew
sly the idiot by fyodor dostoyevsky translated by eva martin
part i i. towards the end of november during a thaw at nine o
clock one morning a train on the warsaw and petersburg railway
was approaching the latter city at full speed. the morning was so
damp and misty that it was only with great difficulty that the day
succeeded in breaking and it was impossible to distinguish anything
more than a few yards away from the carriage windows. some of the
passengers by this particular train were returning from abroad
but the third class carriages were the best filled chiefly with
insignificant persons of various occupations and degrees picked up
at the different stations nearer town. all of them seemed weary and
most of them had sleepy eyes and a shivering expression while their
complexions generally appeared to have taken on the colour of the
fog outside. when da
#Output
302
#output
produced by martin adamson david widger with corrections by
andrew sly the idiot by fyodor dostoyevsky translated by eva
martin part I i. towards the end of november during a thaw at
nine o clock one morning a train on the warsaw and petersburg
18
Chapter 1 Extracting the Data
#output
['ironical--it',
'malicious--smile',
'fur--or',
'astrachan--overcoat',
'it--the',
'Italy--was',
'malady--a',
'money--and',
'little--to',
'No--Mr',
'is--where',
'I--I',
'I--',
'--though',
'crime--we',
'or--judge',
'gaiters--still',
'--if',
'through--well',
'say--through',
19
Chapter 1 Extracting the Data
'however--and',
'Epanchin--oh',
'too--at',
'was--and',
'Andreevitch--that',
'everyone--that',
'reduce--or',
'raise--to',
'listen--and',
'history--but',
'individual--one',
'yes--I',
'but--',
't--not',
'me--then',
'perhaps--',
'Yes--those',
'me--is',
'servility--if',
'Rogojin--hereditary',
'citizen--who',
'least--goodness',
'memory--but',
'latter--since',
'Rogojin--hung',
'him--I',
'anything--she',
'old--and',
'you--scarecrow',
'certainly--certainly',
'father--I',
'Barashkoff--I',
'see--and',
'everything--Lebedeff',
'about--he',
20
Chapter 1 Extracting the Data
'now--I',
'Lihachof--',
'Zaleshoff--looking',
'old--fifty',
'so--and',
'this--do',
'day--not',
'that--',
'do--by',
'know--my',
'illness--I',
'well--here',
'fellow--you']
Problem
You want to explore handling strings.
Solution
The simplest way is to use the following string functionality.
How It Works
Now let’s look at a few of the examples.
Replacing Content
Create a string and replace the content. Creating strings is easy. It is done by enclosing
the characters in single or double quotes. And to replace, you can use the replace
function.
1. Create a string.
print(String_v1[0])
#output
"I"
print(String_v1[5:14])
#output
exploring
22
Discovering Diverse Content Through
Random Scribd Documents
public of certain classics in the nude Roman poetry, like the Arab,
and of the same date."
Certainly Burton leaves out nothing of the nakedness that startles
one in the verse of Catullus: a nakedness that is as honest as
daylight and as shameless as night. When the text is obscene his
translation retains its obscenity; which, on the whole, is rare: for the
genius of Catullus is elemental, primitive, nervous, passionate,
decadent in the modern sense and in the modern sense perverse. In
his rhymed version of the Attis Burton has made a prodigious
attempt to achieve the impossible. Not being a poet, he was
naturally unable to follow the rhythm—the Galliambic metre, in
which Catullus obtains variety of rhythm; for, as Robinson Ellis says:
II
Burton himself admitted that he was a devil; for, said he: "the Devil
entered into me at Oxford." Evidently, also, besides his mixture of
races, he was a mixture of the normal and the abnormal; he was
perverse and passionate; he was imaginative and cruel; he was
easily stirred to rage. Nearly six feet in height, he had, together with
his broad shoulders, the small hands and feet of the Orientals; he
was Arab in his prominent cheek-bones; he was gypsy in his terrible,
magnetic eyes—the sullen eyes of a stinging serpent. He had a
deeply bronzed complexion, a determined mouth, half-hidden by a
black mustache, which hung down in a peculiar fashion on both
sides of his chin. This peculiarity I have often seen in men of the
wandering tribe in Spain and in Hungary. Wherever he went he was
welcomed by the gypsies; he shared with them their horror of a
corpse, of death-scene, and of graveyards. "He had the same
restlessness," wrote his wife, "which could stay nowhere long nor
own any spot on earth. Hagar Burton, a Gypsy woman, cast my
horoscope, in which she said: 'You will bear the name of our Tribe,
and be right proud of it. You will be as we are, but far greater than
we.' I met Richard two months later, in 1856, and was engaged to
him." It is a curious fact that John Varley, who cast Blake's
horoscope in 1820, also cast Burton's; who, as he says, had finished
his Zodiacal Physiognomy so as to prove that every man resembled
after a fashion the sign under which he was born. His figures are
either human or bestial; some remind me of those where men are
represented in the form of animals in Giovanni della Porta's
Fisonomia dell' Huomo (Venice, 1668), which is before me as I write;
Swinburne himself once showed to me his copy of the same book.
Nor have I ever forgotten his saying to me—in regard to Burton's
nervous fears: "The look of unspeakable horror in those eyes of his
gave him, at times, an almost unearthly appearance." He added:
"This reminds me of what Kiomi says in Meredith's novel: 'I'll dance
if you talk of dead people,' and so begins to dance and to whoop at
the pitch of her voice. I suppose both had the same reason for this
force of fear: to make the dead people hear." Then he flashed at me
this unforgettable phrase: "Burton had the jaw of a Devil and the
brow of a God."
In one of his letters he says, I suppose by way of persiflage in
regard to himself and Burton: "En moi vous voyez Les Malheurs de la
Virtu, en lui Les Prospérités du Vice." In any case, it is to entertain
Burton when he writes: "I have in hand a scheme of mixed verse
and prose—a sort of étude à la Balzac plus the poetry—which I
flatter myself will be more offensive and objectionable to Britannia
than anything I have done: Lesbia Brandon. You see I have now a
character to keep up, and by the grace of Cotytto I will."
Swinburne began Lesbia Brandon in 1859; he never finished it; what
remains of it consists of seventy-three galleys, numbered 25 to 97,
besides four unprinted chapters. The first, "A Character," was written
in 1864; "An Episode" in 1866; "Turris Eburnea" in 1886; "La
Bohême Dédorée" must have been written a year or two later. Mr.
Gosse gives a vivid description of Swinburne, who was living in 13,
Great James Street, and who was never weary of his unfinished
novel, reading to him parts of two chapters in June, 1877. "He read
two long passages, the one a ride over a moorland by night, the
other the death of his heroine, Lesbia Brandon. After reading aloud
all these things with amazing violence, he seemed quite exhausted."
It is possible to decipher a few sentences from two pages of his
manuscript; first in "Turris Eburnea. 'Above the sheet, below the
boudoir,' said the sage. Her ideal was marriage, to which she clung,
which revealed to astonished and admiring friends the vitality of a
dubious intellect within her. She had not even the harlot's talent of
discernment." This is Leonora Harley. In La Bohême Dédorée we
read:
Two nights later Herbert received a note from Mr. Linley inviting
him to a private supper. Feverish from the contact of Mariani
and hungry for a chance of service, he felt not unwilling to win
a little respite from the vexation of patience. The sage had
never found him more amenable to the counsel he called
reason. Miss Brandon had not lately crossed his ways. Over their
evening Leonora Harley guided with the due graces of her
professional art. It was not her fault if she could not help asking
her younger friend when he had last met a darker beauty: she
had seen him once with Lesbia.
III
IV
It was nine years before then, when they were together in the south
of France, that Swinburne was seized by a severe illness; and, as he
assured me, it was Burton who, with more than a woman's care and
devotion, restored him to health. The pledge—it was not the
covenant sealed between the two greatest, the two most passionate,
lovers in the world, Iseult and Tristan, on the deck of that ship which
was the ship of Life, the ship of Death, in the mere drinking of wine
out of a flagon, which, being of the nature of a most sweet poison,
consumed their limbs and gave intoxication to their souls and to
their bodies—but a pledge in the wine Swinburne and Burton drank
in the hot sunshine:—
For life's helm rocks to windward and lee,
And time is as wind, and waves are we,
And song is as foam that the sea-waves fret,
Though the thought at its heart should be deep as the
sea
It was in July, 1869, that Swinburne joined the Burtons and Mrs.
Sartoris at Vichy. As I have never forgotten Swinburne's wonderful
stories about Burton—besides those on Rossetti and Mazzini—I find
in a letter of his to his mother words he might really have altered.
If you had seen him, when the heat and the climb and the
bothers of travelling were too much for me—in the very hot
weather—helping, waiting on me—going out to get me books to
read in bed—and always kind, thoughtful, ready, and so bright
and fresh that nothing but a lizard (I suppose that is the most
insensible thing going) could have resisted his influence—I feel
sure you would like him (you remember you said you didn't) and
then—love him, as I do. I never expect to see his like again—
but him I do hope to see again, and when the time comes to
see him at Damascus as H.B.M. Consul.
I have been assured, by many who knew him, that Richard Burton
had a vocabulary which was one of his inventions; a shameless one
—as shameless as the vocabularies invented by Paul Verlaine and by
Henri de Toulouse-Lautrec, which are as vivid to me as when I heard
their utterance. These shared with Villiers de Isle-Adam that sardonic
humor which is not so much satire as the revenge of beauty on
ugliness, the persecution of the ugly: the only laughter of our
generation which is as fundamental as that of Rabelais and of Swift.
Burton, who had much the same contempt for women that
Baudelaire imagined he had, only with that fixed stare of his that
disconcerted them, did all that with deliberate malice. There was
almost nothing in this world that he had not done, exulted in, gloried
in. Like Villiers, he could not pardon stupidity; to both it was
incomprehensible; both saw that stupidity is more criminal than even
vice, if only because stupidity is incurable, if only because vice is
curable. Burton, who found the Arabs, in their delicate depravity,
ironical—irony being their breath of life—might have said with
Villiers: "L'Esprit du Siècle, ne l'oublions pas, est aux machines."
Every individual face has as many different expressions as the soul
behind it has moods; therefore, the artist's business is to create on
paper, or on his canvas, the image which was none of these, but
which those helped to make in his own soul. I see, as it were, surge
before me an image of Swinburne in his youth, when, with his
passionate and pale face, with its masses of fiery hair, he has almost
the aspect of Ucello's Galeazzo Malatesta. Burton's face has no
actual beauty in it; it reveals a tremendous animalism, an air of
repressed ferocity, a devilish fascination. There is almost a tortured
magnificence in this huge head, tragic and painful, with its mouth
that aches with desire, with those dilated nostrils that drink in I
know not what strange perfumes.
EDGAR SALTUS
Edgar Saltus owes much of his bizarre talent to his mixed origin, for
he is of Dutch and American extraction; indeed, for much of what I
might call his rather unholy genius. His pages exhale a kind of exotic
and often abnormal perfume of colors, color of sensations, of heats,
of crowded atmospheres. He gives his women baneful and baleful
names, such as Stella Sixmouth, Shorn Wyvell; these vampires and
wicked creatures who ruin men's lives as cruelly as they ruin their
own. His men have prodigious nerves, even more than his women;
they commit all sorts of crimes, assassinations, poisonings, out of
sheer malice and out of overexcited imaginations.
Of that most terrible of tragedies, the tragedy of a soul, he is for the
most part utterly unconscious; and the very abracadabra of his art is
in a sense—a curious enough and ultramodern sense—lifted from
the Elizabethan dramatists. In them—as in many of his pages—a fine
situation must have a murder in it, and some odious character
removed by another more stealthy kind of obliteration. But, when he
gives one a passing shudder, he leaves nothing behind it; yet in his
perverted characters there can be found sensitiveness,
hallucinations, obsessions; and some have that lassitude which is
more than mere contempt. Some go solemnly on the path of blood,
with no returning by a way so thronged with worse than memories.
"No need for more crime," such men have cried, and for such
reasons reaped the bitter harvest of tormenting dreams. Some have
imagination that stands in the place of virtue; some, as in the case
of Lady Macbeth, still keep the sensation of blood on their guilty
hands.
Mary of Magdala (1891) is a vain attempt to do what Flaubert had
done before Saltus in his Hérodias, and what Wilde has done after
him in Salome, a drama that has a strange not easily defined
fascination, which I can not dissociate from Beardsley's illustrations,
in which what is icily perverse in the dialogue (it can not be
designated drama) becomes in the ironical designs pictorial, a series
of poses. To Wilde passion was a thing to talk about with elaborate
and colored words. Salome is a doll, as many have imagined her,
soulless, set in motion by some pitiless destiny, personified
momentarily by her mother; Herod is a nodding mandarin in a
Chinese grotesque.
In one page of Saltus's Oscar Wilde: An Idler's Impressions (1917)
he evokes, with his cynical sense of the immense disproportion of
things in this world and the next, the very innermost secret of Wilde.
They dine in a restaurant in London and Wilde reads his MS.
"Suddenly his eyes lifted, his mouth contracted, a spasm of pain—or
was it dread?—had gripped him, a moment only. I had looked away.
I looked again. Before me was a fat pauper, florid and over-dressed,
who in the voice of an immortal, was reading the fantasies of the
damned. In his hand was a manuscript, and we were supping on
Salome."
Mr. Incoul's Misfortune seems to have its origin in some strange
story of Poe's; for it gives one the sense of a monster, diabolical,
inhuman, malevolent and merciless, who, after a mock marriage,
abnormally sets himself to the devil's business of ruining his wife's
lover's life, and of giving his wife a sudden death in three hideous
forms: a drug to make her sleep, the gas turned on; and the door
locked with "a nameless instrument."
The Truth about Tristan Varick (1888) is based on social problems of
the most unaccountable kind. It has something strangely convincing
in both conception and execution; it has suspense, ugly enough and
uglier crises; and that the unlucky Varick is supposed to be partially
insane is part of the finely woven plot, which is concerned with
strange and perilous incidents and accidents; and which is based on
his passionate pursuit of the ravishing Viola Raritan; the pursuit,
really, of the chimera of his imagination.
And among the hazards comes one, of an evil kind—such as I have
often experienced in foreign cities—that, in turning down one street
instead of the next, a man's existence, and not his only, may be
thereby changed. To have stopped one's rival's lying mouth and his
lying life at the same instant is to have done something original—it is
done by a poisoned pin's point. Then, this Orestes having found no
Electra to return his love, but finding her vile, he lets himself
disappear out of life in an almost incredible fashion, leaving the
woman who never loved him to say, "I will come to see him
sentenced:" a sentence which writes her down a modern
Clytemnestra.
What Saltus says of Gonfallon can almost be said of Saltus: "With a
set of people that fancied themselves in possession of advanced
views and were still in the Middle Ages, he achieved the impossible:
he not only consoled, he flattered, he persuaded and fascinated as
well." Saltus can not console, he can sometimes persuade; but he
can flatter and fascinate his public, as with
A breeze of fame made manifest.
The novelist is the comedian of the pen: it is his duty to amuse, to
entertain—or else to hold his peace: to one in his trade nothing
imaginable comes amiss. It is not sin that appeals him, but the
consequences of sin; such as the fact that few sinners have ever
turned into saints. In a word, he writes with his nerves.
Take, for instance, A Transaction of Hearts (1887), one of the
queerest novels ever written and written with a kind of deliberate
malice. Gonfallon, who becomes a bishop, falls passionately in love
with an ardent and insolent girl who is his wife's sister; and before
her beauty everything vanishes: virtue, genius, everything. "For a
second that was an eternity he was conscious of her emollient
mouth on his, her fingers intertwined with his own. For that second
he really lived—perhaps he really lived." One wonders why Saltus
uses so many ugly phrases—a kind of decadent French fashion of
transposing words; such as the one I have quoted, together with
"Ruedelapaixia" (meant to describe a dress), "Rafflesia, Mashed
grasshoppers baked in saffron;" phrases chosen at random which
are too frequently scattered in much too obvious a profusion over
much too luxurious pages. I read somewhere that Oscar Wilde said
to Amélie Rives: "In Edgar Saltus's work passion struggles with
grammar on every page," which is certainly one of Wilde's finest
paradoxes. I "cap this"—as Dowson often said to me in jest—with
Léon Bloy's admirable phrase on Huysmans: "That he drags his
images by the heels or the hair upside down the worm-eaten
staircase of terrified syntax."
Imperial Purple (1906) shows the zenith of Saltus's talent, not in
conceiving imaginary beings, but in giving modern conceptions of
the most amazing creatures in the Roman Decadence, and in lyrical
prose, which ought to have had for motto Victoria's stanza:—
Je suis l'Empire à la fin de la décadence,
Qui regarde passer les grands Barbares blancs,
En composant des acrostiches indolents,
D'un style d'or où la langueur du soleil danse.
Only Saltus is not Tacitus, in spite of having delved into his pages.
RECOLLECTIONS OF RÉJANE
NOTES ON THE ART OF THE GREAT FRENCH
ACTRESS
Here, in Ma Cousine, she abandons herself to all the frank and shady
humors of the thing with the absolute abandonment of the artist. It
is like a picture by Forain, made of the same material with the same
cynicism and with the same mastery of line.
Ma Cousine, on seeing it a second time, is frankly and not too
obviously amusing, a piece in which everybody plays at something,
in which Réjane plays at being an actress who has a part to act in
real life. "Elle est impayable, cette Riquette!" And it is with an
intensely conscious abandonment of herself that she renders this
good-hearted Cabotine, so worldly wise, so full of all the physical
virtues, turned Bohemian. She has, in this part, certain guttural and
nasal laughs, certain queer cries and shouts, which are after all a
part of her métier; she runs through her whole gamut of shrugs and
winks and nods. There is, of course, over again, the famous Chahut,
in which she summarizes the whole art of the Moulin-Rouge; there is
her long scene of pantomime, in which every gesture is at once
vulgar and distinguished, vulgarly rendered with distinction. There
are other audacities, all done with equal discretion.
I am not sure that Réjane is not at her best in this play: she has
certainly never been more herself in what one fancies to be herself.
There is all her ravishing gaminerie, her witty intelligence, her dash,
her piquancy, her impudence, her mastery. I find that her high
spirits, in this play, affect me like pathos: they run to a kind of
emotion. I compared her art with the art of Forain; I said that here
was a picture, made out of the same material, with the same
cynicism, the same mastery of line. She suggested, in her costume
of the Second Act, a Beardsley picture; there was the same kind of
tragic grotesque, in which a kind of ugliness became a kind of
beauty. The whole performance was of the best Parisian kind, with
genius in one, admirably disciplined talent in all.
"MADAME SANS-GÊNE"
La Parisienne of Henri Becque, like most of his plays, has never lost
its interest, like the topical plays of that period. It is a hard, ironical
piece of realism, founded on a keen observation of life and on
certain definite ideas. It is called a comedy, but there is no
straightforward fun in it, as in Ma Cousine, for instance; it has all
that transposed sadness which we call irony. It shows us rather a
mean gray world, rather contemptuously; and it leaves us with a
bitter taste in the mouth. That is, if one takes it seriously. Part of the
actor's art in such a piece is to prevent one from taking it too
seriously.
Throughout Réjane is the faultless artist, and her acting is so much
of a piece that it is difficult to praise it in detail. A real woman lives
before one, seems to be overseen on the stage at certain moments
of her daily existence. We see her life going on, not, as with Duse, a
profound inner life, but the life of the character, a vivid, worldly life,
hard, selfish, calculating, deceiving naturally, naturally wary, the
woman of the world, the Parisian. Compare Clotilde with Sapho and
you will see two opposite types rendered with an equal skill; the
woman in love, to whom nothing else matters, and the woman with
lovers, the (what shall I say?) business woman of the emotions.
There is a moment near the beginning where Lafont asks Clotilde if
she has been to see her milliner or her dressmaker, and she answers
sarcastically: "Both!" Her face, as she submits to the question, has
an absurd stare, a stare of profound dissimulation, with something
of a cat who waits. Her whole character, her whole plan of campaign
are in that moment; they but show themselves more pointedly, later
on, when her nerves get the better of her through all the
manifestations of her impatience, up to the return into herself at the
end of the second act, when she stands motionless and speechless,
while her lover entreats her, upbraids her, finally insults her. Her
face, her whole body, endures, wearied into a desperate languor,
seething with suppressed rage and exasperation; at last, her whole
body droops on itself, as if it Can no longer stand upright.
Throughout she speaks with that somewhat discontented grumbling
tone which she can make so expressive; she empties her speech
with little side shrugs of one shoulder, her sinister right eye speaks a
whole subtle language of its own. The only moments throughout the
play when I found anything to criticize are the few moments of
pathos, when she becomes Sarah at second hand.
After La Parisienne came Lolotte, a one-act play of Meilhac and
Halévy. It is amusing, and it gives Réjane the opportunity of showing
us little samples of nearly all her talents. She is both canaille and
bonne fille; above all she is triumphantly, defiantly clever. Again I
was reminded of a Forain drawing: for here is an art which does
everything that it is possible to do with a given material, and what
more can one demand of an artist?
"LA ROBE ROUGE"
The dance is life, animal life, having its own way passionately. Part
of that natural madness which men were once wise enough to
include in religion, it began with the worship of the disturbing
deities, the gods of ecstasy, for whom wantonness and wine, and all
things in which energy passes into evident excess, were sacred.
From the first it has mimed the instincts; but we lose ourselves in
the boundless bewilderments of its contradictions.
As the dancers dance, under the changing lights, so human, so
remote, so desirable, so evasive, coming and going to the sound of a
thin heady music which marks the rhythm of their movements like a
kind of clinging drapery, they seem to sum up in themselves the
appeal of everything in the world that is passing and colored and to
be enjoyed. Realizing all humanity to be but a mask of shadows, and
this solid world an impromptu stage as temporary as they, it is with
a pathetic desire of some last illusion, which shall deceive even
ourselves, that we are consumed with this hunger to create, to make
something for ourselves, if at least the same shadowy reality as that
about us. The art of the ballet awaits us, with its shadowy and real
life, its power of letting humanity drift into a rhythm so much of its
own, and with ornament so much more generous than its wont.
And, as all this is symbolical, a series of living symbols, it can but
reach the brain through the eyes, in the visual and imaginative way,
so that the ballet concentrates in itself a great deal of the modern
ideal in matters of artistic impression.
I am avid of impressions and sensations; and in the Russian Ballet at
the Coliseum, certainly, there is a new impression of something not
easily to be seen elsewhere. I need not repeat that, in art, rhythm
means everything. And there can be a kind of rhythm even in
scenery, such as one sees on the stage. Convention, even here, as in
all plastic art, is founded on natural truth very closely studied. The
rose is first learned, in every wrinkle of its petals, petal by petal,
before that reality is elaborately departed from, in order that a new,
abstract beauty may be formed out of these outlines, all but those
outlines being left out.
So, in these Russian Ballets, so many of which are founded on
ancient legends, those who dance and mime and gesticulate have at
once all that is humanity and more than is in humanity. And their
place there permits them, without disturbing our critical sense of the
probability of things, to seem to assume a superhuman passion; for,
in the Art of the Ballet, reality must fade into illusion, and then
illusion must return into a kind of unreal reality.
The primitive and myth-making imagination of the Russians shows a
tendency to regard metaphors as real and to share these tendencies
with the savage, that is to say with the savagery that is in them,
dependent as they are on rudimentary emotions. Other races, too
long civilized, have accustomed themselves to the soul, to mystery.
Russia, with centuries of savagery behind it, still feels the earth
about its roots, and the thirst in it of the primitive animal. It has lost
none of its instincts, and it has just discovered the soul. So, in these
enigmatical dancers, the men and the women, who emerge before
us, across the flaming gulf of the footlights, who emerge as they
never did in any ballet created by Wagner, one finds the
irresponsibility, the gaiety, the sombreness, of creatures who exist on
the stage for their own pleasure and for the pleasure of pleasing us,
and in them something large and lyrical, as if the obscure forces of
the earth half-awakened had begun to speak. And these live,
perhaps, an exasperated life—the life of the spirit and of the senses
—as no others do; a life to most people inconceivable; to me, who
have traveled in Russia, conceivable.
In what is abstract in Russian music there is human blood. It does
not plead and implore like Wagner's. It is more somber, less carnal,
more feverish, more unsatisfied in the desire of the flesh, more
inhuman, than the ballet music in Parsifal. Even in that music,
though shafts of light sometimes pierce the soul like a sword, there
is none of the peace of Bach; it has the unsatisfied desire of a kind
of flesh of the spirit. But in Tchaikovsky's music the violins run up
and down the scales like acrobats; and he can deform the rhythms
of nature with the caprices of half-civilized impulses. In your delight
in finding any one so alive, you are inclined to welcome him without
reserve, and to forget that a man of genius is not necessarily a great
artist, and that, if he is not a great artist, he is not a quite
satisfactory man of genius.
When I heard his music in The Enchanted Princess I was struck by
the contrast of this ballet music with the overture to Francesca da
Rimini I had heard years before. The red wind of hell, in which the
lovers are afloat, blows and subsides. There is a taste of sulphur in
the mouth as it ends, after the screams and spasms. Scrawls of hell-
fire rush across the violins into a sharpened agony; above all, not
Dante's; always hell-fire, not the souls of unhappy lovers who have
loved too well.
Lydia Lopokova is certainly a perfect artist, whose dancing is a
delight to the eyes, as her miming appeals to the senses. She has
passion, and of an excitable kind; in a word, Russian passion. She
can be delicious, malicious, abrupt in certain movements when she
walks; she has daintiness and gaiety; her poses and poises are
exquisite; there is an amazing certainty in everything she does. A
creature of sensitive nerves, in whom the desire of perfection is the
same as her desire for fame, she is on the stage and off the stage
essentially the same; and in her conversations with me I find
imagination, an unerring instinct, an intense thirst for life and for her
own art; she has la joie de vivre.
Her technique, of course, is perfect; and, as in the case of every
artist, it is the result of tireless patience. Technique and the artist:
that is a question of interest to the student of every art. Without
technique, perfect of its kind, no one is worth consideration in any
art. The rope-dancer or the acrobat must be perfect in technique
before he appears on the stage at all; in his case, a lapse from
perfection brings its own penalty, death perhaps; his art begins
when his technique is already perfect. Artists who deal in materials
less fragile than human life should have no less undeviating a sense
of responsibility to themselves and to art. So Ysaye seems to me the
type of the artist, not because he is faultless in technique, but
because he begins to create his art at the point where faultless
technique leaves off.
Lubov Tchernicheva is a snake-like creature, beautiful and hieratic,
solemn; and in her aspect, as in her gestures, a kind of Russian
Cleopatra. Swinburne might have sung of her as he sang of the
queen who ruled the world and Antony:—
Her mouth is fragrant as a vine,
A vine with birds in all its boughs;
Serpent and scarab for a sign
Between the beauty of her brows
And the amorous deep lids divine.
And it is a revelation to our jaded imaginations of much less jaded
imaginations. These may be supposed to be characters in
themselves of little interest to the world in general; to have come by
strange accident from the ends of the world. Yet these are thrown
into chosen situations, apprehended in some delicate pauses of life;
they have their moments of passion thrown into relief in an exquisite
way. To discriminate them we need a cobweb of illusions, double
and treble reflections of the mind upon itself, with the artificial light
of the stage cast over them and, as it were, constructed and broken
over this or that chosen situation—on how fine a needle's point that
little world of passion is balanced!
II
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.
ebooknice.com