0% found this document useful (0 votes)
6 views67 pages

14370824

The document provides information about various ebooks related to Natural Language Processing (NLP) and deep learning techniques, highlighting titles by authors such as Taweh Beysolow II and Jason Brownlee. It includes links to download these ebooks in different formats and emphasizes the use of Python for implementing machine learning and deep learning algorithms. Additionally, it outlines the structure and content of the book 'Applied Natural Language Processing with Python,' which covers foundational concepts and advanced NLP tasks.

Uploaded by

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

14370824

The document provides information about various ebooks related to Natural Language Processing (NLP) and deep learning techniques, highlighting titles by authors such as Taweh Beysolow II and Jason Brownlee. It includes links to download these ebooks in different formats and emphasizes the use of Python for implementing machine learning and deep learning algorithms. Additionally, it outlines the structure and content of the book 'Applied Natural Language Processing with Python,' which covers foundational concepts and advanced NLP tasks.

Uploaded by

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

Download the Full Ebook and Access More Features - 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

OR CLICK HERE

DOWLOAD EBOOK

Download more ebook instantly today at https://ebooknice.com


Instant digital products (PDF, ePub, MOBI) ready for you
Download now and discover formats that fit your needs...

Start reading on any device today!

(Ebook) Python Natural Language Processing: Advanced machine learning and deep
learning techniques for natural language processing by Jalaj Thanaki ISBN
9781787121423, 1787121429

https://ebooknice.com/product/python-natural-language-processing-advanced-
machine-learning-and-deep-learning-techniques-for-natural-language-
processing-7212480

ebooknice.com

(Ebook) Deep Learning for Natural Language Processing: Develop Deep Learning Models
for Natural Language in Python by Jason Brownlee

https://ebooknice.com/product/deep-learning-for-natural-language-processing-
develop-deep-learning-models-for-natural-language-in-python-11575184

ebooknice.com

(Ebook) Deep Learning for Natural Language Processing: Develop Deep Learning Models
for your Natural Language Problems by Jason Brownlee

https://ebooknice.com/product/deep-learning-for-natural-language-processing-
develop-deep-learning-models-for-your-natural-language-problems-42525080

ebooknice.com

(Ebook) Natural Language Processing Recipes: Unlocking Text Data with Machine
Learning and Deep Learning Using Python by Akshay Kulkarni, Adarsha Shivananda ISBN
9781484273500, 1484273508

https://ebooknice.com/product/natural-language-processing-recipes-unlocking-
text-data-with-machine-learning-and-deep-learning-using-python-34204404

