Professional Documents
Culture Documents
Text Analytics An Introduction To The Science and Applications of Unstructured Information Analysis John Atkinson Abutridy Full Chapter PDF
Text Analytics An Introduction To The Science and Applications of Unstructured Information Analysis John Atkinson Abutridy Full Chapter PDF
https://ebookmass.com/product/the-organization-of-
information-4th-edition-library-and-information-science-text-
ebook-pdf-version/
https://ebookmass.com/product/library-and-information-center-
management-9th-edition-library-and-information-science-text-
ebook-pdf-version/
https://ebookmass.com/product/forensic-science-an-introduction-
to-scientific-and-investigative/
https://ebookmass.com/product/reference-and-information-services-
an-introduction-ebook-pdf/
https://ebookmass.com/product/philosophy-of-computer-science-an-
introduction-to-the-issues-and-the-literature-william-j-rapaport/
https://ebookmass.com/product/etextbook-978-1305947412-
spreadsheet-modeling-decision-analysis-a-practical-introduction-
to-business-analytics/
https://ebookmass.com/product/criminalistics-an-introduction-to-
forensic-science-12th-edition/
https://ebookmass.com/product/an-introduction-to-genetic-
analysis-11th-edition-ebook-pdf/
Text Analytics
Text Analytics
An Introduction to the Science
and Applications of Unstructured
Information Analysis
John A
tkinson-Abutridy
First edition published 2022
by CRC Press
6000 Broken Sound Parkway NW, Suite 300, Boca Raton, FL 33487-2742
Reasonable efforts have been made to publish reliable data and information, but the author and
publisher cannot assume responsibility for the validity of all materials or the consequences of
their use. The authors and publishers have attempted to trace the copyright holders of all m
aterial
reproduced in this publication and apologize to copyright holders if permission to publish in this
form has not been obtained. If any copyright material has not been acknowledged please write
and let us know so we may rectify in any future reprint.
Except as permitted under U.S. Copyright Law, no part of this book may be reprinted, reproduced,
transmitted, or utilized in any form by any electronic, mechanical, or other means, now known or
hereafter invented, including photocopying, microfilming, and recording, or in any i nformation
storage or retrieval system, without written permission from the publishers.
For permission to photocopy or use material electronically from this work, access www.
copyright.com or contact the Copyright Clearance Center, Inc. (CCC), 222 Rosewood Drive,
Danvers, MA 01923, 9 78-750-8400. For works that are not available on CCC please contact
[email protected]
Trademark notice: Product or corporate names may be trademarks or registered trademarks and
are used only for identification and explanation without intent to infringe.
DOI: 10.1201/9781003280996
Typeset in Minion
by codeMantra
List of Figures, xi
List of Tables, xv
Preface, xvii
Acknowledgments, xxv
Author, xxvii
vii
viii ◾ Contents
2.3.5 Semantics 33
2.3.6 Reasoning and Pragmatics 38
2.4 SUMMARY 39
2.5 EXERCISES 39
2.5.1 Morphological Analysis 39
2.5.2 Lexical Analysis 44
2.5.3 Syntactic Analysis 45
BIBLIOGRAPHY, 221
GLOSSARY, 225
INDEX, 229
List of Figures
xi
xii ◾ List of Figures
xv
Preface
xvii
xviii ◾ Preface
“black boxes”, that is, hiding all the technical details, making it hard to
replicate their experiences using other computational methods or tools.
The book’s nature was clear then. This should be an introductory book
combining the basic theoretical foundations of the different paradigms
and methods of textual analytics, with practical aspects, accompanied by
examples in some programming language, which would allow us to fully
understand the background and logic of computational methods, but at
the same time, being flexible enough to use and implement them in other
languages or computational tools.
I should take advantage of my academic experience to help profession-
als better understand computational concepts and methods. For more
than 25 years, I’ve taught undergraduate and postgraduate courses related
to text analytics, text mining, natural-language processing, and artificial
intelligence at several national and foreign universities. While doing this,
I learned a lot from students and professionals alike, understanding what
was easier or difficult for them to understand, their questioning of what
was established, their ways of taking something complex and simplifying
it, etc.
On the other hand, my extensive experience as a scientific researcher
and consultant, developing and leading scientific projects, and transferring
technologies to the public and private sectors, should also have something
to say in the way I’m focusing this book. Indeed, much of what the book
conveys had to do not only with the basis behind computational methods
but also with the challenges and considerations involved in the study, use
and design of computational methods in real practical problems. Thus, the
book is the result of both types of experiences, which allows us to under-
stand not only the how but also the why.
After all these years doing this, why am I creating this text analytics
book now? Globally, this is a long-standing topic, and we started seeing
this in the mid-1990s in Chile, at the academy. However, in many ways,
society and industry weren’t prepared, and, up to a certain extent, many
didn’t see the need to be prepared, considering it to be something abstract
and, therefore, impractical, taking into account not only the small amount
of data available for them in that period but also performing several ana-
lytical tasks manually, like the old days.
However, the access and size of data sources, and in particular unstruc-
tured ones such as texts and documents, have experienced exponential
growth in the last 10 years. This led to important scientific advances in
both new and improved methods of text analytics as well as a greater need
Preface ◾ xix
Audience
If you have textual data sources that you need to understand, this is the
right book for you. If you want to obtain textual data and want to take
advantage of it to discover and/or detect important knowledge, this is also
xx ◾ Preface
the right book for you. If you want to understand the paradigms and com-
putational methods to perform textual analytics, this book then is a must
for you. If you are looking to understand the basic theoretical and practical
aspects to teach a course in text analytics, this is definitely a suitable guide
for you.
Although this book is introductory, it would help if you are familiar
with the following aspects:
Exercises
Each chapter has an exercise section that shows examples and simple
practical applications written in Python of the different models and meth-
ods described. Each chapter introduces concepts that are cumulative, so
your h ands-on exercises also reuse code functionality from p revious
chapters. The sample programs are divided by chapter, and there’s also
a functions library defined in all chapters common to various exercises
called “utils.py”. All this, together with all the text documents used in
each exercise, are available on the book site: https://www.routledge.com/
Atkinson-Abutridy/p/book/9781032249797
Everything is programmed in Python 3.7 in the Spyder environment for
Windows, under the Anaconda1 distribution. In addition, we use methods
and functions that are available in two libraries:
1 https://w ww.anaconda.com/products/individual
2 https://w ww.nltk.org/
3 https://spacy.io/
Preface ◾ xxiii
On the other hand, sample documents in the form of short news, and those
used in the exercises of each chapter are available in the corpus folder on
the book site. This contains a sample of international news summaries
divided in three subdirectories: music (22 summaries), sports (10 summa-
ries), and coronavirus (16 summaries). In addition, for some exercises, data
sets available in three CSV format files will be used: “training.csv” (data
for model training), “testing.csv” (data for model testing), and “new.csv”
(data for model application).
John Atkinson-Abutridy
Santiago, Chile
4 https://spacy.io/models/en
Acknowledgments
I thank all those who helped with the reading and revision
of the draft of this book in its different stages, providing comments,
corrections, and invaluable feedback: Graciela Mardones, Margarita
Hantke, Mabel Vega, Diego Palma, Eladio Lisboa, Diego Reyes, Victor
Toledo, Rodolfo Abanto, Gonzalo Gómez, Carlos Parrá, and Francisco
Pallauta. Special thanks to Andrés Morales who made a wonderful front
cover design.
I want to thank my wife Ivana, who always supported and urged me
to write this book. I owe her a lot for all the time she sacrificed so I could
move forward and finish this book.
xxv
Author
xxvii
Chapter 1
Text Analytics
1.1 INTRODUCTION
There are thousands of scientific articles in the world on viruses and
diseases that human specialists aren’t able to read or analyze. How
could computers process such documents and be able to make dis-
coveries and/or detect patterns of interest so that humans can make
decisions about new treatments, drugs, and interactions between
bio-components? A company receives hundreds of complaints or inqui-
ries from customers daily through its website or emails. How could this
company analyze those complaints to study and determine common
behaviors and customer profiles in order to offer them a better service?
An Internet news outlet receives hundreds of national and interna-
tional news reports weekly. How could this medium synthesize, group,
or characterize them to provide more filtered and digested informa-
tion to readers seeking specific data? As a result of several national
events, various public bodies receive thousands of opinion messages
through social networks such as Twitter. How could these messages
be analyzed in order to determine trends and/or preferences of users
regarding those events?
Clearly, in the last decades, we’ve experienced a gigantic growth of the
data available in various electronic media. The information overload is
such that it becomes very difficult to take advantage of such data using
conventional technologies, so new abilities are required for its efficient
DOI: 10.1201/9781003280996- 1
2 ◾ Text Analytics
analysis. This will depend on the nature of the information, which in gen-
eral can be divided into two large groups:
• Structured data: Corresponds to data that have been organized in
repositories such as a database, so that its elements can be accessed
by effective analysis and processing methods (i.e., an SQL table).
• Non-Structured data: Corresponds to data that don’t have a
predefined structure or model or that’s not organized in a predefined
way, making them hard to understand using traditional computa-
tional methods (i.e., news and customer complaints).
Depending on the nature of the data, we can perform two types of tasks on
them: search and discovery, as shown in Figure 1.1.
A search task is g oal-oriented, which means that you must provide a
clear criterion to receive the results that you need (i.e., a condition that
must be met by the data attributes). In this scenario, we’re not looking for
anything new, we’re only reducing the information overload, retrieving
only data which satisfy certain conditions (Zhai & Massung, 2016). Then,
search documents online that contain the terms rent and houses. For
this, information retrieval (IR) technologies (Büttcher et al., 2010) are
usually available in the form of web search engines such as Google
and Yahoo or specialized search systems (i.e., MEDLINE medical lit-
erature search engines1).
Unlike search, a discovery task is by nature opportunistic, that is, you don’t
know what you want to search for, so data hypotheses are automatically
explored to discover new opportunities in the form of data hidden pat-
terns (or latent), which can be interesting and novel. Then,
The nature of unstructured data and the complexity of its analysis have
generated a growing need for technologies that allow it to be analyzed and
automatically discover insights (i.e., hidden aspects regarding how users/
clients act, which can generate opportunities for new products/services,
strategies, etc.). This becomes even more latent at the business level, con-
sidering that unstructured information represents more than 85% of the
data handled by corporations. Hence, this has impacted practically all
1 https://w ww.nlm.nih.gov/bsd/medline.html.
4 ◾ Text Analytics
computational method should have or infer lexical (i.e., Are the words
known and relevant?), syntactic (i.e., Is the sentence well written?),
and semantic (i.e., What’s the literal meaning of the phrase?) knowl-
edge. However, the analysis is not enough, as pragmatic knowledge
is also required (To whom is this opinion referring in the context?
What is it trying to communicate?), which allows reasoning about
the implicit intentions of that statement and that can feed further
analysis tasks. Otherwise, the answer will still be pending: didn’t like
customer service, but from “whom?”
• Pattern Discovery: Once the best features are extracted and selected
to represent textual data, several textual analytical tasks can be per-
formed, depending on whether our focus is on the patterns we want
to discover or the result that can be generated from those patterns:
• Patterns as the focus of discovery: This considers relationship
extraction tasks, which explain specific links or associations
between document elements.
• Result as focus of discovery: This considers tasks in which some
analytical method tries to discover implicit patterns that are
used to make decisions. This includes document classification
tasks, document clustering, an analysis of similarity between
texts, etc.
Approaches to doing this stage are discussed in the Chapters 5–9.
• Pattern Evaluation and Interpretation: As in the previous stage, the
interpretation or evaluation of the patterns discovered by each task
will depend on whether the focus is on the patterns or the results.
This aims, on the one hand, to generate patterns that are ideally use-
ful, actionable, and novel, and, on the other hand, to feed back the
previous stages of the process in case it’s required to improve the
quality of those patterns. For example, the evaluation of a textual
categorization task can be seen as the accuracy of the classification
of previously unseen documents; the evaluation of a pattern dis-
covery system can be seen as the degree of novelty or the degree of
understanding that the detected relationship represents; the qual-
ity of a document clustering task can be determined as the degree
of novelty that represents the groups discovered or learned by the
method; the evaluation of an analysis association task between
document items can be determined as the level of relevance and
correlation represented by the associations, and thus, with other
analysis methods.
Approaches to doing this stage are discussed in Chapters 5–9.
1.5 SUMMARY
Text analytics is the science that is based on examining and discovering
interesting and ideally actionable patterns from large collections of docu-
ments (corpuses) written in natural language. To make this possible, text
analytics combines techniques and models from NLP, ML, and IR. This
Text Analytics ◾ 13
1.6 QUESTIONS
In this section, some questions are proposed for discussion around tasks
and applications of text analytics:
N atural-Language
Processing
2.1 INTRODUCTION
The following news excerpt was published in an international newspaper:
UK Prime Minister Boris Johnson has entered the Intensive Care Unit at
St. Thomas Hospital in London tonight as the symptoms of his coronavirus
worsen, acknowledged a Downing Street spokesman.
Johnson was admitted to the hospital on Sunday and until Monday after-
noon “took the reins of the government”, according to Foreign Secretary
Dominic Raab, who may be forced to temporarily assume the leadership of
the cabinet.
Once you’ve carefully read this text, try to answer the following
questions:
With some ease you can recognize that Boris Johnson is a two-word term
that forms the name of a person (and not a thing) in question (1), that
there’s a verbal relationship (i.e., “…has entered”) indicating that Boris
Johnson was admitted to a hospital called St. Thomas in question (2), that
DOI: 10.1201/9781003280996-2 15
16 ◾ Text Analytics
the term Dominic Raab is the name of a person whose words around him
indicate that he’s a secretary of foreign relations in question (3), and that
the second paragraph explains a consequence of what’s described in the
first paragraph, and furthermore, with all these information, you could
even infer the objective of communicating this news.
As humans, answering the above seems relatively straightforward.
However, cognitively speaking, our brains had to carry out multiple lan-
guage processing tasks, which aren’t only complex but require access to a
lot of linguistic knowledge, which we have acquired over the years, almost
without realizing it.
This traveller, whose name and works were little known in Europe
before the publication of Professor Lee’s translation, was born at
Tangiers, in Northern Africa, about the year 1300. He appeared to be
designed by nature to be a great traveller. Romantic in his
disposition, a great lover of the marvellous, and possessing a
sufficient dash of superstition in his character to enable him
everywhere to discover omens favourable to his wishes, the slightest
motives sufficed to induce him to undertake at a day’s notice the
most prodigious journeys, though he could reckon upon deriving
from them nothing but the pleasure of seeing strange sights, or of
believing that he was fulfilling thereby the secret intentions of
Providence respecting him.
Being by profession one of those theologians who in those times
were freely received and entertained by princes and the great in all
Mohammedan countries, he could apprehend no danger of wanting
the necessaries of life, and had before him at least the chance, if not
the certain prospect, of being raised for his learning and experience
to some post of distinction. The first step in the adventures of all
Mohammedan travellers is, of course, the pilgrimage to Mecca, as
this journey confers upon them a kind of sacred character, and the
title of Hajjî, which is a passport generally respected in all the
territories of Islamism.
Ibn Batūta left his native city of Tangiers for the purpose of
performing the pilgrimage in the year of the Hejira 725 (A. D. 1324-
5). Traversing the Barbary States and the whole breadth of Northern
Africa, probably in company with the great Mogrebine caravan which
annually leaves those countries for Mecca, he arrived without
meeting with any remarkable adventure in Egypt, where, according
to the original design of his travels, he employed his time in visiting
the numerous saints and workers of miracles with which that
celebrated land abounded in those days. Among the most
distinguished of these men then in Alexandria was the Imam
Borhaneddin el Aaraj. Our traveller one day visiting this man,
“Batūta,” said he, “I perceive that the passion of exploring the various
countries of the earth hath seized upon thee!”—“I replied, Yes,” says
the traveller, “though I had at that time no intention of extending my
researches to very distant regions.”—“I have three brothers,”
continued the saint, “of whom there is one in India, another in Sindia,
and the third in China. You must visit those realms, and when you
see my brothers, inform them that they are still affectionately
remembered by Borhaneddin.”—“I was astonished at what he said,”
observes Batūta, “and determined within myself to accomplish his
desires.” He in fact regarded the expressions of this holy man as a
manifestation of the will of Heaven.
Having thus conceived the bold design of exploring the remotest
countries of the East, Ibn Batūta was impatient to be in motion; he
therefore abridged his visits to the saints, and proceeded on his
journey. Nevertheless, before his departure from this part of Egypt
he had a dream, which, being properly interpreted by a saint, greatly
strengthened him in his resolution. Falling asleep upon the roof of a
hermit’s cell, he imagined himself placed upon the wings of an
immense bird, which, rising high into the air, fled away towards the
temple at Mecca. From thence the bird proceeded towards Yarren,
and, after taking a vast sweep through the south and the regions of
the rising sun, alighted safely with his burden in the land of darkness,
where he deposited it, and disappeared. On the morrow the sage
hermit interpreted this vision in the sense most consonant with the
wishes of the seer, and, presenting our traveller with some dirhems
and dried cakes, dismissed him on his way. During the whole of his
travels Ibn Batūta met with but one man who equalled this hermit in
sanctity and wisdom, and observes, that from the very day on which
he quitted him he experienced nothing but good fortune.
At Damietta he saw the cell of the Sheïkh Jemaleddin, leader of
the sect of the Kalenders celebrated in the Arabian Nights, who
shave their chins and their eyebrows, and spend their whole lives in
the contemplation of the beatitude and perfection of God. Journeying
onwards through the cities and districts of Fariskūr, Ashmūn el
Rommān, and Samānūd, he at length arrived at Misz, or Cairo,
where he appears to have first tasted the pure waters of the Nile,
which, in his opinion, excel those of all other rivers in sweetness.
Departing from Cairo, and entering Upper Egypt, he visited,
among other places, the celebrated monastery of Clay and the
minyet of Ibn Khasib. Upon the mention of this latter place, he takes
occasion to relate an anecdote of a poet, which, because it is in
keeping with our notions of what a man of genius should be, we shall
here introduce. Ibn Khasib, raised from a state of slavery to the
government of Egypt, and again reduced to beggary, and deprived of
sight by the caprice and cruelty of a calif of the house of Abbas, had
while in power been a munificent patron and protector of literary
men. Hearing of his magnificence and generosity, a poet of Bagdad
had undertaken to celebrate his praises in verse; but before he had
had an opportunity of reciting his work, Khasib was degraded from
his high office, and thrown out in blindness and beggary into the
streets of Bagdad. While he was wandering about in this condition,
the poet, who must have known him personally, encountered him,
and exclaimed, “O, Khasib, it was my intention to visit thee in Egypt
to recite thy praises; but thy coming hither has rendered my journey
unnecessary. Wilt thou allow me to recite my poem?”—“How,” said
Khasib, “shall I hear it? Thou knowest what misfortunes have
overtaken me!” The poet replied, “My only wish is that thou shouldst
hear it; but as to reward, may God reward thee as thou hast others.”
Khasib then said, “Proceed with thy poem.” The poet proceeded:—
When he had concluded, “Come here,” said Khasib, “and open this
seam.” He did so. Khasib then said, “Take this ruby.” The poet
refused; but being adjured to do so, he complied, and went away to
the street of the jewellers to offer it for sale. From the beauty of the
stone, it was supposed it could have belonged to no one but the
calif, who, being informed of the matter, ordered the poet before him,
and interrogated him respecting it. The poet ingenuously related the
whole truth; and the tyrant, repenting of his cruelty, sent for Khasib,
overwhelmed him with splendid presents, and promised to grant him
whatever he should desire. Khasib demanded and obtained the
small minyet in Upper Egypt in which he resided until his death, and
where his fame was still fresh when Ibn Batūta passed through the
country.
Frustrated in his attempt to reach Mecca by this route, after
penetrating as far as Nubia, our traveller returned to Cairo, and from
thence proceeded by way of the Desert into Syria. Here, like every
other believer in the Hebrew Scriptures, he found himself in the
midst of the most hallowed associations; and strengthened at once
his piety and his enthusiasm by visiting the graves of Abraham,
Isaac, and Jacob, as well as the many spots rendered venerable by
the footsteps of Mohammed. As the believers in Islamism entertain a
kind of religious respect for the founder of Christianity, whom they
regard as a great prophet, Batūta did not fail to include Bethlehem,
the birthplace of Christ, in the list of those places he had to see.
Upon this town, however, as well as upon Jerusalem, Tyre, Sidon,
and others of equal renown in Syria, he makes few observations
which can assist us in forming an idea of the state of the country in
those times; but in return for this meagerness, he relates a very
extraordinary story of an alchymist, who had discovered the secret of
making gold, and exercised his supernatural power in acts of
beneficence.
From Syria he proceeded towards Mesopotamia, by Emessa,
Hameh, and Aleppo, and having traversed the country of the Kurds,
and visited the fortresses of the Assassins, the people who, as he
says, “act as arrows for El Malik el Nāisr,” returned to Mount
Libanus, which he pronounces the most fruitful mountain in the
world, and describes as abounding in various fruits, fountains of
water, and leafy shades. He then visited Baalbec and Damascus;
and, after remaining a short time at the latter city, departed with the
Syrian caravan for Mecca. His attempt to perform the pilgrimage, a
duty incumbent on all true Mussulmans, was this time successful:
the caravan traversed the “howling wilderness” in safety; arrived at
the Holy City; and the pilgrims having duly performed the prescribed
rites, and spent three days near the tomb of the prophet, at Medina,
Ibn Batūta joined a caravan proceeding through the deserts of Nejed
towards Persia.
The early part of this journey offered nothing which our traveller
thought worthy of remark; but he at length arrived at Kadisia, near
Kufa, anciently a great city, in the neighbourhood of which that
decisive victory was obtained by Saad, one of the generals of Omar,
over the Persians, which established the interests of Islamism, and
overthrew for ever the power of the Ghebers. He next reached the
city of Meshed Ali, a splendid and populous place, where the grave
of Ali is supposed to be. The inhabitants, of course, were Shiahs, but
they were rich; and Ibn Batūta, who was a tolerant man, thought
them a brave people. The gardens were surrounded by plastered
walls, adorned with paintings, and contained carpets, couches, and
lamps of gold and silver. Within the city was a rich treasury,
maintained by the votive offerings of sick persons, who then
crowded, and still crowd, to the grave of Ali, from Room, Khorasān,
Irak, and other places, in the hope of receiving relief. These people
are placed over the grave a short time after sunset, while other
persons, some praying, others reciting the Koran, and others
prostrating themselves, attend expecting their recovery, and before it
is quite dark a miraculous cure takes place. Our traveller, from some
cause or another, was not present on any of these occasions, and
remarks that he saw several afflicted persons who, though they
confidently looked forward to future benefit had hitherto received
none.
The whole of that portion of Mesopotamia was at this period in the
power of the Bedouin Arabs, without whose protection there was no
travelling through the country. With them, therefore, Ibn Batūta
proceeded from Basra, towards various holy and celebrated places,
among others to the tomb of “My Lord Ahmed of Rephaā,” a famous
devotee, whose disciples still congregate about his grave, and
kindling a prodigious fire, walk into it, some eating it, others trampling
upon it, and others rolling in it, till it be entirely extinguished, while
others take great serpents in their teeth, and bite the head off. From
hence he again returned to Basra, the neighbourhood of which
abounded with palm-trees. The inhabitants were distinguished for
their politeness and humanity towards strangers. Here he saw the
famous copy of the Koran in which Othman, the son of Ali, was
reading when he was assassinated, and on which the marks of his
blood were still visible.
Embarking on board a small boat, called a sambūk, he descended
the Tigris to Abbadān, whence it was his intention to have proceeded
to Bagdad; but, adopting the advice of a friend at Basra, he sailed
down the Persian Gulf, and landing at Magul, crossed a plain
inhabited by Kurds, and arrived at a ridge of very high mountains.
Over these he travelled during three days, finding at every stage a
cell with food for the accommodation of travellers. The roads over
these mountains were cut through the solid rock. His travelling
companions consisted of ten devotees, of whom one was a priest,
another a muezzin, and two professed readers of the Koran, to all of
whom the sultan of the country sent presents of money.
In ten days they arrived in the territories of Ispahan, and remained
some days at the capital, a large and handsome city. From thence
he soon departed for Shiraz, which, though inferior to Damascus,
was even then an extensive and well-built city, remarkable for the
beauty of its streets, gardens, and waters. Its inhabitants likewise,
and particularly the women, were persons of integrity, religion, and
virtue; but our singular traveller remarks, that for his part he had no
other object in going thither than that of visiting the Sheïkh Majd
Oddin, the paragon of saints and workers of miracles! By this holy
man he was received with great kindness, of which he retained so
grateful a remembrance, that on returning home twenty years
afterward from the remotest countries of the east, he undertook a
journey of five-and-thirty days for the mere purpose of seeing his
ancient host.
The greater portion of the early life of Ibn Batūta was consumed in
visiting saints, or the birthplaces and tombs of saints: but his time
was not therefore misemployed; for, besides the positive pleasure
which the presence or sight of such objects appears to have
generated in his own mind, at every step he advanced in this sacred
pilgrimage his personal consequence, and his claims upon the
veneration and hospitality of princes and other great men, were
increased. As he may be regarded as the representative of a class of
men extremely numerous in the early ages of Islamism, and whose
character and mode of life are highly illustrative of the manners of
those times, it is important to follow the footsteps of our traveller in
his whimsical wanderings a little more closely than would otherwise
be necessary.
Proceeding, therefore, at the heels of the honest theologian, we
next find him at Kazerun, beholding devoutly the tomb of the Sheïkh
Abu Is-hāk, a saint held in high estimation throughout India and
China, especially by sailors, who, when tossed about by adverse or
tempestuous winds upon the ocean, make great vows to him, which,
when safely landed, they pay to the servants of his cell. From hence
he proceeded through various districts, many of which were desert
and uninhabitable, to Kufa and Hilla, whence, having visited the
mosque of the twelfth imam, whose readvent is still expected by his
followers, he departed for Bagdad. Here, as at Rome or Athens, the
graves of great men abounded; so that Ibn Batūta’s sympathies were
every moment awakened, and apparently too painfully; for,
notwithstanding that it was one of the largest and most celebrated
cities in the world, he almost immediately quitted it with Bahadar
Khan, sultan of Irak, whom he accompanied for ten days on his
march towards Khorasān. Upon his signifying his desire to return,
the prince dismissed him with large presents and a dress of honour,
together with the means of performing the pilgrimage to Mecca,
which, as an incipient saint, he imagined he could not too frequently
repeat.
Finding, on his return to Bagdad, that a considerable time would
elapse before the departure of the caravan for the Holy City, he
resolved to employ the interval in traversing various portions of
Mesopotamia, and in visiting numerous cities which he had not
hitherto seen. Among these places the most remarkable were
Samarā, celebrated in the history of the Calif Vathek; Mousul, which
is said to occupy the site of ancient Nineveh; and Nisibēn, renowned
throughout the east for the beauty of its position, and the
incomparable scent of the rose-water manufactured there. He
likewise spent some time at the city and mountain of Sinjar, inhabited
by that extraordinary Kurdish tribe who, according to the testimony of
several modern travellers, pay divine honours to the Devil.
This little excursion being concluded, Batūta found the caravan in
readiness to set out for Mecca, and departing with it, and arriving
safe in the Holy City, he performed all the ceremonies and rites
prescribed, and remained there three years, subsisting upon the
alms contributed by the pious bounty of the inhabitants of Irak, and
conveyed to Mecca by caravans. His travelling fit now returning, he
left the birthplace of the prophet, and repairing to Jidda, proceeded
with a company of merchants towards Yemen by sea. After being
driven by contrary winds to the coast of Africa, and landing at
Sūakin, he at length reached Yemen; in the various cities and towns
of which he was entertained with a hospitality so generous and
grateful that he seems never to be tired of dwelling on their praises.
He did not, however, remain long among his munificent hosts, but,
taking ship at Aden, passed over once more into Africa, and landed
at Zaila, a city of the Berbers. The inhabitants of this place, though
Mohammedans, were a rude, uncultivated people, living chiefly upon
fish and the flesh of camels, which are slaughtered in the streets,
where their blood and offals were left putrefying to infect the air.
From this stinking city he proceeded by sea to Makdasha, the
Magadocia of the Portuguese navigators; a very extensive place,
where the hospitable natives were wont, on the arrival of a ship, to
come down in a body to the seashore, and select each his guest
from among the merchants.—When a theologian or a nobleman
happened to be among the passengers, he was received and
entertained by the kazi; and as Ibn Batūta belonged to the former
class he of course became the guest of this magistrate. Here he
remained a short time, passing his days in banqueting and pleasure;
and then returned to Arabia.
During the stay he now made in this country he collected several
particulars respecting the trade and manners of the people, which
are neither trifling nor unimportant. The inhabitants of Zafār, the most
easterly city of Yemen, carried on at that period, he observes, a great
trade in horses with India, the voyage being performed in a month.
The practice he remarked among the same people of feeding their
flocks and herds with fish, and which, he says, he nowhere else
observed, prevails, however, up to the present day, among the
nations of the Coromandel coast, as well as in other parts of the
east. At El Ahkāf, the city of the tribe of Aād, there were numerous
gardens, producing enormous bananas, with the cocoanut and the
betel. Our fanciful traveller discovered a striking resemblance
between the cocoanut and a man’s head, observing that exteriorly
there was something resembling eyes and a mouth, and that when
young the pulp within was like brains. To complete the similitude, the
hair was represented by the fibre, from which, he remarks, cords for
sewing together the planks of their vessels, as also cordage and
cables, were manufactured. The nut itself, according to him, was
highly nourishing, and, like the betel-leaf, a powerful aphrodisiac.
Still pursuing his journey through Arabia, he crossed the desert of
Ammān, and met with a people extraordinary among
Mahommedans, whose wives were liberal of their favours, without
exciting the jealousy of their husbands, and who, moreover,
considered it lawful to feed upon the flesh of the domestic ass. From
thence he crossed the Persian Gulf to Hormuz, where, among many
other extraordinary things, he saw the head of a fish resembling a
hill, the eyes of which were like two doors, so that people could walk
in at one eye and out at the other! He now felt himself to be within
the sphere of attraction of an object whose power he could never
resist. There was, he heard, at Janja-bal, a certain saint, and of
course he forthwith formed the resolution to refresh himself with a
sight of him. He therefore crossed the sea, and hiring a number of
Turcomans, without whose protection there was no travelling in that
part of the country, entered a waterless desert, four days’ journey in
extent, over which the Bedouins wander in caravans, and where the
death-bearing simoom blows during the hot months of summer.
Having passed this desolate and dreary tract, he arrived in Kusistān,
a small province of Persia, bordering upon Laristān, in which Janja-
bal, the residence of the saint, was situated. The sheïkh, who was
secretly, or, as the people believed, miraculously, supplied with a
profusion of provisions, received our traveller courteously, sent him
fruit and food, and contrived to impress him with a high idea of his
sanctity.
He now entered upon the ancient kingdom of Fars, an extensive
and fertile country, abounding in gardens producing a profusion of
aromatic herbs, and where the celebrated pearl-fisheries of Bahrein,
situated in a tranquil arm of the sea, are found. The pearl divers
employed here were Arabs, who, tying a rope round their waists, and
wearing upon their faces a mask made of tortoise-shell, descended
into the water, where, according to Batūta, some remained an hour,
others two, searching among forests of coral for the pearls.
Ibn Batūta was possessed by an extraordinary passion for
performing the pilgrimage to Mecca; and now (A. D. 1332), the year
in which El Malik El Nāsir, sultan of Egypt, visited the holy city, set
out from Persia on his third sacred expedition. Having made the
necessary genuflexions, and kissed the black stone at the Kaaba, he
began to turn his thoughts towards India, but was prevented, we
know not how, from carrying his design into execution; and
traversing a portion of Arabia and Egypt, entered Room or Turkey.
Here, in the province of Anatolia, he was entertained by an
extraordinary brotherhood, to whom, as to all his noble hosts and
entertainers, he devotes a portion of his travels. This association,
which existed in every Turcoman town, consisted of a number of
youths, who, under the direction of one of the members, called “the
brother,” exercised the most generous hospitality towards all
strangers, and were the vigorous and decided enemies of
oppression. Upon the formation of one of these associations, the
brother, or president, erected a cell, in which were placed a horse, a
saddle, and whatever other articles were considered necessary. The
president himself, and every thing in the cell, were always at the
service of the members, who every evening conveyed the product of
their industry to the president, to be sold for the benefit of the cell;
and when any stranger arrived in the town, he was here hospitably
entertained, and contributed to increase the hilarity of the evening,
which was passed in feasting, drinking, singing, and dancing.
Travelling to Iconium, and other cities of Asia Minor, in all of which
he was received and entertained in a splendid manner, while
presents of slaves, horses, and gold were sometimes bestowed
upon him, he at length took ship at Senab, and sailed for Krim
Tartary. During the voyage he endured great hardships, and was
very near being drowned; but at length arrived at a small port on the
margin of the desert of Kifjāk, a country over which Mohammed
Uzbek Khan then reigned. Being desirous of visiting the court of this
prince, Ibn Batūta now hired one of those arabahs, or carts, in which
the inhabitants travel with their families over those prodigious plains,
where neither mountain nor hill nor tree meets the eye, and where
the dung of animals serves as a substitute for fuel, and entered upon
a desert of six months’ extent. Throughout these immense steppes,
which are denominated desert merely in reference to their
comparative unproductiveness, our traveller found cities, but thinly
scattered; and vast droves of cattle, which, protected by the
excessive severity of the laws, wandered without herdsmen or
keepers over the waste. The women of the country, though they
wore no veils, were virtuous, pious, and charitable; and consequently
were held in high estimation.
Arriving at the Bish Tag, or “Five Mountains,” he there found the
urdu (whence our word horde) or camp of the sultan, a moving city,
with its streets, palaces, mosques, and cooking houses, “the smoke
of which ascended as they moved along.” Mohammed Uzbek, then
sovereign of Kifjāk, was a brave and munificent prince; and Ibn
Batūta, having, according to Tartar etiquette, first paid a visit of
ceremony to each of his wives, was politely received by him.
From this camp our traveller set out, with guides appointed by the
sultan, for the city of Bulgār, which, according to the Maresid Al
Etluā, is situated in Siberia. Here, in exemplification of the extreme
shortness of the night, he observes, that while repeating the prayer
of sunset he was overtaken, though he by no means lagged in his
devotions, by the time for evening prayer, which was no sooner over
than it was time to begin that of midnight; and that before he could
conclude one voluntary orison, which he added to this, the dawn had
already appeared, and morning prayer was to be begun. Forty days’
journey to the north of this place lay the land of darkness, where, he
was told, people travelled over interminable plains of ice and snow,
on small light sledges, drawn by dogs; but he was deterred from
pushing his researches into these Cimmerian regions by the fear of
danger, and considerations of the inutility of the journey. He returned,
therefore, to the camp of the sultan.
Mohammed Uzbek had married a daughter of the Greek Emperor
of Constantinople, who, being at this time pregnant, requested his
permission to be confined in her father’s palace, where it was her
intention to leave her child. The sultan consented, and Ibn Batūta,
conceiving that an excellent opportunity for visiting the Greek capital
now presented itself, expressed a desire to accompany the princess,
but the sultan, who regarded him apparently as something too gay
for a saint, at first refused to permit him. Upon his pressing the
matter, however, representing that he should never appear before
the queen but as his servant and guest, so that no fears need be
entertained of him, the royal husband, relenting, allowed him to go,
and presented him, on his departure, with fifteen hundred dinars, a
dress of honour, and several horses; while each of his sultanas,
together with his sons and daughters, caused the traveller to taste of
their bounty.
The queen, while she remained in her husband’s territories,
respected the religion and manners of the Mohammedans; but she
had no sooner entered her father’s dominions, and found herself
surrounded by her countrymen, than she drank wine, dismissed the
ministers of Islamism, and was reported to commit the abomination
of eating swine’s flesh. Ibn Batūta was still treated with respect,
however, and continuing to be numbered among the suite of the
sultana, arrived at length at Constantinople, where, in his zeal to
watch over the comfort of his royal mistress, he exposed himself to
the risk of being squeezed to death in the crowd. On entering the
city, his ears appear to have been much annoyed by the ringing of
numerous bells, which, with the inveterate passion of all Europeans
for noise when agitated by any joyous emotions, the Greeks of
Constantinople substituted for their own voices in the expression of
their satisfaction.
Remaining about five weeks in Constantinople, where, owing to
the difference of manners, language, and religion, he does not
appear to have tasted of much pleasure, he returned to Mohammed
Uzbek, whose bounty enabled him to pursue his journey towards the
east in a very superior style. The country to which his desires now
pointed was Khavāresm, the road thither traversing, during the
greater part of the way, a barren desert, where little water and a very
scanty herbage were to be found. Crossing this waste in a carriage
drawn by camels, he arrived at Khavāresm, the largest city at that
period possessed by the Turks. Here he found the people friendly
towards strangers, liberal, and well-bred,—and no wonder; for in
every mosque a whip was hung up, with which every person who
absented himself from church was soundly flogged by the priest,
besides being fined in five dinars. This practice, which Ibn Batūta
thought highly commendable, no doubt contributed greatly towards
rendering the people liberal and well-bred. Next to the refinement of
the people, the most remarkable thing he observed at Khavāresm
was a species of melon, green on the outside, and red within, which,
being cut into thin oblong slices and dried, was packed up in cases
like figs, and exported to India and China. Thus preserved, the
Khavāresm melon was thought equal to the best dried fruits in the
world, and regarded as a present worthy of kings.
From hence Ibn Batūta departed for Bokhāra, a city renowned
throughout the east for the learning and refinement of its inhabitants,
but at this period so reduced and impoverished by the long wars of
Genghis Khan and his successors, that not one man was to be found
in it who understood any thing of science. Leaving this ancient seat
of oriental learning, he proceeded to Māwarā El Nahr, the sultan of
which was a just and powerful prince, who received him hospitably,
and furnished him with funds to pursue his wanderings. He next
visited Samarkand, Balkh, and Herat, in Khorasān; and scaling the
snowy heights of the Hindoo Koosh, or Hindoo-Slayer, so called
because most of the slaves attempted to be carried out of India by
this route are killed by the severity of the cold, he entered Kabul.
Here, in a cell of the mountain called Bashāi, he found an old man,
who, though he had the appearance of being about fifty, pretended
to be three hundred and fifty years old, and assured Ibn Batūta that
at the expiration of every hundred years he was blessed with a new
growth of hair and new teeth, and that, in fact, he was the Rajah Aba
Rahim Ratan of India, who had been buried in Mooltam.
Notwithstanding his innate veneration for every thing saintly, and this
man bore the name of Ata Evlin, or “Father of Saints,” our honest
traveller could not repress the doubts which arose in his mind
respecting his extraordinary pretensions, and observes in his travels
that he much doubted of what he was, and that he continued to
doubt.
Ibn Batūta now crossed the Indus, and found himself in Hindostan,
where, immediately upon his arrival, he met, in a city which he
denominates Janai, one of the three brothers of Borhaneddin, the
Egyptian saint, whose prediction, strengthening his natural bent of
mind, had made a great traveller of him. Traversing the desert of
Sivastān, where the Egyptian thorn was the only tree to be seen, and
then descending along the banks of the Sinde, or Indus, he arrived
at the city of Lahari, on the seashore, in the vicinity of which were the
ruins of an ancient city, abounding with the sculptured figures of men
and animals, which the superstitious natives supposed to be the real
forms of the ancient inhabitants transformed by the Almighty into
stone for their wickedness.
At Uja, a large city on the Indus, our traveller contracted a
friendship with the Emīr Jelaleddin, then governor of the place, a
brave and generous prince, whom he afterward met at Delhi. In
journeying eastward from this place, Batūta proceeded through a
desert lying between two ridges of mountains, inhabited by Hindoos,
whom the traveller terms infidel and rebellious, because they
adhered to the faith of their ancestors, and refused submission to the
power of the Mohammedan conquerors of their country. Ibn Batūta’s
party, consisting of twenty-two men, was here attacked by a large
body of natives, which they succeeded in repulsing, after they had
killed thirteen of their number. In the course of this journey he
witnessed the performance of a suttee, and remarks upon the
occasion, that these human sacrifices were not absolutely required
either by the laws or the religion of Hindostan; but that, owing to the
vulgar prejudice which regarded those families as ennobled who
thus lost one of their members, the practice was greatly encouraged.
On arriving at Delhi, which, for strength, beauty, and extent, he
pronounces the greatest city, not only of all Hindostan, but of all
Islamism in the east, he resorted to the palace of the queen-mother
and presenting his presents, according to custom, was graciously
received and magnificently established by the bounty of that princess
and the vizier. It is to be presumed, that the money he had received
in presents from various princes on the way had exceeded his
travelling expenses, and gone on accumulating, until, on his arrival
at Delhi, it amounted to a very considerable sum; for with his house,
costly furniture, and forty attendants, his expenditure seems greatly
to have exceeded the munificence of his patrons; indeed, he very
soon found that all the resources he could command were too scanty
to supply the current of his extravagance.
Being of the opinion of that ancient writer who thought a good
companion better than a coach on a journey, Ibn Batūta appears to
have increased his travelling establishment with a mistress, by whom
he seems to have had several children, for shortly after his arrival at
the capital, he informs us that “a daughter of his,” evidently implying
that he had more than one, happened to die. At this time our worthy
theologian was so deeply intoxicated with the fumes of that vanity
which usually accompanies the extraordinary smiles of fortune, that,
although by no means destitute of natural affection, nothing in the
whole transaction appears to have made any impression upon his
mind except the honour conferred upon him by the condescension of
the vizier and the emperor. The latter, then at a considerable
distance from the capital, on being informed of the event,
commanded that the ceremonies and rites usually performed at the
funeral of the children of the nobility should now take place; and
accordingly, on the third day, when the body was to be removed to its
narrow house, the vizier, the judges, and the nobles entered the
chamber of mourning, spread a carpet, and made the necessary
preparations, consisting of incense, rose-water, readers of the
Koran, and panegyrists. Our traveller, who anticipated nothing of all
this, confesses ingenuously that he was “much gratified.” To the
mother of the child the queen-mother showed the greatest kindness,
presenting her with magnificent dresses and ornaments, and a
thousand dinars in money.
The Emperor Mohammed having been absent from Delhi ever
since our traveller’s arrival, he had hitherto found no opportunity of
presenting himself before the “Lord of the World;” but upon that great
personage’s returning, soon after the funeral, the vizier undertook to
introduce him to the presence. The emperor received him graciously,
taking him familiarly by the hand, and, in the true royal style,
lavishing the most magnificent promises. As an earnest of his future
bounty, he bestowed upon each of the many travellers who were
presented at the same time, and met with the same reception, a
gold-embroidered dress, which he had himself worn; a horse from
his own stud, richly caparisoned with housings and saddle of silver;
and such refreshments as the imperial kitchen afforded. Three days
afterward Ibn Batūta was appointed one of the judges of Delhi, on
which occasion the vizier observed to him, “The Lord of the World
appoints you to the office of judge in Delhi. He also gives you a
dress of honour with a saddled horse, as also twelve thousand
dinars for your present support. He has moreover appointed you a
yearly salary of twelve thousand dinars, and a portion of lands in the
villages, which will produce annually an equal sum.” He then did
homage and withdrew.
The fortune of Ibn Batūta was now changed. From the condition of
a religious adventurer, wandering from court to court, and from
country to country, subsisting upon the casual bounty of the great, he
had now been elevated to a post of great honour and emolument in
the greatest city then existing in the world. But it is very certain he
was not rendered happier by this promotion. The monarch upon
whose nod his destiny now depended was a man of changeful and
ferocious nature, profuse and lavish in the extreme towards those
whom he affected, but when provoked, diabolically cruel and
revengeful. In the very first conference which our traveller held with
his master after his appointment, he made a false step, and gave
offence; for when the emperor had informed him that he would by no
means find his office a sinecure, he replied that he belonged to the
sect of Ibn Malik, whereas the people of Delhi were followers of
Hanīfa; and that, moreover, he was ignorant of their language. This
would have been a good reason why he should not in the first
instance have accepted the office of judge; but, having accepted of
it, he should by no means have brought forward his sectarian
prejudices, or his ignorance, in the hope of abridging the extent of
his duties. The emperor, with evident displeasure, rejoined, that he
had appointed two learned men to be his deputies, and that these