ebooknice.com
(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

https://ebooknice.com/product/natural-language-processing-recipes-unlocking-
text-data-with-machine-learning-and-deep-learning-using-python-34204734

ebooknice.com

(Ebook) Deep Learning for Natural Language Processing: Creating Neural Networks with
Python by Palash Goyal, Sumit Pandey, Karan Jain ISBN 9781484236840, 148423684X

https://ebooknice.com/product/deep-learning-for-natural-language-processing-
creating-neural-networks-with-python-50195740

ebooknice.com

(Ebook) Applied Reinforcement Learning with Python: With OpenAI Gym, Tensorflow, and
Keras by Beysolow II, Taweh ISBN 9781484251263, 1484251261

https://ebooknice.com/product/applied-reinforcement-learning-with-python-with-
openai-gym-tensorflow-and-keras-55666056

ebooknice.com

(Ebook) Getting started with Deep Learning for Natural Language Processing: Learn
how to build NLP applications with Deep Learning by Sunil Patel ISBN 9789389898118,
9389898110

https://ebooknice.com/product/getting-started-with-deep-learning-for-natural-
language-processing-learn-how-to-build-nlp-applications-with-deep-
learning-36407330

ebooknice.com

(Ebook) Deep Learning for Natural Language Processing (MEAP V07) by Stephan
Raaijmakers ISBN 9781617295447, 1617295442

https://ebooknice.com/product/deep-learning-for-natural-language-processing-
meap-v07-12156196

ebooknice.com
Applied Natural
Language Processing
with Python
Implementing Machine Learning
and Deep Learning Algorithms for
Natural Language Processing

Taweh Beysolow II
Applied Natural
Language Processing
with Python
Implementing Machine
Learning and Deep Learning
Algorithms for Natural
Language Processing

Taweh Beysolow II
Applied Natural Language Processing with Python
Taweh Beysolow II
San Francisco, California, USA

ISBN-13 (pbk): 978-1-4842-3732-8     ISBN-13 (electronic): 978-1-4842-3733-5


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

About the Technical Reviewer�������������������������������������������������������������xi


Acknowledgments�����������������������������������������������������������������������������xiii
Introduction����������������������������������������������������������������������������������������xv

Chapter 1: What Is Natural Language Processing?������������������������������1


The History of Natural Language Processing��������������������������������������������������������2
A Review of Machine Learning and Deep Learning����������������������������������������������4
NLP, Machine Learning, and Deep Learning Packages with Python����������������4
Applications of Deep Learning to NLP�����������������������������������������������������������10
Summary������������������������������������������������������������������������������������������������������������12

Chapter 2: Review of Deep Learning��������������������������������������������������13


Multilayer Perceptrons and Recurrent Neural Networks������������������������������������13
Toy Example 1: Modeling Stock Returns with the MLP Model�����������������������15
Vanishing Gradients and Why ReLU Helps to Prevent Them��������������������������27
Loss Functions and Backpropagation������������������������������������������������������������29
Recurrent Neural Networks and Long Short-Term Memory��������������������������30
Toy Example 2: Modeling Stock Returns with the RNN Model�����������������������32
Toy Example 3: Modeling Stock Returns with the LSTM Model���������������������40
Summary������������������������������������������������������������������������������������������������������������41

v
Table of Contents

Chapter 3: Working with Raw Text����������������������������������������������������43


Tokenization and Stop Words������������������������������������������������������������������������������44
The Bag-of-Words Model (BoW)��������������������������������������������������������������������������50
CountVectorizer���������������������������������������������������������������������������������������������51
Example Problem 1: Spam Detection������������������������������������������������������������53
Term Frequency Inverse Document Frequency���������������������������������������������57
Example Problem 2: Classifying Movie Reviews�������������������������������������������62
Summary������������������������������������������������������������������������������������������������������������74

Chapter 4: Topic Modeling and Word Embeddings����������������������������77


Topic Model and Latent Dirichlet Allocation (LDA)����������������������������������������������77
Topic Modeling with LDA on Movie Review Data�������������������������������������������81
Non-Negative Matrix Factorization (NMF)�����������������������������������������������������������86
Word2Vec������������������������������������������������������������������������������������������������������������90
Example Problem 4.2: Training a Word Embedding (Skip-Gram)�������������������94
Continuous Bag-of-Words (CBoW)��������������������������������������������������������������������103
Example Problem 4.2: Training a Word Embedding (CBoW)�������������������������105
Global Vectors for Word Representation (GloVe)�����������������������������������������������106
Example Problem 4.4: Using Trained Word Embeddings with LSTMs����������111
Paragraph2Vec: Distributed Memory of Paragraph Vectors (PV-DM)����������������115
Example Problem 4.5: Paragraph2Vec Example with Movie
Review Data������������������������������������������������������������������������������������������������116
Summary����������������������������������������������������������������������������������������������������������118

Chapter 5: Text Generation, Machine Translation, and Other


Recurrent Language Modeling Tasks������������������������������121
Text Generation with LSTMs�����������������������������������������������������������������������������122
Bidirectional RNNs (BRNN)��������������������������������������������������������������������������126

vi
Table of Contents

Creating a Name Entity Recognition Tagger������������������������������������������������������128


Sequence-to-Sequence Models (Seq2Seq)������������������������������������������������������133
Question and Answer with Neural Network Models������������������������������������������134
Summary����������������������������������������������������������������������������������������������������������141
Conclusion and Final Statements���������������������������������������������������������������������142

Index�������������������������������������������������������������������������������������������������145

vii
About the Author
Taweh Beysolow II is a data scientist and
author currently based in San Francisco,
California. He has a bachelor’s degree in
economics from St. Johns University and a
master’s degree in applied statistics from
Fordham University. His professional
experience has included working at Booz
Allen Hamilton, as a consultant and in various
startups as a data scientist, specifically
focusing on machine learning. He has applied machine learning to federal
consulting, financial services, and agricultural sectors.

ix
About the Technical Reviewer
Santanu Pattanayak currently works at GE
Digital as a staff data scientist and is the author
of the deep learning book Pro Deep Learning
with TensorFlow: A Mathematical Approach
to Advanced Artificial Intelligence in Python
(Apress, 2017). He has more than eight years of
experience in the data analytics/data science
field and a background in development and
database technologies. Prior to joining GE,
Santanu worked at companies such as RBS,
Capgemini, and IBM. He graduated with a degree in electrical engineering
from Jadavpur University, Kolkata, and is an avid math enthusiast. Santanu
is currently pursuing a master’s degree in data science from the Indian
Institute of Technology (IIT), Hyderabad. He also devotes his time to data
science hackathons and Kaggle competitions, where he ranks within the
top 500 across the globe. Santanu was born and brought up in West Bengal,
India, and currently resides in Bangalore, India, with his wife.

xi
Acknowledgments
A special thanks to Santanu Pattanayak, Divya Modi, Celestin Suresh
John, and everyone at Apress for the wonderful experience. It has been a
pleasure to work with you all on this text. I couldn’t have asked for a better
team.

xiii
Visit https://ebooknice.com to
discover a wide range of
eBooks across various genres.
Enjoy exclusive deals and
discounts to enhance your
reading experience. Start your
digital reading journey today!
Introduction
Thank you for choosing Applied Natural Language Processing with Python
for your journey into natural language processing (NLP). Readers should
be aware that this text should not be considered a comprehensive study
of machine learning, deep learning, or computer programming. As such,
it is assumed that you are familiar with these techniques to some degree.
Regardless, a brief review of the concepts necessary to understand the
tasks that you will perform in the book is provided.
After the brief review, we begin by examining how to work with raw
text data, slowly working our way through how to present data to machine
learning and deep learning algorithms. After you are familiar with some
basic preprocessing algorithms, we will make our way into some of the
more advanced NLP tasks, such as training and working with trained
word embeddings, spell-check, text generation, and question-and-answer
generation.
All of the examples utilize the Python programming language and
popular deep learning and machine learning frameworks, such as scikit-­
learn, Keras, and TensorFlow. Readers can feel free to access the source
code utilized in this book on the corresponding GitHub page and/or try
their own methods for solving the various problems tackled in this book
with the datasets provided.

xv
CHAPTER 1

What Is Natural
Language
Processing?
Deep learning and machine learning continues to proliferate throughout
various industries, and has revolutionized the topic that I wish to discuss
in this book: natural language processing (NLP). NLP is a subfield of
computer science that is focused on allowing computers to understand
language in a “natural” way, as humans do. Typically, this would refer to
tasks such as understanding the sentiment of text, speech recognition, and
generating responses to questions.
NLP has become a rapidly evolving field, and one whose applications
have represented a large portion of artificial intelligence (AI)
breakthroughs. Some examples of implementations using deep learning
are chatbots that handle customer service requests, auto-spellcheck on cell
phones, and AI assistants, such as Cortana and Siri, on smartphones. For
those who have experience in machine learning and deep learning, natural
language processing is one of the most exciting areas for individuals to
apply their skills. To provide context for broader discussions, however, let’s
discuss the development of natural language processing as a field.

© Taweh Beysolow II 2018 1


T. Beysolow II, Applied Natural Language Processing with Python,
https://doi.org/10.1007/978-1-4842-3733-5_1
Chapter 1 What Is Natural Language Processing?

The History of Natural Language Processing


Natural language processing can be classified as a subset of the broader
field of speech and language processing. Because of this, NLP shares
similarities with parallel disciplines such as computational linguistics,
which is concerned with modeling language using rule-based models.
NLP’s inception can be traced back to the development of computer science
in the 1940s, moving forward along with advances in linguistics that led to
the construction of formal language theory. Briefly, formal language theory
models language on increasingly complex structures and rules to these
structures. For example, the alphabet is the simplest structure, in that it is
a collection of letters that can form strings called words. A formal language
is one that has a regular, context-free, and formal grammar. In addition to
the development of computer sciences as a whole, artificial intelligence’s
advancements also played a role in our continuing understanding of NLP.
In some sense, the single-layer perceptron (SLP) is considered to be the
inception of machine learning/AI. Figure 1-1 shows a photo of this model.

Figure 1-1. Single-layer perceptron

The SLP was designed by neurophysiologist Warren McCulloch and


logician Walter Pitt. It is the foundation of more advanced neural network
models that are heavily utilized today, such as multilayer perceptrons.

2
Chapter 1 What Is Natural Language Processing?

The SLP model is seen to be in part due to Alan Turing’s research in the
late 1930s on computation, which inspired other scientists and researchers
to develop different concepts, such as formal language theory.
Moving forward to the second half of the twentieth century, NLP starts
to bifurcate into two distinct groups of thought: (1) those who support a
symbolic approach to language modelling, and (2) those who support a
stochastic approach. The former group was populated largely by linguists
who used simple algorithms to solve NLP problems, often utilizing pattern
recognition. The latter group was primarily composed of statisticians
and electrical engineers. Among the many approaches that were popular
with the second group was Bayesian statistics. As the twentieth century
progressed, NLP broadened as a field, including natural language
understanding (NLU) to the problem space (allowing computers to react
accurately to commands). For example, if someone spoke to a chatbot and
asked it to “find food near me,” the chatbot would use NLU to translate this
sentence into tangible actions to yield a desirable outcome.
Skip closer to the present day, and we find that NLP has experienced
a surge of interest alongside machine learning’s explosion in usage over
the past 20 years. Part of this is due to the fact that large repositories of
labeled data sets have become more available, in addition to an increase in
computing power. This increase in computing power is largely attributed
to the development of GPUs; nonetheless, it has proven vital to AI’s
development as a field. Accordingly, demand for materials to instruct
data scientists and engineers on how to utilize various AI algorithms has
increased, in part the reason for this book.
Now that you are aware of the history of NLP as it relates to the present
day, I will give a brief overview of what you should expect to learn. The
focus, however, is primarily to discuss how deep learning has impacted
NLP, and how to utilize deep learning and machine learning techniques to
solve NLP problems.

3
Chapter 1 What Is Natural Language Processing?

 Review of Machine Learning and Deep


A
Learning
You will be refreshed on important machine learning concepts,
particularly deep learning models such as multilayer perceptrons (MLPs),
recurrent neural networks (RNNs), and long short-term memory (LSTM)
networks. You will be shown in-depth models utilizing toy examples before
you tackle any specific NLP problems.

 LP, Machine Learning, and Deep Learning


N
Packages with Python
Equally important as understanding NLP theory is the ability to apply it in
a practical context. This book utilizes the Python programming language,
as well as packages written in Python. Python has become the lingua
franca for data scientists, and support of NLP, machine learning, and
deep learning libraries is plentiful. I refer to many of these packages when
solving the example problems and discussing general concepts.
It is assumed that all readers of this book have a general understanding
of Python, such that you have the ability to write software in this language.
If you are not familiar with this language, but you are familiar with others,
the concepts in this book will be portable with respect to the methodology
used to solve problems, given the same data sets. Be that as it may, this
book is not intended to instruct users on Python. Now, let’s discuss some of
the technologies that are most important to understanding deep learning.

TensorFlow
One of the groundbreaking releases in open source software, in addition
to machine learning at large, has undoubtedly been Google’s TensorFlow.
It is an open source library for deep learning that is a successor to Theano,
a similar machine learning library. Both utilize data flow graphs for

4
Chapter 1 What Is Natural Language Processing?

computational processes. Specifically, we can think of computations as


dependent on specific individual operations. TensorFlow functionally
operates by the user first defining a graph/model, which is then operated
by a TensorFlow session that the user also creates.
The reasoning behind using a data flow graph rather than another
computational format computation is multifaceted, however one of the
more simple benefits is the ability to port models from one language to
another. Figure 1-2 illustrates a data flow graph.

Graph of Nodes, also called operations (ops)


biases

weights Add Softmax


MatMul Xent
inputs

targets

Figure 1-2. Data flow graph diagram

For example, you may be working on a project where Java is the


language that is most optimal for production software due to latency
reasons (high-frequency trading, for example); however, you would like to
utilize a neural network to make predictions in your production system.
Rather than dealing with the time-consuming task of setting up a training
framework in Java for TensorFlow graphs, something could be written in
Python relatively quickly, and then the graph/model could be restored by
loading the weights in the production system by utilizing Java. TensorFlow
code is similar to Theano code, as follows.

    #Creating weights and biases dictionaries


    weights = {'input': tf.Variable(tf.random_normal([state_
size+1, state_size])),

5
Chapter 1 What Is Natural Language Processing?

        'output': tf.Variable(tf.random_normal([state_size,
n_classes]))}
    biases = {'input': tf.Variable(tf.random_normal([1, state_
size])),
        'output': tf.Variable(tf.random_normal([1, n_classes]))}

    #Defining placeholders and variables


    X = tf.placeholder(tf.float32, [batch_size, bprop_len])
    Y = tf.placeholder(tf.int32, [batch_size, bprop_len])
    init_state = tf.placeholder(tf.float32, [batch_size, state_
size])
    input_series = tf.unstack(X, axis=1)
    labels = tf.unstack(Y, axis=1)
    current_state = init_state
    hidden_states = []

    #Passing values from one hidden state to the next


    for input in input_series: #Evaluating each input within
the series of inputs
        input = tf.reshape(input, [batch_size, 1]) #Reshaping
input into MxN tensor
        input_state = tf.concat([input, current_state], axis=1)
#Concatenating input and current state tensors
        _hidden_state = tf.tanh(tf.add(tf.matmul(input_
state, weights['input']), biases['input'])) #Tanh
transformation
        hidden_states.append(_hidden_state) #Appending the next
state
        current_state = _hidden_state #Updating the current state

TensorFlow is not always the easiest library to use, however, as there


often serious gaps between documentation for toy examples vs. ­real-­
world examples that reasonably walk the reader through the complexity of
implementing a deep learning model.
6
Chapter 1 What Is Natural Language Processing?

In some ways, TensorFlow can be thought of as a language inside of


Python, in that there are syntactical nuances that readers must become
aware of before they can write applications seamlessly (if ever). These
concerns, in some sense, were answered by Keras.

Keras
Due to the slow development process of applications in TensorFlow,
Theano, and similar deep learning frameworks, Keras was developed for
prototyping applications, but it is also utilized in production engineering
for various problems. It is a wrapper for TensorFlow, Theano, MXNet, and
DeepLearning4j. Unlike these frameworks, defining a computational graph
is relatively easy, as shown in the following Keras demo code.

def create_model():
    model = Sequential()
    model.add(ConvLSTM2D(filters=40, kernel_size=(3, 3),
                       input_shape=(None, 40, 40, 1),
                       padding='same', return_sequences=True))
    model.add(BatchNormalization())

    model.add(ConvLSTM2D(filters=40, kernel_size=(3, 3),


                       padding='same', return_sequences=True))
    model.add(BatchNormalization())
    
    model.add(ConvLSTM2D(filters=40, kernel_size=(3, 3),
                       padding='same', return_sequences=True))
    model.add(BatchNormalization())

    model.add(ConvLSTM2D(filters=40, kernel_size=(3, 3),


                       padding='same', return_sequences=True))
    model.add(BatchNormalization())

    model.add(Conv3D(filters=1, kernel_size=(3, 3, 3),

7
Chapter 1 What Is Natural Language Processing?

                   activation='sigmoid',
                   padding='same', data_format='channels_last'))
    model.compile(loss='binary_crossentropy', optimizer='adadelta')
    return model

Although having the added benefit of ease of use and speed with
respect to implementing solutions, Keras has relative drawbacks when
compared to TensorFlow. The broadest explanation is that Keras
users have considerably less control over their computational graph
than TensorFlow users. You work within the confines of a sandbox
when using Keras. TensorFlow is better at natively supporting more
complex operations, and providing access to the most cutting-edge
implementations of various algorithms.

Theano
Although it is not covered in this book, it is important in the progression
of deep learning to discuss Theano. The library is similar to TensorFlow
in that it provides developers with various computational functions (add,
matrix multiplication, subtract, etc.) that are embedded in tensors when
building deep learning and machine learning models. For example, the
following is a sample Theano code.

(code redacted please see github)


X, Y = T.fmatrix(), T.vector(dtype=theano.config.floatX)
    weights = init_weights(weight_shape)
    biases = init_biases(bias_shape)
    predicted_y = T.argmax(model(X, weights, biases), axis=1)

    cost = T.mean(T.nnet.categorical_crossentropy(predicted_y, Y))


    gradient = T.grad(cost=cost, wrt=weights)
    update = [[weights, weights - gradient * 0.05]]

8
Chapter 1 What Is Natural Language Processing?

    train = theano.function(inputs=[X, Y], outputs=cost,


updates=update, allow_input_downcast=True)
    predict = theano.function(inputs=[X], outputs=predicted_y,
allow_input_downcast=True)

    for i in range(0, 10):


        print(predict(test_x_data[i:i+1]))

if __name__ == '__main__':

    model_predict()

When looking at the functions defined in this sample, notice that T is


the variable defined for a tensor, an important concept that you should
be familiar with. Tensors can be thought of as objects that are similar
to vectors; however, they are distinct in that they are often represented
by arrays of numbers, or functions, which are governed by specific
transformation rules unique unto themselves. Tensors can specifically be
a single point or a collection of points in space-time (any function/model
that combines x, y, and z axes plus a dimension of time), or they may be a
defined over a continuum, which is a tensor field. Theano and TensorFlow
use tensors to perform most of the mathematical operations as data is
passed through a computational graph, colloquially known as a model.
It is generally suggested that if you do not know Theano, you should
focus on mastering TensorFlow and Keras. Those that are familiar with
the Theano framework, however, may feel free to rewrite the existing
TensorFlow code in Theano.

9
Visit https://ebooknice.com to
discover a wide range of
eBooks across various genres.
Enjoy exclusive deals and
discounts to enhance your
reading experience. Start your
digital reading journey today!
Chapter 1 What Is Natural Language Processing?

Applications of Deep Learning to NLP


This section discusses the applications of deep learning to NLP.

Introduction to NLP Techniques and Document


Classification
In Chapter 3, we walk through some introductory techniques, such as
word tokenization, cleaning text data, term frequency, inverse document
frequency, and more. We will apply these techniques during the course
of our data preprocessing as we prepare our data sets for some of the
algorithms reviewed in Chapter 2. Specifically, we focus on classification
tasks and review the relative benefits of different feature extraction
techniques when applied to document classification tasks.

T opic Modeling
In Chapter 4, we discuss more advanced uses of deep learning, machine
learning, and NLP. We start with topic modeling and how to perform it via
latent Dirichlet allocation, as well as non-negative matrix factorization.
Topic modeling is simply the process of extracting topics from documents.
You can use these topics for exploratory purposes via data visualization or
as a preprocessing step when labeling data.

W
 ord Embeddings
Word embeddings are a collection of models/techniques for mapping
words (or phrases) to vector space, such that they appear in a high-­
dimensional field. From this, you can determine the degree of similarity,
or dissimilarity, between one word (or phrase, or document) and another.
When we project the word vectors into a high-dimensional space, we can
envision that it appears as something like what’s shown in Figure 1-3.

10
Chapter 1 What Is Natural Language Processing?

walked

swam

walking

swimming

Verb tense
Figure 1-3. Visualization of word embeddings

Ultimately, how you utilize word embeddings is up to your own


interpretation. They can be modified for applications such as spell check,
but can also be used for sentiment analysis, specifically when assessing
larger entities, such as sentences or documents in respect to one another.
We focus simply on how to train the algorithms and how to prepare data to
train the embeddings themselves.

Language Modeling Tasks Involving RNNs


In Chapter 5, we end the book by tackling some of the more advanced NLP
applications, which is after you have been familiarized with preprocessing
text data from various format and training different algorithms.
Specifically, we focus on training RNNs to perform tasks such as name
entity recognition, answering questions, language generation, and
translating phrases from one language to another.

11
Chapter 1 What Is Natural Language Processing?

Summary
The purpose of this book is to familiarize you with the field of natural
language processing and then progress to examples in which you
can apply this knowledge. This book covers machine learning where
necessary, although it is assumed that you have already used machine
learning models in a practical setting prior.
While this book is not intended to be exhaustive nor overly academic,
it is my intention to sufficiently cover the material such that readers are
able to process more advanced texts more easily than prior to reading
it. For those who are more interested in the tangible applications of NLP
as the field stands today, it is the vast majority of what is discussed and
shown in examples. Without further ado, let’s begin our review of machine
learning, specifically as it relates to the models used in this book.

12
CHAPTER 2

Review of Deep
Learning
You should be aware that we use deep learning and machine learning
methods throughout this chapter. Although the chapter does not provide
a comprehensive review of ML/DL, it is critical to discuss a few neural
network models because we will be applying them later. This chapter also
briefly familiarizes you with TensorFlow, which is one of the frameworks
utilized during the course of the book. All examples in this chapter use toy
numerical data sets, as it would be difficult to both review neural networks
and learn to work with text data at the same time.
Again, the purpose of these toy problems is to focus on learning how
to create a TensorFlow model, not to create a deployable solution. Moving
forward from this chapter, all examples focus on these models with text data.

 ultilayer Perceptrons and Recurrent


M
Neural Networks
Traditional neural network models, often referred to as multilayer
perceptron models (MLPs), succeed single-layer perceptron models (SLPs).
MLPs were created to overcome the largest shortcoming of the SLP model,
which was the inability to effectively handle data that is not linearly
separable. In practical cases, we often observe that multivariate data is

© Taweh Beysolow II 2018 13


T. Beysolow II, Applied Natural Language Processing with Python,
https://doi.org/10.1007/978-1-4842-3733-5_2
Chapter 2 Review of Deep Learning

non-linear, rendering the SLP null and void. MLPs are able to overcome
this shortcoming—specifically because MLPs have multiple layers. We’ll
go over this detail and more in depth while walking through some code to
make the example more intuitive. However, let’s begin by looking at the
MLP visualization shown in Figure 2-1.

Figure 2-1. Multilayer perceptron

Each layer of an MLP model is connected by weights, all of which are


initialized randomly from a standard normal distribution. The input layer
has a set number of nodes, each representative of a feature within a neural
network. The number of hidden layers can vary, but each of them typically
has the same number of nodes, which the user specifies. In regression, the
output layer has one node. In classification, it has K nodes, where K is the
number of classes.
Next, let’s have an in-depth discussion on how an MLP works and
complete an example in TensorFlow.

14
Chapter 2 Review of Deep Learning

T oy Example 1: Modeling Stock Returns


with the MLP Model
Let’s imagine that we are trying to predict Ford Motor Company (F)
stock returns given the returns of other stocks on the same day. This is a
regression problem, given that we are trying to predict a continuous value.
Let’s begin by defining an mlp_model function with arguments that will be
used later, as follows:

def mlp_model(train_data=train_data, learning_rate=0.01,


iters=100, num_hidden1=256):

This Python function contains all the TensorFlow code that forms the
body of the neural network. In addition to defining the graph, this function
invokes the TensorFlow session that trains the network and makes
predictions. We’ll begin by walking through the function, line by line, while
tying the code back to the theory behind the model.
First, let’s address the arguments in our function: train_data is the
variable that contains our training data; in this example; it is the returns of
specific stocks over a given period of time. The following is the header of
our data set:

0  0.002647 -0.001609  0.012800  0.000323  0.016132 -0.004664


-0.018598
1  0.000704  0.000664  0.023697 -0.006137 -0.004840  0.003555
-0.006664
2  0.004221  0.003600  0.002469 -0.010400 -0.008755 -0.002737  
0.025367
3  0.003328  0.001605  0.050493  0.006897  0.010206  0.002260
-0.007156
4  0.001397  0.004052 -0.009965 -0.012720 -0.019235 -0.002255  
0.017916

15
Chapter 2 Review of Deep Learning

5 -0.009326 -0.003754 -0.014506 -0.006607 -0.034865  0.011463  


0.003844
6  0.008446  0.005747  0.022830  0.009312  0.021757 -0.000319  
0.023982
7  0.002705  0.002623  0.007636  0.020099 -0.007433 -0.008303
-0.004330
8 -0.011224 -0.009530 -0.008161 -0.003230 -0.015381 -0.003381
-0.010674
9  0.012496  0.010942  0.016750  0.007777  0.001233  0.008724  
0.033367

Each of the columns represent the percentage return of a stock on a


given day, with our training set containing 1180 observations and our test
set containing 582 observations.
Moving forward, we come to the learning rate and activation function.
In machine learning literature, the learning rate is often represented by the
symbol η (eta). The learning rate is a scalar value that controls the degree
to which the gradient is updated to the parameter that we wish to change.
We can exemplify this technique when referring to the gradient descent
update method. Let’s first look at the equation, and then we can break it
down iteratively.

1 N
( )
2
Si =1 hq ( x ) - y i
i
q t +1 = q t - h (2.1)
N

q t +1 = q t - h
1
N
( i
)
Si =1 2 hq ( x ) - y i Ñq hq ( x )
i

In Equation 2.1, we are updating some parameter, θ, at a given


time step, t. hθ(x)i is equal to the hypothesized label/value, y being the
actual label/value, in addition to N being equal to the total number of
observations in the data set we are training on.
∇θhθ(x)i is the gradient of the output with respect to the parameters of
the model.

16
Chapter 2 Review of Deep Learning

Each unit in a neural network (with the exception of the input layer)
receives the weighted sum of inputs multiplied by weights, all of which are
summed with a bias. Mathematically, this can be described in Equation 2.2.

y = f ( x ,w T ) + b (2.2)

In neural networks, the parameters are the weights and biases. When
referring to Figure 2-1, the weights are the lines that connect the units in
a layer to one another and are typically initialized by randomly sampling
from a normal distribution. The following is the code where this occurs:

    
weights = {'input': tf.Variable(tf.random_normal([train_x.
shape[1], num_hidden])),
            
'hidden1': tf.Variable(tf.random_normal([num_
hidden, num_hidden])),
            
'output': tf.Variable(tf.random_normal([num_hidden,
1]))}

    
biases = {'input': tf.Variable(tf.random_normal([num_
hidden])),
            
'hidden1': tf.Variable(tf.random_normal([num_
hidden])),
            'output': tf.Variable(tf.random_normal([1]))}

Because they are part of the computational graph, weights and biases
in TensorFlow must be initialized as TensorFlow variables with the tf.
Variable(). TensorFlow thankfully has a function that generates numbers
randomly from a normal distribution called tf.random_normal(), which
takes an array as an argument that specifies the shape of the matrix that you
are creating. For people who are new to creating neural networks, choosing
the proper dimensions for the weight and bias units is a typical source of
frustration. The following are some quick pointers to keep in mind :

• When referring to the weights, the columns of a given


layer need to match the rows of the next layer.

17
Chapter 2 Review of Deep Learning

• The columns of the weights for every layer must match


the number of units for each layer in the biases.

• The output layer columns for the weights dictionary


(and array shape for the bias dictionary) should be
representative of the problem that you are modeling.
(If regression, 1; if classification, N, where N = the
number of classes).

You might be curious as to why we initialize the weights and biases


randomly. This leads us to one of the key components of neural networks’
success. The easiest explanation is to imagine the following two scenarios:

• All weights are initialized to 1. If all the weights are


initialized to 1, every neuron is passed the same value,
equal to the weighted sum, plus the bias, and then put
into some activation function, whatever this value may be.

• All weights are initialized to 0. Similar to the prior


scenario, all the neurons are passed the same value,
except that this time, the value is definitely zero.

The more general problem associated with weights that are initialized
at the same location is that it makes the network susceptible to getting
stuck in local minima. Let’s imagine an error function, such as the one
shown in Figure 2-2.

18
Random documents with unrelated
content Scribd suggests to you:
men as must have a faith to inspire them. And that is so. Assaulted
by reason, by logic, argument, philanthropy, progress directed
against his peculiar institutions, the Southerner at last is driven to a
fanaticism—a sacred faith which is above all reason or logical attack
in the propriety, righteousness, and divinity of slavery.
The chaplain, a venerable old man, loudly invoked curses on the
heads of the enemy, and blessings on the arms and councils of the
New State. When he was done, Mr. Howell Cobb, a fat, double-
chinned, mellow-eyed man, rapped with his hammer on the desk
before the chair on which he sat as speaker of the assembly, and the
house proceeded to business. I could fancy that, in all but garments,
they were like the men who first conceived the great rebellion which
led to the independence of this wonderful country—so earnest, so
grave, so sober, and so vindictive—at least, so embittered against
the power which they consider tyrannical and insulting.
The word “liberty” was used repeatedly in the short time allotted
to the public transaction of business and the reading of documents;
the Congress was anxious to get to its work, and Mr. Howell Cobb
again thumped his desk and announced that the house was going
into “secret session,” which intimated that all persons who were not
members should leave. I was introduced to what is called the floor
of the house, and had a delegate’s chair, and of course I moved
away with the others, and with the disappointed ladies and men
from the galleries, but one of the members, Mr. Rhett, I believe, said
jokingly: “I think you ought to retain your seat. If the ‘Times’ will
support the South, we’ll accept you as a delegate.” I replied that I
was afraid I could not act as a delegate to a Congress of Slave
States. And, indeed, I had been much affected at the slave auction
held just outside the hotel, on the steps of the public fountain, which
I had witnessed on my way to the capitol. The auctioneer, who was
an ill-favoured, dissipated-looking rascal, had his “article” beside him
on, not in, a deal packing-case—a stout young negro badly dressed
and ill-shod, who stood with all his goods fastened in a small bundle
in his hand, looking out at the small and listless gathering of men,
who, whittling and chewing, had moved out from the shady side of
the street as they saw the man put up. The chattel character of
slavery in the States renders it most repulsive. What a pity the
nigger is not polypoid—so that he could be cut up in chunks, and
each chunk should reproduce itself!
A man in a cart, some volunteers in coarse uniforms, a few Irish
labourers in a long van, and four or five men in the usual black coat,
satin waistcoat, and black hat, constituted the audience, whom the
auctioneer addressed volubly: “A prime field-hand! Just look at him
—good-natered, well-tempered; no marks, nary sign of bad about
him! En-i-ne hunthered—only nine hun-ther-ed and fifty dol’rs for
’em! Why, it’s quite rad-aklous! Nine hundred and fifty dol’rs! I can’t
raly——That’s good. Thank you, sir. Twenty-five bid—nine hun-therd
and seventy-five dol’rs for this most useful hand.” The price rose to
one thousand dollars, at which the useful hand was knocked down
to one of the black hats near me. The auctioneer and the negro and
his buyer all walked off together to settle the transaction, and the
crowd moved away.
“That nigger went cheap,” said one of them to a companion, as he
walked towards the shade. “Yes, Sirr! Niggers is cheap now—that’s a
fact.” I must admit that I felt myself indulging in a sort of reflection
whether it would not be nice to own a man as absolutely as one
might possess a horse—to hold him subject to my will and pleasure,
as if he were a brute beast without the power of kicking or biting—to
make him work for me—to hold his fate in my hands: but the
thought was for a moment. It was followed by disgust.
I have seen slave markets in the East, where the traditions of the
race, the condition of family and social relations divest slavery of the
most odious characteristics which pertain to it in the States; but the
use of the English tongue in such a transaction, and the idea of its
taking place among a civilised Christian people, produced in me a
feeling of inexpressible loathing and indignation. Yesterday I was
much struck by the intelligence, activity, and desire to please of a
good-looking coloured waiter, who seemed so light-hearted and
light-coloured I could not imagine he was a slave. So one of our
party, who was an American, asked him: “What are you, boy—a free
nigger?” Of course he knew that in Alabama it was most unlikely he
could reply in the affirmative. The young man’s smile died away from
his lips, a flush of blood embrowned the face for a moment, and he
answered in a sad, low tone: “No, sir! I b’long to Massa Jackson,”
and left the room at once. As I stood at an upper window of the
capitol, and looked on the wide expanse of richly-wooded, well-
cultivated land which sweeps round the hill-side away to the horizon,
I could not help thinking of the misery and cruelty which must have
been borne in tilling the land and raising the houses and streets of
the dominant race before whom one nationality of coloured people
has perished within the memory of man. The misery and cruelty of
the system are established by the advertisements for runaway
negroes, and by the description of the stigmata on their persons—
whippings and brandings, scars and cuts—though these, indeed, are
less frequent here than in the border States.
On my return, the Hon. W. M. Browne, Assistant-Secretary of
State, came to visit me—a cadet of an Irish family, who came to
America some years ago, and having lost his money in land
speculations, turned his pen to good account as a journalist, and
gained Mr. Buchanan’s patronage and support as a newspaper editor
in Washington. There he became intimate with the Southern
gentlemen, with whom he naturally associated in preference to the
Northern members; and when they went out, he walked over along
with them. He told me the Government had already received
numerous—I think he said 400—letters from shipowners applying for
letters of marque and reprisal. Many of these applications were from
merchants in Boston, and other maritime cities in the New England
States. He further stated that the President was determined to take
the whole control of the army, and the appointments to command in
all ranks of officers into his own hands.
There is now no possible chance of preserving the peace or of
averting the horrors of war from these great and prosperous
communities. The Southern people, right or wrong, are bent on
independence and on separation, and they will fight to the last for
their object.
The press is fanning the flame on both sides: it would be difficult
to say whether it or the telegraphs circulate lies most largely; but
that as the papers print the telegrams they must have the palm. The
Southerners are told there is a reign of terror in New York—that the
7th New York Regiment has been captured by the Baltimore people
—that Abe Lincoln is always drunk—that General Lee has seized
Arlington heights, and is bombarding Washington. The New York
people are regaled with similar stories from the South. The
coincidence between the date of the skirmish at Lexington and of
the attack on the 6th Massachusetts Regiment at Baltimore is not so
remarkable as the fact, that the first man who was killed at the latter
place, 86 years ago, was a direct descendant of the first of the
colonists who was killed by the royal soldiery. Baltimore may do the
same for the South which Lexington did for all the Colonies. Head-
shaving, forcible deportations, tarring and feathering are
recommended and adopted as specifics to produce conversion from
erroneous opinions. The President of the United States has called
into service of the Federal Government 42,000 volunteers, and
increased the regular army by 22,000 men, and the navy by 18,000
men. If the South secede, they ought certainly to take over with
them some Yankee hotel keepers. This “Exchange” is in a frightful
state—nothing but noise, dirt, drinking, wrangling.
CHAPTER XXIII.

Proclamation of war—Jefferson Davis—Interview with the President of the


Confederacy—Passport and safe-conduct—Messrs. Wigfall, Walker, and
Benjamin—Privateering and letters of marque—A reception at Jefferson
Davis’s—Dinner at Mr. Benjamin’s.

May 9th.—To-day the papers contain a proclamation by the


President of the Confederate States of America, declaring a state of
war between the Confederacy and the United States, and notifying
the issue of letters of marque and reprisal. I went out with Mr.
Wigfall in the forenoon to pay my respects to Mr. Jefferson Davis at
the State Department. Mr. Seward told me that but for Jefferson
Davis the Secession plot could never have been carried out. No other
man of the party had the brain, or the courage and dexterity, to
bring it to a successful issue. All the persons in the Southern States
spoke of him with admiration, though their forms of speech and
thought generally forbid them to be respectful to any one.
There before me was ‘Jeff Davis’ State Department’—a large brick
building, at the corner of a street, with a Confederate flag floating
above it. The door stood open, and “gave” on a large hall
whitewashed, with doors plainly painted belonging to small rooms, in
which was transacted most important business, judging by the
names written on sheets of paper and applied outside, denoting
bureaux of the highest functions. A few clerks were passing in and
out, and one or two gentlemen were on the stairs, but there was no
appearance of any bustle in the building.
We walked straight up-stairs to the first floor, which was
surrounded by doors opening from a quadrangular platform. On one
of these was written simply, “The President.” Mr. Wigfall went in, and
after a moment returned and said, “The President will be glad to see
you; walk in, sir.” When I entered, the President was engaged with
four gentlemen, who were making some offer of aid to him. He was
thanking them “in the name of the Government.” Shaking hands with
each, he saw them to the door, bowed them and Mr. Wigfall out, and
turning to me said, “Mr. Russell, I am glad to welcome you here,
though I fear your appearance is a symptom that our affairs are not
quite prosperous,” or words to that effect. He then requested me to
sit down close to his own chair at his office-table, and proceeded to
speak on general matters, adverting to the Crimean War and the
Indian Mutiny, and asking questions about Sebastopol, the Redan,
and the Siege of Lucknow.
I had an opportunity of observing the President very closely: he
did not impress me as favourably as I had expected, though he is
certainly a very different looking man from Mr. Lincoln. He is like a
gentleman—has a slight, light figure, little exceeding middle height,
and holds himself erect and straight. He was dressed in a rustic suit
of slate-coloured stuff, with a black silk handkerchief round his neck;
his manner is plain, and rather reserved and drastic; his head is well-
formed, with a fine full forehead, square and high, covered with
innumerable fine lines and wrinkles, features regular, though the
cheek-bones are too high, and the jaws too hollow to be handsome;
the lips are thin, flexible, and curved, the chin square, well defined;
the nose very regular, with wide nostrils; and the eyes deep set,
large and full—one seems nearly blind, and is partly covered with a
film, owing to excruciating attacks of neuralgia and tic. Wonderful to
relate, he does not chew, and is neat and clean-looking, with hair
trimmed, and boots brushed. The expression of his face is anxious,
he has a very haggard, care-worn, and pain-drawn look, though no
trace of anything but the utmost confidence and the greatest
decision could be detected in his conversation. He asked me some
general questions respecting the route I had taken in the States.
I mentioned that I had seen great military preparations through
the South, and was astonished at the alacrity with which the people
sprang to arms. “Yes, sir,” he remarked, and his tone of voice and
manner of speech are rather remarkable for what are considered
Yankee peculiarities, “In Eu-rope” (Mr. Seward also indulges in that
pronunciation) “they laugh at us because of our fondness for military
titles and displays. All your travellers in this country have
commented on the number of generals, and colonels, and majors all
over the States. But the fact is, we are a military people, and these
signs of the fact were ignored. We are not less military because we
have had no great standing armies. But perhaps we are the only
people in the world where gentlemen go to a military academy who
do not intend to follow the profession of arms.”
In the course of our conversation, I asked him to have the
goodness to direct that a sort of passport or protection should be
given to me, as I might possibly fall in with some guerilla leader on
my way northwards, in whose eyes I might not be entitled to safe
conduct. Mr. Davis said, “I shall give such instructions to the
Secretary of War as shall be necessary. But, sir, you are among
civilised, intelligent people who understand your position, and
appreciate your character. We do not seek the sympathy of England
by unworthy means, for we respect ourselves, and we are glad to
invite the scrutiny of men into our acts; as for our motives, we meet
the eye of Heaven.” I thought I could judge from his words that he
had the highest idea of the French as soldiers, but that his feelings
and associations were more identified with England, although he
was quite aware of the difficulty of conquering the repugnance
which exists to slavery.
Mr. Davis made no allusion to the authorities at Washington, but
he asked me if I thought it was supposed in England there would be
war between the two States? I answered, that I was under the
impression the public thought there would be no actual hostilities.
“And yet you see we are driven to take up arms for the defence of
our rights and liberties.”
As I saw an immense mass of papers on his table, I rose and
made my bow, and Mr. Davis, seeing me to the door, gave me his
hand and said, “As long as you may stay among us you shall receive
every facility it is in our power to afford to you, and I shall always be
glad to see you.” Colonel Wigfall was outside, and took me to the
room of the Secretary of War, Mr. Walker, whom we found closeted
with General Beauregard and two other officers in a room full of
maps and plans. He is the kind of man generally represented in our
types of a “Yankee”—tall, lean, straight-haired, angular, with fiery,
impulsive eyes and manner—a ruminator of tobacco and a profuse
spitter—a lawyer, I believe, certainly not a soldier; ardent, devoted
to the cause, and confident to the last degree of its speedy success.
The news that two more States had joined the Confederacy,
making ten in all, was enough to put them in good humour. “Is it not
too bad these Yankees will not let us go our own way, and keep their
cursed Union to themselves? If they force us to it, we may be
obliged to drive them beyond the Susquehanna.” Beauregard was in
excellent spirits, busy measuring off miles of country with his
compass, as if he were dividing empires.
From this room I proceeded to the office of Mr. Benjamin, the
Attorney-General of the Confederate States, the most brilliant
perhaps of the whole of the famous Southern orators. He is a short,
stout man, with a full face, olive-coloured, and most decidedly
Jewish features, with the brightest large black eyes, one of which is
somewhat diverse from the other, and a brisk, lively, agreeable
manner, combined with much vivacity of speech and quickness of
utterance. He is one of the first lawyers or advocates in the United
States, and had a large practice at Washington, where his annual
receipts from his profession were not less than £8000 to £10,000 a
year. But his love of the card-table rendered him a prey to older and
cooler hands, who waited till the sponge was full at the end of the
session, and then squeezed it to the last drop.
Mr. Benjamin is the most open, frank, and cordial of the
Confederates whom I have yet met. In a few seconds he was telling
me all about the course of Government with respect to privateers
and letters of marque and reprisal, in order probably to ascertain
what were our views in England on the subject. I observed it was
likely the North would not respect their flag, and would treat their
privateers as pirates. “We have an easy remedy for that. For any
man under our flag whom the authorities of the United States dare
to execute, we shall hang two of their people.” “Suppose, Mr.
Attorney-General, England, or any of the great powers which
decreed the abolition of privateering, refuses to recognise your
flag?” “We intend to claim, and do claim, the exercise of all the
rights and privileges of an independent sovereign State, and any
attempt to refuse us the full measure of those rights would be an act
of hostility to our country.” “But if England, for example, declared
your privateers were pirates?” “As the United States never admitted
the principle laid down at the Congress of Paris, neither have the
Confederate States. If England thinks fit to declare privateers under
our flag pirates, it would be nothing more or less than a declaration
of war against us, and we must meet it as best we can.” In fact, Mr.
Benjamin did not appear afraid of anything; but his confidence
respecting Great Britain was based a good deal, no doubt, on his
firm faith in cotton, and in England’s utter subjection to her cotton
interest and manufactures. “All this coyness about acknowledging a
slave power will come right at last. We hear our commissioners have
gone on to Paris, which looks as if they had met with no
encouragement at London; but we are quite easy in our minds on
this point at present.”
So Great Britain is in a pleasant condition. Mr. Seward is
threatening us with war if we recognise the South, and the South
declares that if we don’t recognise their flag, they will take it as an
act of hostility. Lord Lyons is pressed to give an assurance to the
Government at Washington, that under no circumstances will Great
Britain recognise the Southern rebels; but, at the same time, Mr.
Seward refuses to give any assurance whatever, that the right of
neutrals will be respected in the impending struggle.
As I was going down-stairs, Mr. Browne called me into his room.
He said that the Attorney-General and himself were in a state of
perplexity as to the form in which letters of marque and reprisal
should be made out. They had consulted all the books they could
get, but found no examples to suit their case, and he wished to
know, as I was a barrister, whether I could aid him. I told him it was
not so much my regard to my own position as a neutral, as the vafri
inscitia juris which prevented me throwing any light on the subject.
There are not only Yankee shipowners but English firms ready with
sailors and steamers for the Confederate Government, and the
owner of the Camilla might be tempted to part with his yacht by the
offers made to him.
Being invited to attend a levée or reception held by Mrs. Davis, the
President’s wife, I returned to the hotel to prepare for the occasion.
On my way I passed a company of volunteers, one hundred and
twenty artillerymen, and three field-pieces, on their way to the
station for Virginia, followed by a crowd of “citizens” and negroes of
both sexes, cheering vociferously. The band was playing that
excellent quick-step “Dixie.” The men were stout, fine fellows,
dressed in coarse grey tunics with yellow facings, and French caps.
They were armed with smooth-bore muskets, and their knapsacks
were unfit for marching, being waterproof bags slung from the
shoulders. The guns had no caissons, and the shoeing of the troops
was certainly deficient in soleing. The Zouave mania is quite as
rampant here as it is in New York, and the smallest children are
thrust into baggy red breeches, which the learned Lipsius might
have appreciated, and are sent out with flags and tin swords to
impede the highways.
The modest villa in which the President lives is painted white—
another “White House”—and stands in a small garden. The door was
open. A coloured servant took in our names, and Mr. Browne
presented me to Mrs. Davis, whom I could just make out in the
demi-jour of a moderately-sized parlour, surrounded by a few ladies
and gentlemen, the former in bonnets, the latter in morning dress à
la midi. There was no affectation of state or ceremony in the
reception. Mrs. Davis, whom some of her friends call “Queen Varina,”
is a comely, sprightly woman, verging on matronhood, of good figure
and manners, well-dressed, ladylike, and clever, and she seemed a
great favourite with those around her, though I did hear one of them
say “It must be very nice to be the President’s wife, and be the first
lady in the Confederate States.” Mrs. Davis, whom the President C.
S. married en secondes noces, exercised considerable social
influence in Washington, where I met many of her friends. She was
just now inclined to be angry, because the papers contained a report
that a reward was offered in the North for the head of the arch rebel
Jeff Davis. “They are quite capable, I believe,” she said, “of such
acts.” There were not more than eighteen or twenty persons
present, as each party came in and staid only for a few moments,
and, after a time, I made my bow and retired, receiving from Mrs.
Davis an invitation to come in the evening, when I would find the
President at home.
At sundown, amid great cheering, the guns in front of the State
Department, fired ten rounds to announce that Tennessee and
Arkansas had joined the Confederacy.
In the evening I dined with Mr. Benjamin and his brother-in-law, a
gentleman of New Orleans, Colonel Wigfall coming in at the end of
dinner. The New Orleans people of French descent, or “Creoles,” as
they call themselves, speak French in preference to English, and Mr.
Benjamin’s brother-in-law laboured considerably in trying to make
himself understood in our vernacular. The conversation, Franco-
English, very pleasant, for Mr. Benjamin is agreeable and lively. He is
certain that the English law authorities must advise the Government
that the blockade of the Southern ports is illegal so long as the
President claims them to be ports of the United States. “At present,”
he said, “their paper blockade does no harm; the season for
shipping cotton is over; but in October next, when the Mississippi is
floating cotton by the thousands of bales, and all our wharfs are full,
it is inevitable that the Yankees must come to trouble with this
attempt to coerce us.” Mr. Benjamin walked back to the hotel with
me, and we found our room full of tobacco-smoke, filibusters, and
conversation, in which, as sleep was impossible, we were obliged to
join. I resisted a vigorous attempt of Mr. G. N. Sanders and a friend
of his to take me to visit a planter who had a beaver-dam some
miles outside Montgomery. They succeeded in capturing Mr. Deasy.
CHAPTER XXIV.

Mr. Wigfall on the Confederacy—Intended departure from the South—


Northern apathy and Southern activity—Future prospects of the Union—
South Carolina and cotton—The theory of slavery—Indifference at New
York—Departure from Montgomery.

May 8th. I tried to write, as I have taken my place in the steamer


to Mobile to-morrow, and I was obliged to do my best in a room full
of people, constantly disturbed by visitors. Early this morning, as
usual, my faithful Wigfall comes in and sits by my bedside, and
passing his hands through his locks, pours out his ideas with
wonderful lucidity and odd affectation of logic all his own. “We are a
peculiar people, sir! You don’t understand us, and you can’t
understand us, because we are known to you only by Northern
writers and Northern papers, who know nothing of us themselves, or
misrepresent what they do know. We are an agricultural people; we
are a primitive but a civilised people. We have no cities—we don’t
want them. We have no literature—we don’t need any yet. We have
no press—we are glad of it. We do not require a press, because we
go out and discuss all public questions from the stump with our
people. We have no commercial marine—no navy—we don’t want
them. We are better without them. Your ships carry our produce,
and you can protect your own vessels. We want no manufactures:
we desire no trading, no mechanical or manufacturing classes. As
long as we have our rice, our sugar, our tobacco, and our cotton, we
can command wealth to purchase all we want from those nations
with which we are in amity, and to lay up money besides. But with
the Yankees we will never trade—never. Not one pound of cotton
shall ever go from the South to their accursed cities; not one ounce
of their steel or their manufactures shall ever cross our border.” And
so on. What the Senator who is preparing a bill for drafting the
people into the army fears is, that the North will begin active
operations before the South is ready for resistance. “Give us till
November to drill our men, and we shall be irresistible.” He
deprecates any offensive movement, and is opposed to an attack on
Washington, which many journals here advocate.
Mr. Walker sent me over a letter recommending me to all officers
of the Confederate States, and I received an invitation from the
President to dine with him to-morrow, which I was much chagrined
to be obliged to refuse. In fact, it is most important to complete my
Southern tour speedily, as all mail communication will soon be
suspended from the South, and the blockade effectually cuts off any
communication by sea. Rails torn up, bridges broken, telegraphs
down—trains searched—the war is begun. The North is pouring its
hosts to the battle, and it has met the pæans of the conquering
Charlestonians with a universal yell of indignation and an oath of
vengeance.
I expressed a belief in a letter, written a few days after my arrival
(March 27th), that the South would never go back into the Union.
The North think that they can coerce the South, and I am not
prepared to say they are right or wrong; but I am convinced that the
South can only be forced back by such a conquest as that which laid
Poland prostrate at the feet of Russia. It may be that such a
conquest can be made by the North, but success must destroy the
Union as it has been constituted in times past. A strong Government
must be the logical consequence of victory, and the triumph of the
South will be attended by a similar result, for which, indeed, many
Southerners are very well-disposed. To the people of the
Confederate States there would be no terror in such an issue, for it
appears to me they are pining for a strong Government exceedingly.
The North must accept it, whether they like it or not.
Neither party—if such a term can be applied to the rest of the
United States, and to those States which disclaim the authority of
the Federal Government—was prepared for the aggressive or
resisting power of the other. Already the Confederate States perceive
that they cannot carry all before them with a rush, while the North
have learnt that they must put forth all their strength to make good
a tithe of their lately uttered threats. But the Montgomery
Government are anxious to gain time, and to prepare a regular army.
The North, distracted by apprehensions of vast disturbance in their
complicated relations, are clamouring for instant action and speedy
consummation. The counsels of moderate men, as they were called,
have been utterly overruled.
The whole foundation on which South Carolina rests is cotton and
a certain amount of rice; or rather she bases her whole fabric on the
necessity which exists in Europe for those products of her soil,
believing and asserting, as she does, that England and France
cannot and will not do without them. Cotton, without a market, is so
much flocculent matter encumbering the ground. Rice, without
demand for it, is unsaleable grain in store and on the field. Cotton at
ten cents a pound is boundless prosperity, empire and superiority,
and rice or grain need no longer be regarded.
In the matter of slave-labour, South Carolina argues pretty much
in the following manner: England and France (she says) require our
products. In order to meet their wants, we must cultivate our soil.
There is only one way of doing so. The white man cannot live on our
land at certain seasons of the year; he cannot work in the manner
required by the crops. He must, therefore, employ a race suited to
the labour, and that is a race which will only work when it is obliged
to do so. That race was imported from Africa, under the sanction of
the law, by our ancestors, when we were a British colony, and it has
been fostered by us, so that its increase here has been as great as
that of the most flourishing people in the world. In other places,
where its labour was not productive or imperatively essential, that
race has been made free, sometimes with disastrous consequences
to itself and to industry. But we will not make it free. We cannot do
so. We hold that slavery is essential to our existence as producers of
what Europe requires; nay more, we maintain it is in the abstract
right in principle; and some of us go so far as to maintain that the
only proper form of society, according to the law of God and the
exigencies of man, is that which has slavery as its basis. As to the
slave, he is happier far in his state of servitude, more civilised and
religious, than he is or could be if free or in his native Africa. For this
system we will fight to the end.
In the evening I paid farewell visits, and spent an hour with Mr.
Toombs, who is unquestionably one of the most original, quaint, and
earnest of the Southern leaders, and whose eloquence and power as
a debater are greatly esteemed by his countrymen. He is something
of an Anglo-maniac, and an Anglo-phobist—a combination not
unusual in America—that is, he is proud of being connected with and
descended from respectable English families, and admires our mixed
constitution, whilst he is an enemy to what is called English policy,
and is a strong pro-slavery champion. Wigfall and he are very
uneasy about the scant supply of gunpowder in the Southern States,
and the difficulty of obtaining it.
In the evening had a little reunion in the bed-room as before.—Mr.
Wigfall, Mr. Keitt, an eminent Southern politician, Col. Pickett, Mr.
Browne, Mr. Benjamin, Mr. George Sanders, and others. The last-
named gentleman was dismissed or recalled from his post at
Liverpool, because he fraternised with Mazzini and other Red
Republicans à ce qu’ on dit. Here he is a slavery man, and a friend of
an oligarchy. Your “Rights of Man” man is often most inconsistent
with himself, and is generally found associated with the men of force
and violence.
May 9th.—My faithful Wigfall was good enough to come in early, in
order to show me some comments on my letters in the “New York
Times.” It appears the papers are angry because I said that New
York was apathetic when I landed, and they try to prove I was
wrong by showing there was a “glorious outburst of Union feeling,”
after the news of the fall of Sumter. But I now know that the very
apathy of which I spoke was felt by the Government of Washington,
and was most weakening and embarrassing to them. What would
not the value of “the glorious outburst” have been, had it taken
place before the Charleston batteries had opened on Sumter—when
the Federal flag, for example, was fired on, flying from the ‘Star of
the West,’ or when Beauregard cut off supplies, or Bragg threatened
Pickens, or the first shovel of earth was thrown up in hostile battery?
But no! New York was then engaged in discussing State rights, and
in reading articles to prove the new Government would be traitors if
they endeavoured to reinforce the Federal forts, or were perusing
leaders in favour of the Southern Government. Haply, they may
remember one, not so many weeks old, in which the “New York
Herald” compared Jeff Davis and his Cabinet to the “Great Rail
Splitter,” and Seward, and Chase, and came to the conclusion that
the former “were gentlemen”—(a matter of which it is quite
incompetent to judge)—“and would, and ought to succeed.” The
glorious outburst of “Union feeling” which threatened to demolish
the “Herald” office, has created a most wonderful change in the
views of the proprietor, whose diverse-eyed vision is now directed
solely to the beauties of the Union, and whose faith is expressed in
“a hearty adhesion to the Government of our country.” New York
must pay the penalty of its indifference, and bear the consequences
of listening to such counsellors.
Mr. Deasy, much dilapidated, returned about twelve o’clock from
his planter, who was drunk when he went over, and would not let
him go to the beaver-dam. To console him, the planter stayed up all
night drinking, and waking him up at intervals, that he might refresh
him with a glass of whisky. This man was well off, owned land, and a
good stock of slaves, but he must have been a “mean white,” who
had raised himself in the world. He lived in a three-roomed wooden
cabin, and in one of the rooms he kept his wife shut up from the
strangers’ gaze. One of his negroes was unwell, and he took Deasy
to see him. The result of his examination was, “Nigger! I guess you
won’t live more than an hour.” His diagnosis was quite correct.
Before my departure I had a little farewell levée—Mr. Toombs, Mr.
Browne, Mr. Benjamin, Mr. Walker, Major Deas, Colonel Pickett, Major
Calhoun, Captain Ripley, and others—who were exceedingly kind
with letters of introduction and offers of service. Dined as usual on a
composite dinner—Southern meat and poultry bad—at three o’clock,
and at four p.m. drove down to the steep banks of the Alabama River,
where the castle-like hulk of the “Southern Republic” was waiting to
receive us. I bade good-by to Montgomery without regret. The
native people were not very attractive, and the city has nothing to
make up for their deficiency, but of my friends there I must always
retain pleasant memories, and, indeed, I hope some day I shall be
able to keep my promise to return and see more of the Confederate
ministers and their chief.
CHAPTER XXV.

The River Alabama—Voyage by steamer—Selma—Our captain and his slaves


—“Running” slaves—Negro views of happiness—Mobile—Hotel—The city
—Mr. Forsyth.

The vessel was nothing more than a vast wooden house, of three
separate storeys, floating on a pontoon which upheld the engine,
with a dining-hall or saloon on the second storey surrounded by
sleeping-berths, and a nest of smaller rooms up-stairs; on the metal
roof was a “musical” instrument called a “calliope,” played like a
piano by keys, which acted on levers and valves, admitting steam
into metal cups, where it produced the requisite notes—high,
resonant, and not unpleasing at a moderate distance. It is 417 miles
to Mobile, but at this season the steamer can maintain a good rate
of speed as there is very little cotton or cargo to be taken on board
at the landings, and the stream is full.
The river is about 200 yards broad, and of the colour of chocolate
and milk, with high, steep, wooded banks, rising so much above the
surface of the stream, that a person on the upper deck of the
towering Southern Republic, cannot get a glimpse of the fields and
country beyond. High banks and bluffs spring up to the height of
150 or even 200 feet above the river, the breadth of which is so
uniform as give the Alabama the appearance of a canal, only
relieved by sudden bends and rapid curves. The surface is covered
with masses of drift-wood, whole trees, and small islands of
branches. Now and then a sharp, black, fang-like projection standing
stiffly in the current gives warning of a snag, but the helmsman, who
commands the whole course of the river, from an elevated house
amidships on the upper deck, can see these in time; and at night
pine boughs are lighted in iron cressets at the bows to illuminate the
water.
The captain, who was not particular whether his name was spelt
Maher, or Meaher, or Meagher (les trois se disent), was evidently a
character—perhaps a good one. One with a grey eye full of cunning
and of some humour, strongly marked features, and a very Celtic
mouth of the Kerry type. He soon attached himself to me, and
favoured me with some wonderful yarns, which I hope he was not
foolish enough to think I believed. One relating to a wholesale
destruction and massacre of Indians, he narrated with evident gusto.
Pointing to one of the bluffs, he said that some thirty years ago the
whole of the Indians in the district being surrounded by the whites,
betook themselves to that spot and remained there without any
means of escape, till they were quite starved out. So they sent down
to know if the whites would let them go, and it was agreed that they
should be permitted to move down the river in boats. When the day
came, and they were all afloat, the whites anticipated the boat-
massacre of Nana Sahib at Cawnpore, and destroyed the helpless
red skins. Many hundreds thus perished, and the whole affair was
very much approved of.
The value of land on the sides of this river is great, as it yields
nine to eleven bales of cotton to the acre—worth 10l. a bale at
present prices. The only evidences of this wealth to be seen by us
consisted of the cotton sheds on the top of the banks, and slides of
timber, with steps at each side down to the landings, so constructed
that the cotton bales could be shot down on board the vessel. These
shoots and staircases are generally protected by a roof of planks,
and lead to unknown regions inhabited by niggers and their masters,
the latter all talking politics. They never will, never can be conquered
—nothing on earth could induce them to go back into the Union.
They will burn every bale of cotton, and fire every house, and lay
waste every field and homestead before they will yield to the
Yankees. And so they talk through the glimmering of bad cigars for
hours.
The management of the boat is dexterous,—as she approaches a
landing place, the helm is put hard over, to the screaming of the
steam-pipe and the wild strains of “Dixie” floating out of the throats
of the calliope, and as the engines are detached, one wheel is
worked forward, and the other backs water, so she soon turns head
up stream, and is then gently paddled up to the river bank, to which
she is just kept up by steam—the plank is run ashore, and the few
passengers who are coming in or out are lighted on their way by the
flames of pine in an iron basket, swinging above the bow by a long
pole. Then we see them vanishing into black darkness up the steps,
or coming down clearer and clearer till they stand in the full blaze of
the beacon which casts dark shadows on the yellow water. The air is
glistening with fire-flies, which dot the darkness with specks and
points of flame, just as sparks fly through the embers of tinder or
half-burnt paper.
Some of the landings were by far more important than others.
There were some, for example, where an iron railroad was worked
down the bank by windlasses for hoisting up goods; others where
the negroes half-naked leaped ashore, and rushing at piles of
firewood, tossed them on board to feed the engine, which, all
uncovered and open to the lower deck, lighted up the darkness by
the glare from the stoke-holes, which cried for ever, “Give, give!” as
the negroes ceaselessly thrust the pine-beams into their hungry
maws. I could understand how easily a steamer can “burn up,” and
how hopeless escape would be under such circumstances. The
whole framework of the vessel is of the lightest resinous pine, so
raw that the turpentine oozes out through the paint; the hull is a
mere shell. If the vessel once caught fire, all that could be done
would be to turn her round, and run her to the bank, in the hope of
holding there long enough to enable the people to escape into the
trees; but if she were not near a landing, many must be lost; as the
bank is steep down, the vessel cannot be run aground; and in some
places the trees are in 8 and 10 feet of water. A few minutes would
suffice to set the vessel in a blaze from stem to stern; and if there
were cotton on board, the bales would burn almost like powder. The
scene at each landing was repeated, with few variations, ten times
till we reached Selma, 110 miles distance, at 11·30 at night.
Selma, which is connected with the Tennessee and Mississippi
rivers by railroad, is built upon a steep, lofty bluff, and the lights in
the windows, and the lofty hotels above us, put me in mind of the
old town of Edinburgh, seen from Princes Street. Beside us there
was a huge storied wharf, so that our passengers could step on
shore from any deck they pleased. Here Mr. Deasy, being attacked
by illness, became alarmed at the idea of continuing his journey
without any opportunity of medical assistance, and went on shore.
May 10th.—The cabin of one of these steamers, in the month of
May, is not favourable to sleep. The wooden beams of the engines
creak and scream “consumedly,” and the great engines themselves
throb as if they would break through their thin, pulse covers of pine,
—and the whistle sounds, and the calliope shrieks out “Dixie”
incessantly. So, when I was up and dressed, breakfast was over, and
I had an opportunity of seeing the slaves on board, male and
female, acting as stewards and stewardesses, at their morning meal,
which they took with much good spirits and decorum. They were
nicely dressed—clean and neat. I was forced to admit to myself that
their Ashantee grandsires and grandmothers, or their Kroo and
Dahomey progenitors were certainly less comfortable and well clad,
and that these slaves had other social advantages, though I could
not recognise the force of the Bishop of Georgia’s assertion, that
from slavery must come the sole hope of, and machinery for, the
evangelisation of Africa. I confess I would not give much for the
influence of the stewards and stewardesses in Christianising the
blacks.
The river, the scenery, and the scenes were just the same as
yesterday’s—high banks, cotton-slides, wooding stations, cane
brakes—and a very miserable negro population, if the specimens of
women and children at the landings fairly represented the mass of
the slaves. They were in strong contrast to the comfortable, well-
dressed domestic slaves on board, and it can well be imagined there
is a wide difference between the classes, and that those condemned
to work in the open fields must suffer exceedingly.
A passenger told us the captain’s story. A number of planters, the
narrator among them, subscribed a thousand dollars each to get up
a vessel for the purpose of running a cargo of slaves, with the
understanding they were to pay so much for the vessel, and so
much per head if she succeeded, and so much if she was taken or
lost. The vessel made her voyage to the coast, was laden with native
Africans, and in due time made her appearance off Mobile. The
collector heard of her, but, oddly enough, the sheriff was not about
at the time, the United States’ Marshal was away, and as the vessel
could not be seen next morning, it was fair to suppose she had gone
up the river, or somewhere or another. But it so happened that
Captain Maher, then commanding a river steamer called the Czar (a
name once very appropriate for the work, but since the serf
emancipation rather out of place), found himself in the
neighbourhood of the brig about nightfall; next morning, indeed, the
Czar was at her moorings in the river; but Captain Maher, began to
grow rich, he had fine negroes fresh run on his land, and bought
fresh acres, and finally built the “Southern Republic.” The planters
asked him for their share of the slaves. Captain Maher laughed
pleasantly; he did not understand what they meant. If he had done
anything wrong, they had their legal remedy. They were completely
beaten; for they could not have recourse to the tribunals in a case
which rendered them liable to capital punishment. And so Captain
Maher, as an act of grace, gave them a few old niggers, and kept the
rest of the cargo.
It was worth while to see the leer with which he listened to this
story about himself, “Wall now! You think them niggers I’ve abord
came from Africa! I’ll show you. Jist come up here, Bully!” A boy of
some twelve years of age, stout, fat, nearly naked, came up to us;
his colour was jet black, his wool close as felt, his cheeks were
marked with regular parallel scars, and his teeth very white, looked
as if they had been filed to a point, his belly was slightly
protuberant, and his chest was marked with tracings of tattoo
marks.
“What’s your name, sir?”
“My name Bully.”
“Where were you born?”
“Me born Sout Karliner, sar!”
“There, you see he wasn’t taken from Africa,” exclaimed the
Captain, knowingly. “I’ve a lot of these black South Caroliny niggers
abord, haven’t I, Bully?”
“Yas, sar.”
“Are you happy, Bully?”
“Yas, sar.”
“Show how you’re happy.”
Here the boy rubbed his stomach, and grinning with delight, said,
“Yummy! yummy! plenty belly full.”
“That’s what I call a real happy feelosophical chap,” quoth the
Captain. “I guess you’ve got a lot in your country can’t pat their
stomachs and say, ‘yummy, yummy, plenty belly full?’”
“Where did he get those marks on his face?”
“Oh, them? Wall, it’s a way them nigger women has of marking
their children to know them; isn’t it, Bully?”
“Yas, sar! me ’spose so!”
“And on his chest!”
“Wall, r’ally I do b’l’eve them’s marks agin the smallpox.”
“Why are his teeth filed?”
“Ah, there now! You’d never have guessed it; Bully done that
himself, for the greater ease of biting his vittels.”
In fact, the lad, and a good many of the hands, were the results
of Captain Maher’s little sail in the Czar.
“We’re obleeged to let ’em in some times to keep up the balance
agin the niggers you run into Canaydy.”
From 1848 to 1852 there were no slaves run; but since the
migrations to Canada and the personal liberty laws, it has been
found profitable to run them. There is a bucolic ferocity about these
Southern people which will stand them good stead in the shock of
battle. How the Spartans would have fought against any barbarians
who came to emancipate their slaves, or the Romans have smitten
those who would manumit slave and creditor together!
To-night, on the lower deck, amid wood faggots, and barrels, a
dance of negroes was arranged by an enthusiast, who desired to
show how “happy they were.” That is the favourite theme of the
Southerners; the gallant Captain Maher becomes quite eloquent
when he points to Bully’s prominent “yummy,” and descants on the
misery of his condition if he had been left to the precarious chances
of obtaining such developments in his native land; then turns a quid,
and, as if uttering some sacred refrain to the universal hymn of the
South, says, “Yes, sir, they’re the happiest people on the face of the
airth!”
There was a fiddler, and also a banjo-player, who played uncouth
music to the clumsiest of dances, which it would be insulting to
compare to the worst Irish jig, and the men with immense gravity
and great effusion of sudor, shuffled, and cut, and heeled and
buckled to each other with an overwhelming solemnity, till the rum-
bottle warmed them up to the lighter graces of the dance, when
they became quite overpowering. “Yes, sir, jist look at them how
they’re enjoying it; they’re the happiest people on the face of the
airth.” When “wooding” and firing up they don’t seem to be in the
possession of the same exquisite felicity.
May 11th.—At early dawn the steamer went its way through a
broad bay of snags bordered with drift-wood, and with steam-
trumpet and calliope announced its arrival at the quay of Mobile,
which presented a fringe of tall warehouses, and shops alongside,
over which were names indicating Scotch, Irish, English, many
Spanish, German, Italian, and French owners, Captain Maher at once
set off to his plantation, and we descended the stories of the walled
castle to the beach, and walked on towards the “Battle House,” so
called from the name of its proprietor, for Mobile has not yet had its
fight like New Orleans. The quays which usually, as we were told,
are lined with stately hulls and a forest of masts, were deserted;
although the port was not actually blockaded, there were squadrons
of the United States ships at Pensacola on the east, and at New
Orleans on the west.
The hotel, a fine building of the American stamp, was the seat of
a Vigilance Committee, and as we put down our names in the book
they were minutely inspected by some gentlemen who came out of
the parlour. It was fortunate they did not find traces of Lincolnism
about us, as it appeared by the papers that they were busy
deporting “Abolitionists” after certain preliminary processes
supposed to—
“Give them a rise, and open their eyes
To a sense of their situation.”
The citizens were busy in drilling, marching, and drum-beating, and
the Confederate flag flew from every spire and steeple. The day was
so hot that it was little more inviting to go out in the sun than it
would be in the dog-days at Malaga, to which, by-the-bye, Mobile
bears some “kinder sorter” resemblance, but, nevertheless, I sallied
forth, and had a drive on a shell road by the head of the bay, where
there were pretty villarettes in charming groves of magnolia, orange-
trees, and lime oaks. Wide streets of similar houses spring out to
meet the country through sandy roads; some worthy of Streatham
or Balham, and all surrounded in such vegetation as Kew might
envy.
Many Mobilians called, and among them the mayor, Mr. Forsyth, in
whom I recognised the most remarkable of the Southern
Commissioners I had met at Washington. Mr. Magee, the acting
British Consul was also good enough to wait upon me, with offers of
any assistance in his power. I hear he has most difficult questions to
deal with, arising out of the claims of distressed British subjects, and
disputed nationality. In the evening the Consul and Dr. Nott, a savant
and physician of Mobile, well known to ethnologists for his work on
the “Types of Mankind,” written conjointly with the late Mr. Gliddon,
dined with me, and I learned from them that, notwithstanding the
intimate commercial relations between Mobile and the great
Northern cities, the people here are of the most ultra-secessionist
doctrines. The wealth and manhood of the city will be devoted to
repel the “Lincolnite mercenaries” to the last.
After dinner we walked through the city, which abounds in oyster
saloons, drinking-houses, lager-bier and wine-shops, and gambling
and dancing places. The market was well worthy of a visit—
something like St. John’s at Liverpool on a Saturday night, crowded
with negroes, mulattoes, quadroons, and mestizos of all sorts,
Spanish, Italian, and French, speaking their own tongues, or a
quaint lingua franca, and dressed in very striking and pretty
costumes. The fruit and vegetable stalls displayed very fine produce,
and some staples, remarkable for novelty, ugliness, and goodness.
After our stroll we went into one of the great oyster saloons, and in
a room up-stairs had opportunity of tasting those great bivalvians in
the form of natural fish puddings, fried in batter, roasted, stewed,
devilled, broiled, and in many other ways, plus raw. I am bound to
observe that the Mobile people ate them as if there was no
blockade, and as though oysters were a specific for political
indigestions and civil wars; a fierce Marseillais are they—living in the
most foreign-looking city I have yet seen in the States. My private
room in the hotel was large, well-lighted with gas, and exceedingly
well furnished in the German fashion, with French pendule and
mirrors. The charge for a private room varies from 1l. to 1l. 5s. a-
day; the bed-room and board are charged separately, from 10s. 6d.
to 12s. 6d. a-day, but meals served in the private room are all
charged extra, and heavily too. Exclusiveness is an aristocratic taste
which must be paid for.
CHAPTER XXVI.

Visit to Forts Gaines and Morgan—War to the knife the cry of the South—The
“State” and the “States”—Bay of Mobile—The forts and their inmates—
Opinions as to an attack on Washington—Rumours of actual war.

May 12th. Mr. Forsyth had been good enough to invite me to an


excursion down the Bay of Mobile, to the forts built by Uncle Sam
and his French engineers to sink his Britishers—now turned by “C. S.
A.” against the hated Stars and Stripes. The mayor and the principal
merchants and many politicians—and are not all men politicians in
America?—formed the party. If any judgment of men’s acts can be
formed from their words, the Mobilites, who are the representatives
of the third greatest port of the United States, will perish ere they
submit to the Yankees and people of New York. I have now been in
North Carolina, South Carolina, Georgia, Alabama, and in none of
these great States have I found the least indication of the Union
sentiment, or of the attachment for the Union which Mr. Seward
always assumes to exist in the South. If there were any considerable
amount of it, I was in a position as a neutral to have been aware of
its existence.
Those who might have at one time opposed secession, have now
bowed their heads to the majesty of the majority; and with the
cowardice, which is the result of the irresponsible and cruel tyranny
of the multitude, hasten to swell the cry of revolution. But the
multitude are the law in the United States. “There’s a divinity doth
hedge” the mob here, which is omnipotent and all good. The
majority in each State determines its political status according to
Southern views. The Northerners are endeavouring to maintain that
the majority of the people in the mass of the States generally, shall
regulate that point for each State individually and collectively. If
there be any party in the Southern States which thinks such an
attempt justifiable, it sits silent, and fearful, and hopeless in
darkness and sorrow hid from the light of day. General Scott, who
was a short time ago written of in the usual inflated style, to which
respectable military mediocrity and success are entitled in the
States, is now reviled by the Southern papers as an infamous hoary
traitor and the like. If an officer prefers his allegiance to the United
States’ flag, and remains in the Federal service after his State has
gone out, his property is liable to confiscation by the State
authorities, and his family and kindred are exposed to the gravest
suspicion, and must prove their loyalty by extra zeal in the cause of
secession.
Our merry company comprised naval and military officers in the
service of the Confederate States, journalists, politicians,
professional men, merchants, and not one of them had a word but
of hate and execration for the North. The British and German settlers
are quite as vehement as the natives in upholding States’ rights, and
among the most ardent upholders of slavery are the Irish proprietors
and mercantile classes.
The Bay of Mobile, which is about thirty miles long, with a breadth
varying from three to seven miles, is formed by the outfall of the
Alabama and of the Tombigee river, and is shallow and dangerous,
full of banks and trees, embedded in the sands; but all large vessels
lie at the entrance between Fort Morgan and Fort Gaines, to the
satisfaction of the masters, who are thus spared the trouble with
their crews which occurs in the low haunts of a maritime town. The
cotton is sent down in lighters, which employ many hands at high
wages. The shores are low wooded, and are dotted here and there
with pretty villas; but present no attractive scenery.
The sea breeze somewhat alleviated the fierceness of the sun,
which was however too hot to be quite agreeable. Our steamer,
crowded to the sponsons, made little way against the tide; but at
length, after nearly four hours’ sail, we hauled up alongside a jetty
at Fort Gaines, which is on the right hand or western exit of harbour,
and would command, were it finished, the light draft channel; it is
now merely a shell of masonry, but Colonel Hardee, who has charge
of the defences of Mobile, told me that they would finish it speedily.
The Colonel is an agreeable, delicate-looking man, scarcely of
middle age, and is well-known in the States as the author of “The
Tactics,” which is, however, merely a translation of the French
manual of arms. He does not appear to be possessed of any great
energy or capacity, but is, no doubt, a respectable officer.
Upon landing we found a small body of men on guard in the fort.
A few cannon of moderate calibre were mounted on the sand-hills
and on the beach. We entered the unfinished work, and were
received with a salute. The men felt difficulty in combining discipline
with citizenship. They were “bored” with their sandhill, and one of
them asked me when I “thought them damned Yankees were
coming. He wanted to touch off a few pills he knew would be good
for their complaint.” I must say I could sympathise with the feelings
of the young officer who said he would sooner have a day with the
Lincolnites, than a week with the musquitoes for which this locality is
famous.
From Fort Gaines the steamer ran across to Fort Morgan, about
three miles distant, passing in its way seven vessels, mostly British,
at anchor, where hundreds may be seen, I am told, during the
cotton season. This work has a formidable sea face, and may give
great trouble to Uncle Sam, when he wants to visit his loving
subjects in Mobile in his gunboats. It is the work of Bernard, I
presume, and like most of his designs has a weak long base towards
the land; but it is provided with a wet ditch and drawbridge, with
demi lunes covering the curtains, and has a regular bastioned trace.
It has one row of casemates, armed with 32 and 42-pounders. The
barbette guns are 8-inch and 10-inch guns; the external works at
the salients, are armed with howitzers and field-pieces, and as we
crossed the drawbridge, a salute was fired from a field battery, on a
flanking bastion, in our honour.
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade

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

Let us accompany you on the journey of exploring knowledge and


personal growth!

ebooknice.com

You might also like