Natural Language Processing Recipes: Unlocking Text Data with Machine Learning and Deep Learning Using Python 2nd Edition Akshay Kulkarni - The ebook with all chapters is available with just one click
Natural Language Processing Recipes: Unlocking Text Data with Machine Learning and Deep Learning Using Python 2nd Edition Akshay Kulkarni - The ebook with all chapters is available with just one click
com
https://ebookmeta.com/product/natural-language-processing-
recipes-unlocking-text-data-with-machine-learning-and-deep-
learning-using-python-2nd-edition-akshay-kulkarni-2/
OR CLICK HERE
DOWLOAD EBOOK
https://ebookmeta.com/product/aspects-of-value-frederick-charles-
gruber-editor/
ebookmeta.com
Paul Miriam The Yoder Sisters Mail Order Brides Book 6 1st
Edition M K Moore
https://ebookmeta.com/product/paul-miriam-the-yoder-sisters-mail-
order-brides-book-6-1st-edition-m-k-moore-2/
ebookmeta.com
https://ebookmeta.com/product/computer-vision-eccv-2020-16th-european-
conference-glasgow-uk-august-23-28-2020-proceedings-part-vi-andrea-
vedaldi/
ebookmeta.com
https://ebookmeta.com/product/the-terrorism-survival-guide-201-travel-
tips-on-how-not-to-become-a-victim-revised-and-updated-andy-lightbody/
ebookmeta.com
https://ebookmeta.com/product/dynamics-information-and-complexity-in-
quantum-systems-2nd-edition-fabio-benatti/
ebookmeta.com
Inside Wikipedia How It Works and How You Can Be an Editor
Paul A Thomas
https://ebookmeta.com/product/inside-wikipedia-how-it-works-and-how-
you-can-be-an-editor-paul-a-thomas/
ebookmeta.com
Natural Language
Processing
Recipes
Unlocking Text Data with Machine Learning
and Deep Learning Using Python
—
Second Edition
—
Akshay Kulkarni
Adarsha Shivananda
Natural Language
Processing Recipes
Unlocking Text Data with
Machine Learning and Deep Learning
Using Python
Second Edition
Akshay Kulkarni
Adarsha Shivananda
Natural Language Processing Recipes: Unlocking Text Data with Machine Learning
and Deep Learning Using Python
Akshay Kulkarni Adarsha Shivananda
Bangalore, Karnataka, India Bangalore, Karnataka, India
Introduction������������������������������������������������������������������������������������������������������������xxi
v
Table of Contents
vi
Table of Contents
vii
Table of Contents
Problem��������������������������������������������������������������������������������������������������������������������������������� 55
Solution��������������������������������������������������������������������������������������������������������������������������������� 55
How It Works������������������������������������������������������������������������������������������������������������������������� 55
Problem��������������������������������������������������������������������������������������������������������������������������������� 56
Solution��������������������������������������������������������������������������������������������������������������������������������� 56
How It Works������������������������������������������������������������������������������������������������������������������������� 57
Problem��������������������������������������������������������������������������������������������������������������������������������� 58
Solution��������������������������������������������������������������������������������������������������������������������������������� 58
How It Works������������������������������������������������������������������������������������������������������������������������� 58
Recipe 2-11. Building a Text Preprocessing Pipeline������������������������������������������������������������������ 59
Problem��������������������������������������������������������������������������������������������������������������������������������� 59
Solution��������������������������������������������������������������������������������������������������������������������������������� 59
How It Works������������������������������������������������������������������������������������������������������������������������� 60
viii
Table of Contents
ix
Table of Contents
x
Table of Contents
Solution������������������������������������������������������������������������������������������������������������������������������� 131
How It Works����������������������������������������������������������������������������������������������������������������������� 131
Recipe 4-11. Translating Speech���������������������������������������������������������������������������������������������� 132
Problem������������������������������������������������������������������������������������������������������������������������������� 132
Solution������������������������������������������������������������������������������������������������������������������������������� 132
How It Works����������������������������������������������������������������������������������������������������������������������� 132
xi
Table of Contents
xii
Table of Contents
Index��������������������������������������������������������������������������������������������������������������������� 277
xiii
About the Authors
Akshay Kulkarni is a renowned AI and machine learning
evangelist and thought leader. He has consulted several
Fortune 500 and global enterprises on driving AI and
data science–led strategic transformation. Akshay has
rich experience in building and scaling AI and machine
learning businesses and creating significant impact. He
is currently a data science and AI manager at Publicis
Sapient, where he is part of strategy and transformation
interventions through AI. He manages high-priority
growth initiatives around data science and works on
various artificial intelligence engagements by applying
state-of-the-art techniques to this space.
Akshay is also a Google Developers Expert in machine learning, a published author
of books on NLP and deep learning, and a regular speaker at major AI and data science
conferences.
In 2019, Akshay was named one of the top “40 under 40 data scientists” in India.
In his spare time, he enjoys reading, writing, coding, and mentoring aspiring data
scientists. He lives in Bangalore, India, with his family.
xv
About the Authors
xvi
About the Technical Reviewer
Aakash Kag is a data scientist at AlixPartners and is a
co-founder of the Emeelan application. He has six years
of experience in big data analytics and has a postgraduate
degree in computer science with a specialization in big data
analytics. Aakash is passionate about developing social
platforms, machine learning, and meetups, where he often
talks.
xvii
Acknowledgments
We are grateful to our families for their motivation and constant support.
We want to express our gratitude to out mentors and friends for their input,
inspiration, and support. A special thanks to Anoosh R. Kulkarni, a data scientist at
Quantziq, for his support in writing this book and his technical input. A big thanks to the
Apress team for their constant support and help.
Finally, we would like to thank you, the reader, for showing an interest in this book
and making your natural language processing journey more exciting.
Note that the views and opinions expressed in this book are those of the authors.
xix
Introduction
According to industry estimates, more than 80% of the data being generated is in an
unstructured format in the form of text, images, audio, or video. Data is being generated
as we speak, write, tweet, use social media platforms, send messages on messaging
platforms, use ecommerce to shop, and do various other activities. The majority of this
data exists in textual form.
So, what is unstructured data? Unstructured data is information that doesn't reside
in a traditional relational database. Examples include documents, blogs, social media
feeds, pictures, and videos.
Most of the insights are locked within different types of unstructured data. Unlocking
unstructured data plays a vital role in every organization wanting to make improved and
better decisions. This book unlocks the potential of textual data.
Textual data is the most common and comprises more than 50% of unstructured
data. Examples include tweets/posts on social media, chat conversations, news, blogs,
articles, product or services reviews, and patient records in the healthcare sector. Recent
examples include voice-driven bots like Siri and Alexa.
xxi
Introduction
To retrieve significant and actionable insights from textual data and unlock its
potential, we use natural language processing coupled with machine learning and deep
learning.
But what is natural language processing? Machines and algorithms do not
understand text or characters, so it is very important to convert textual data into
a machine-understandable format (like numbers or binary) to analyze it. Natural
language processing (NLP) allows machines to understand and interpret the human
language.
If you want to use the power of unstructured text, this book is the right starting point.
This book unearths the concepts and implementation of natural language processing
and its applications in the real world. NLP offers unbounded opportunities for solving
interesting problems in artificial intelligence, making it the latest frontier for developing
intelligent, deep learning–based applications.
xxii
Introduction
The book covers both fundamental and state-of-the-art techniques used in machine
learning applications and deep learning natural language processing. This edition
includes various advanced techniques to convert text to features, like GloVe, ELMo,
and BERT. It also explains how transformers work, using Sentence-BERT and GPT as
examples.
The book closes by discussing some of the advanced industrial applications of
NLP with a solution approach and implementation, also leveraging the power of deep
learning techniques for natural language processing and natural language generation
problems, employing advanced RNNs, like long short-term memory, to solve complex
text generation tasks. It also explores embeddings—high-quality representations of
words in a language.
In this second edition, few advanced state-of-art embeddings and industrial
applications are explained along with end-to-end implementation using deep learning.
Each chapter includes several code examples and illustrations.
By the end of the book, you will have a clear understanding of implementing natural
language processing. You will have worked on multiple examples that implement NLP
techniques in the real world. Readers will be comfortable with various NLP techniques
coupled with machine learning and deep learning and its industrial applications,
making the NLP journey much more interesting and improving your Python coding
skills.
xxiii
Introduction
xxiv
Introduction
spaCy is a trending library that comes with the added flavors of a deep learning
framework. Although spaCy doesn’t cover all NLP functionalities, it does many things well.
CoreNLP is a Python wrapper for Stanford CoreNLP. The toolkit provides robust,
accurate, and optimized techniques for tagging, parsing, and analyzing text in various
languages.
There are hundreds of other NLP libraries, but these are the widely used and
important ones.
There is an immense number of NLP industrial applications that are leveraged to
uncover insights. By the end of the book, you will have implemented many of these use
cases, from framing a business problem to building applications and drawing business
insights. The following are some examples.
xxv
Introduction
xxvi
CHAPTER 1
I ntroduction
Before getting into the details of the book, let’s look at generally available data sources.
We need to identify potential data sources that can help with solving data science use
cases.
C
lient Data
For any problem statement, one of the sources is the data that is already present. The
business decides where it wants to store its data. Data storage depends on the type of
business, the amount of data, and the costs associated with the sources. The following
are some examples.
1
© Akshay Kulkarni and Adarsha Shivananda 2021
A. Kulkarni and A. Shivananda, Natural Language Processing Recipes,
https://doi.org/10.1007/978-1-4842-7351-7_1
Chapter 1 Extracting the Data
• SQL databases
• HDFS
• Cloud storage
• Flat files
F ree Sources
A large amount of data is freely available on the Internet. You just need to streamline the
problem and start exploring multiple free data sources.
• Wikipedia
W
eb Scraping
Extracting the content/data from websites, blogs, forums, and retail websites for reviews
with permission from the respective sources using web scraping packages in Python.
There are a lot of other sources, such as news data and economic data, that can be
leveraged for analysis.
2
Chapter 1 Extracting the Data
P
roblem
You want to collect text data using Twitter APIs.
S
olution
Twitter has a gigantic amount of data with a lot of value in it. Social media marketers
make their living from it. There is an enormous number of tweets every day, and every
tweet has some story to tell. When all of this data is collected and analyzed, it gives a
business tremendous insights about their company, product, service, and so forth.
Let’s now look at how to pull data and then explore how to leverage it in the coming
chapters.
How It Works
Step 1-1. Log in to the Twitter developer portal
Log in to the Twitter developer portal at https://developer.twitter.com.
Create your own app in the Twitter developer portal, and get the following keys.
Once you have these credentials, you can start pulling data.
# Install tweepy
!pip install tweepy
3
Chapter 1 Extracting the Data
import numpy as np
import tweepy
import json
import pandas as pd
from tweepy import OAuthHandler
# credentials
consumer_key = "adjbiejfaaoeh"
consumer_secret = "had73haf78af"
access_token = "jnsfby5u4yuawhafjeh"
access_token_secret = "jhdfgay768476r"
# calling API
# Provide the query you want to pull the data. For example, pulling data
for the mobile phone ABC
query ="ABC"
# Fetching tweets
This query pulls the top ten tweets when product ABC is searched. The API pulls
English tweets since the language given is 'en'. It excludes retweets.
Problem
You want to read a PDF file.
4
Chapter 1 Extracting the Data
Solution
The simplest way to read a PDF file is by using the PyPDF2 library.
How It Works
Follow the steps in this section to extract data from PDF files.
Note You can download any PDF file from the web and place it in the location
where you are running this Jupyter notebook or Python script.
pdf = open("file.pdf","rb")
pdf_reader = PyPDF2.PdfFileReader(pdf)
print(pdf_reader.numPages)
page = pdf_reader.getPage(0)
5
Chapter 1 Extracting the Data
print(page.extractText())
pdf.close()
Please note that the function doesn’t work for scanned PDFs.
Problem
You want to read Word files.
Solution
The simplest way is to use the docx library.
How It Works
Follow the steps in this section to extract data from a Word file.
#Install docx
!pip install docx
#Import library
from docx import Document
Note You can download any Word file from the web and place it in the location
where you are running a Jupyter notebook or Python script.
6
Chapter 1 Extracting the Data
doc = open("file.docx","rb")
document = docx.Document(doc)
#create an empty string and call this document. #This document variable
stores each paragraph in the Word document.
#We then create a "for" loop that goes through each paragraph in the Word
document and appends the paragraph.
docu=""
for para in document.paragraphs.
docu += para.text
Problem
You want to read a JSON file/object.
Solution
The simplest way is to use requests and the JSON library.
7
Chapter 1 Extracting the Data
How It Works
Follow the steps in this section to extract data from JSON.
import requests
import json
#output
{
"success": {
"total": 1
},
"contents": {
"quotes": [
{
"quote": "Where there is ruin, there is hope for a treasure.",
"length": "50",
"author": "Rumi",
"tags": [
"failure",
"inspire",
"learning-from-failure"
],
"category": "inspire",
"date": "2018-09-29",
8
Chapter 1 Extracting the Data
"permalink": "https://theysaidso.com/quote/
dPKsui4sQnQqgMnXHLKtfweF/
rumi-where-there-is-ruin-there-is-hope-for-a-treasure",
"title": "Inspiring Quote of the day",
"background": "https://theysaidso.com/img/bgs/
man_on_the_mountain.jpg",
"id": "dPKsui4sQnQqgMnXHLKtfweF"
}
],
"copyright": "2017-19 theysaidso.com"
}
}
#extract contents
q = res['contents']['quotes'][0]
q
#output
{'author': 'Rumi',
'background': 'https://theysaidso.com/img/bgs/man_on_the_mountain.jpg',
'category': 'inspire',
'date': '2018-09-29',
'id': 'dPKsui4sQnQqgMnXHLKtfweF',
'length': '50',
'permalink': 'https://theysaidso.com/quote/dPKsui4sQnQqgMnXHLKtfweF/
rumi-where-there-is-ruin-there-is-hope-for-a-treasure',
'quote': 'Where there is ruin, there is hope for a treasure.',
'tags': ['failure', 'inspire', 'learning-from-failure'],
'title': 'Inspiring Quote of the day'}
#output
It wasn't raining when Noah built the ark....
-- Howard Ruff
9
Chapter 1 Extracting the Data
Problem
You want to read parse/read HTML pages.
Solution
The simplest way is to use the bs4 library.
How It Works
Follow the steps in this section to extract data from the web.
response = urllib2.urlopen('https://en.wikipedia.org/wiki/
Natural_language_processing')
html_doc = response.read()
10
Chapter 1 Extracting the Data
#Parsing
soup = BeautifulSoup(html_doc, 'html.parser')
# Formating the parsed html file
strhtm = soup.prettify()
#output
<!DOCTYPE html>
<html class="client-nojs" dir="ltr" lang="en">
<head>
<meta charset="utf-8"/>
<title>
Natural language processing - Wikipedia
</title>
<script>
document.documentElement.className = document.documentElement.className.
replace( /(^|\s)client-nojs(\s|$)/, "$1client-js$2" );
</script>
<script>
(window.RLQ=window.RLQ||[]).push(function(){mw.config.set({"wgCanonical
Namespace":"","wgCanonicalSpecialPageName":false,"wgNamespaceNumber":
0,"wgPageName":"Natural_language_processing","wgTitle":"Natural language
processing","wgCurRevisionId":860741853,"wgRevisionId":860741853,
"wgArticleId":21652,"wgIsArticle":true,"wgIsRedirect":false,"wgAction":
"view","wgUserName":null,"wgUserGroups":["*"],"wgCategories":["Web
archive template wayback links","All accuracy disputes","Articles
with disputed statements from June 2018","Wikipedia articles with
NDL identifiers","Natural language processing","Computational
linguistics","Speech recognition","Computational fields of stud
11
Chapter 1 Extracting the Data
print(soup.title)
print(soup.title.string)
print(soup.a.string)
print(soup.b.string)
#output
<title>Natural language processing - Wikipedia</title>
Natural language processing - Wikipedia
None
Natural language processing
#sample output
None
Jump to navigation
Jump to search
Language processing in the brain
None
None
automated online assistant
customer service
[1]
computer science
artificial intelligence
natural language
speech recognition
natural language understanding
natural language generation
12
Chapter 1 Extracting the Data
#sample output
Natural language processing (NLP) is an area of computer science and
artificial intelligence concerned with the interactions between computers
and human (natural) languages, in particular how to program computers to
process and analyze large amounts of natural language data.
Note that the p tag extracted most of the text on the page.
Problem
You want to parse text data using regular expressions.
Solution
The best way is to use the re library in Python.
13
Chapter 1 Extracting the Data
How It Works
Let’s look at some of the ways we can use regular expressions for our tasks.
The basic flags are I, L, M, S, U, X.
• re.I ignores casing.
• re.L finds a local dependent.
• re.M finds patterns throughout multiple lines.
• re.S finds dot matches.
• re.U works for Unicode data.
• re.X writes regex in a more readable format.
• Start of a string: ^
• End of a string: $
• Non-word boundary: \B
The re.match() and re.search() functions find patterns, which are then processed
according to the requirements of the application.
Let’s look at the differences between re.match() and re.search().
• re.match() checks for a match only at the beginning of the string. So,
if it finds a pattern at the beginning of the input string, it returns the
matched pattern; otherwise, it returns a noun.
Tokenizing
Tokenizing means splitting a sentence into words. One way to do this is to use re.split.
# Import library
import re
15
Chapter 1 Extracting the Data
#Output
xyz@abc.com
pqr@mno.com
new_email_address = re.sub(r'([\w\.-]+)@([\w\.-]+)',
r'pqr@mno.com', doc)
print(new_email_address)
#Output
For more details please mail us at pqr@mno.com
16
Chapter 1 Extracting the Data
([a-zA-Z0-9+._-]+@[a-zA-Z0-9._-]+\.[a-zA-Z0-9_-]+)
There are even more complex ones to handle all the edge cases (e.g., “.co.in” email
IDs). Please give it a try.
# Import library
import re
import requests
#function to extract
def get_book(url).
# Sends a http request to get the text from project Gutenberg
raw = requests.get(url).text
# Discards the metadata from the beginning of the book
start = re.search(r"\*\*\* START OF THIS PROJECT GUTENBERG EBOOK
.* \*\*\*",raw ).end()
# Discards the metadata from the end of the book
stop = re.search(r"II", raw).start()
# Keeps the relevant text
text = raw[start:stop]
return text
# processing
def preprocess(sentence).
return re.sub('[^A-Za-z0-9.]+' , ' ', sentence).lower()
17
Exploring the Variety of Random
Documents with Different Content
Corrosion is a disease and defect of the teeth when they become carious and
hollow, which most often happens in the molars, especially if one does not clean
them of the adhering food which becomes moist and consequently produces bad,
sharp [acid] moisture that eats and corrodes them, always gradually increasing,
until it spoils the teeth entirely, which afterward must fall away in pieces not
without pains.
“Mesue ut supra capite proprio.” This, as Mesue writes, is chiefly cured and
removed in three ways. First, by purging as treated upon above. Second, by
dissolving the material which renders them hollow and eats them away; also by
boiling cockles that grow in barley or wheat, in vinegar and holding this in the
mouth. In this vinegar the root of caper and ginger and other similar remedies
must have been previously boiled. Third, by removing the decay, which is done in
two ways. First, by scraping and cleaning the hole and the carious part with a fine
chisel, knife, or file, or other suitable instrument, as is well known to practitioners,
and then by filling the cavity with gold leaves for the preservation of the other
portion of the tooth. Second, by using suitable medicine, such as oak apples or
wild galls, with which the tooth is filled after having been cleaned.
Andreas Vesalius.
Before Vesalius, Galen’s anatomy had served as the constant basis
for the teaching of this science. Although even from the end of the
fifteenth century dead bodies were dissected in all the principal
universities, the teachers of anatomy always conformed, in their
descriptions, to those of Galen, so that the authority of this master,
held infallible, prevailed even over the reality of facts.
Vesalius, for the first time, dared to unveil and clearly put in
evidence the errors of Galen; but this made him many enemies
among the blind followers and worshippers of that demigod of
medicine. Europe resounded with the invectives that were bestowed
upon Vesalius. Among others, there rose against him Eustachio at
Rome, Dryander at Marburg, Sylvius at Paris, and this last did not
spare any calumny that might degrade his old pupil, who had
become so celebrated. In spite of this, the fame of Vesalius kept on
growing more and more, so much so that Charles V called him to
Madrid, to the post of chief physician of his Court, a place which he
kept under Philip II, also after the abdication of Charles V. The good
fortune of Vesalius, unhappily, was not to be of long duration. In
1564 a Spanish gentleman died, in spite of the care bestowed upon
him by Vesalius, and the illustrious scientist requested from the
family, and with difficulty obtained, the permission to dissect the
body. At the moment in which the thoracic cavity was opened the
heart was seen, or thought to be seen, beating. The matter reached
the ears of the relations of the deceased, and they accused Vesalius,
before the Inquisition, of murder and sacrilege; and he certainly
would not have escaped death except by the intervention of Philip II,
who, to save him, desired that he should go on a pilgrimage to the
Holy Land, as an expiation. On his return, the ship which carried
Vesalius was wrecked, and he was cast on a desert beach of the Isle
of Zante, where, according to the testimony of a Venetian traveller,
he died of hunger, October 15, 1564.
Vesalius left to the world an immortal monument, his splendid
treatise on Anatomy,282 published by him when only twenty-eight
years of age, and of which, from 1543 to 1725, not less than fifteen
editions were issued. The appearance of this work marked the
commencement of a new era. The struggle between the supporters
of Galen and those of Vesalius rendered necessary, on both sides,
active research concerning the structure of the human body, so that
anatomy, the principal basis of scientific medicine, gradually became
more and more perfect, and, as a consequence of this, as well as of
the importance which the direct observation of facts acquired over
the authority of the ancients, there began in all branches of
medicine a continual, ever-increasing progress, which gave and still
gives splendid results, such as would have been impossible under
the dominion of Galenic dogmatism.
In the great work of Vesalius the anatomy of the teeth is
unfortunately treated with much less accuracy than that of the other
parts of the body. However, his description of the dental
apparatus283 is far more exact than that of Galen, and represents
real progress. The number of the roots of the molar teeth (large and
small) is indicated by Galen in a very vague and inexact manner,
since he says that the ten upper molars have generally three,
sometimes four roots, and that the lower ones have generally two,
and rarely three. Vesalius, having examined the teeth and the
number of their roots in a great number of skulls, was able to be
much more precise. In regard to roots, he makes, for the first time,
a very clear distinction between the premolars next to the canine
(small molars) and the other three, and says that the former in the
upper jaw usually have two roots, and in the lower, one only, whilst
the last three upper molars usually have three roots and the lower
ones two. As everyone sees, these indications are, in the main,
exact.
Other important facts established by Vesalius are as follows:
The canines are, of all the teeth, those which have the longest roots.
The middle upper incisors are larger and broader than the lateral
ones, and their roots are longer. The roots of the last molars are
smaller than those of the two preceding molars. In the penultimate
and antepenultimate molars, more often than in the other teeth, it
sometimes happens that a greater number of roots than usual are
found, it being not very rare to meet with upper molars with four
roots, and lower ones with three. The molars are not always five in
each half jaw; sometimes there are only four, either on each side, or
on one side only, in only one jaw or in both. Such differences
generally depend on the last molar, which does not always appear
externally, remaining sometimes completely hidden in the maxillary
bone, or only just piercing with some of its cusps the thin plate of
bone which covers it; a thing which Vesalius could observe in many
skulls in the cemeteries.
In regard to the last molar, the author speaks of its tardy eruption
and of the violent pains which not unfrequently accompany it. The
doctors, he adds, not recognizing the cause of the pain, to make it
cease have recourse to the extraction of teeth, or else, attributing it
to some defects of the humors, overwhelm the sufferer with pills and
other internal remedies, whereas the best remedy would have been
the scarification of the gums in the region of the last molar and
sometimes the piercing of the osseous plate which covers it.
This curative method, of which no one can fail to recognize the
importance, was experimented by Vesalius on himself, in his twenty-
sixth year, precisely at the time that he had just begun to write his
great treatise on anatomy.
The existence of the central chamber of the teeth appears to have
been unknown to Galen, as he does not allude to it in the least.
Vesalius was the first to put this most important anatomical fact in
evidence. He expresses an opinion that the central cavity facilitates
the nutrition of the tooth. He says, besides, that when a hole is
produced in a tooth by reason of acrid corrosive humors, the
corrosion, when once the internal cavity is reached, spreads rapidly
and deeply in the tooth, owing to the existence of the said cavity,
and sometimes reaches even the end of the root.
In the chapter in which Vesalius treats of the anatomy of the teeth
(Chapter XI, p. 40), two very well-drawn figures are found, one of
which represents a section of a lower molar, showing the pulp cavity
and its prolongation into the two root canals. The other represents
the upper and lower teeth of the right side, in their reciprocal
positions, and shows very clearly their general shape, the length of
their roots, and the number of these.
The changes which take place in the alveolus, after the extraction of
a tooth have not escaped the notice of Vesalius. He says that after
an extraction the walls of the alveolus approach one another, and
the cavity is gradually obliterated.
Aristotle had affirmed that men have a greater number of teeth than
women. Vesalius declares this opinion absolutely false—although,
after Aristotle, it has been repeated by many other ancient writers—
and says that anyone can convince himself that the assertion of
Aristotle is contrary to the truth, as it is possible for everybody to
count his own teeth.
In spite of this, we find the above-mentioned error even in writers
subsequent to Vesalius; for example, in Heurnius (professor at
Leyden toward the end of the sixteenth century), who expresses an
opinion that rarely do women have thirty-two teeth, like men.
We find but little in Vesalius concerning the development of the
teeth. He, indeed, made some observations and researches on this
point, but these, from their insufficiency, led him to quite mistaken
conclusions. The teeth of children, he says, have imperfect, soft,
and, as it were, medullary roots; and the part of the tooth which
appears above the gums is united to the root, so to say, as a mere
appendix, after the fall of which there grows from the root the
permanent tooth. This error arose in the mind of Vesalius from
observing that when children lose their milk teeth, these have the
appearance of a kind of stump, as if the root had actually remained
in the socket. Besides this, he had observed with what facility the
milk teeth fall out; and he here calls to mind that, when about seven
years old, he himself and his companions used to pluck out their
loosened teeth, and especially the incisors, with their fingers, or with
a thread tied around the tooth. The softness of the dental roots in
children, the easy fall of the milk teeth, and the want of the lower
part of the roots in these, must have raised the idea in his mind that
the roots of the milk teeth remained in the socket, and that the
upper part of the temporary teeth, instead of being a continuation of
the root, was joined to this as a simple appendix, and in a very weak
way, as though designed to remain in place for a limited length of
time only.
In Vesalius284 is found a dental terminology—Latin, Greek, Hebrew,
and Arabic—which affords some interest. The incisors are called in
Latin incisorii, risorii, quaterni, quadrupli; and the two middle incisors
have been denominated by some authors duales. The canines are
called in Greek kynodontes, which means the same as the Latin
canini, dog’s teeth. In Latin they have been also denominated
mordentes, and by some also risorii, a name which by others is
given to the incisors, as we have already seen. The molars have also
been called in Latin maxillares, paxillares, mensales, genuini.285 But
some authors give this last name only to the last molars, or wisdom
teeth, dentes sensus et sapientiæ et intellectus. These teeth have
also been called serotini (that is, tardy), ætatem complentes (that is,
completing the age, the growth), and also, in barbaric Latin,
cayseles or caysales, negugidi, etc.
In the rebellion against the authority of the ancients, Vesalius had a
predecessor whose name, deservedly famous, may be recorded
here. Paracelsus (born in 1493 at Maria-Einsiedeln, Switzerland), on
being nominated, in 1527, Professor of Medicine and Surgery at
Basle, inaugurated his lectures by burning in the presence of his
audience, who were stunned by such temerity, the writings of Galen
and Avicenna, just as Luther, seven years before, had burnt in the
public square of Wittenberg the papal bulls and decretals. The
sixteenth century, in its exuberance of intellectual life, was
undoubtedly one of the grandest centuries in history; human
thought in that glorious epoch shattered its chains, and declared its
freedom both in matters of science and of religion.
Paracelsus, a man of powerful genius, but not well balanced in mind,
of corrupt morals, and of an unlimited pride, had, notwithstanding
these undeniable defects, the merit of beginning a healthy reform in
the science and practice of medicine, by substituting the study of
nature for the authority of the ancients and by giving a great
importance to chemistry, both for the explanation of organic
phenomena and for the cure of disease.
It is to be lamented that this man of genius did not contribute in any
way to the progress of dentistry. His works have no importance for
us. As a matter of mere curiosity we only record here that Paracelsus
considered the too precocious development of the teeth as a great
anomaly, and regarded as monsters those children who were born
with teeth.286
Paracelcus.
Gian Filippo Ingrassia.
Gabriel Fallopius.
Gian Filippo Ingrassia (1510 to 1580), a distinguished Sicilian
anatomist, was one of the first who spoke of the dental germ. He
says that the existence of the tooth properly so called is preceded by
that of a soft dental substance enclosed in the bone, and which he
considers almost as a secretion of the latter.
Matteo Realdo Colombo, of Cremona, a pupil of Vesalius and his
successor in the professorship of Anatomy at Padua, added but little,
as regards the teeth, to what his master has taught. He combated
the erroneous idea that the teeth were formed in the alveoli shortly
before their eruption. Having dissected the jaws of many fetuses,
and having always observed in them the existence of teeth, he could
affirm with every certainty that the teeth begin to be formed in intra-
uterine life.
Like Vesalius, Realdo Colombo believed that the permanent teeth
were developed from the roots of the milk teeth; and, therefore, he
advised the utmost caution in extracting these, since, if the whole
root were removed, the tooth would not grow again.287
Gabriel Fallopius (1523 to 1562), the eminent anatomist of Modena,
also a disciple of Vesalius, carried out accurate and successful
researches in regard to the development of the teeth, and made
them known in his book, Observationes anatomicæ, published at
Venice in 1562, the year in which he died.
His investigations enabled him to show the falsity of the opinion held
by Vesalius, that the permanent teeth are developed from the roots
of the temporary ones. He was, besides, the first who spoke in clear
terms of the dental follicle.
The teeth, says Fallopius,288 are generated twice over, that is, the
first time in the uterus, after the formation of the jaws, and the
second time in extra-uterine life, before the seventh year. The first
teeth are, at the time of birth, still imperfect, without roots,
completely enclosed in their alveoli, and formed of two different
substances; the part with which they must break their way out is
osseous and hollowed; the deeper part, instead, is soft and humid
and is seen covered with a thin pellicle, a thing which may also be
observed in the feathers of birds when they are still tender. In fact,
the part of the feather which comes out of the skin is hard and
corneous, whilst the part which is embedded in the wings is soft and
humid and has the appearance of coagulated blood or mucus. So
also in the fetal teeth, the part corresponding to the future root
presents itself like coagulated mucus. Little by little this soft
substance hardens and becomes osseous, thus constituting the root
of the tooth.
Fallopius’ reference to the analogy between the development of
teeth and that of feathers was highly important, as a point of
departure for embryological researches which showed clearly the
real nature of teeth, thus destroying the mistaken idea—held by
Galen and many other authors—that these organs were bones.
On coming to speak of the teeth generated in extra-uterine life, that
is of the permanent teeth, Fallopius relates having observed that
they have their origin in the following manner: A membranous
follicle is formed inside the bone furnished with two apices, one
posterior (that is to say, deeper down, more distant from the surface
of the gums), to which is joined a small nerve, a small artery, and a
small vein (cui nervulus, et arteriola, et venula applicantur); the
other anterior (that is more superficial), which terminates in a
filament or small string, like a tail. This string reaches right to the
gum, passing through a very narrow aperture in the bone, by the
side of the tooth which is to be substituted by the new one. Inside
the follicle is formed a special white and tenacious substance, and
from this the tooth itself, which at first is osseous only in the part
nearest the surface, whilst the deeper part is still soft, that is,
formed of the above-mentioned substance. Each tooth comes out
traversing and widening the narrow aperture through which the
“tail” of the follicle passes. The latter breaks, and the tooth comes
out of the gum, bare and hard; and in process of time the formation
of its deeper part is completed.
The author says that his long and laborious researches into the
development of the teeth were carried out with great accuracy, and
he is, therefore, in a position to give as absolute certainties the facts
exposed by him. Indeed, the observations of Fallopius were, for the
most part, confirmed by subsequent research. As to the “tail” of the
dental follicle, it is identical with the iter dentis or gubernaculum
dentis of some authors. Fallopius described it as a simple string, but
later on this prolongation of the dental follicle has been considered,
at least by some, as the narrowest part or neck of the follicle itself,
that is, as a channel through which the tooth passes, widening it, on
its way out, and precisely for this reason it has been called iter
dentis (the way of the tooth) or gubernaculum dentis (helm or guide
of the tooth).
Bartholomeus Eustachius, another great anatomist of the sixteenth
century, occupied himself in the study of teeth with special interest,
and wrote a very valuable monograph on this subject. He was a
native of San Severino, Marche (Italy), and a contemporary of
Vesalius, Ingrassia, Realdo Colombo, and Fallopius; he died in 1574,
after having immortalized his name through many anatomical
discoveries and writings of the highest value.
Bartholomeus Eustachius
His book on the teeth, Libellus de dentibus, published at Venice in
1563, is the first treatise ever written on the anatomy of teeth, and
represents a noteworthy progress in this branch of study.
In this little book—divided into thirty chapters, forming in all ninety-
five pages—the author treats with great accuracy and in an
admirable manner all that concerns the anatomy, physiology, and
development of the teeth.
Eustachius not only treasured up what ancient authors had written
on this subject, but he himself made very long and patient
researches and observations on men and animals, on living
individuals as well as on corpses, and not only on adult subjects, but
also on children of every age, on stillborn children and on abortive
fetuses.
The macroscopic anatomy of the teeth was brought by him to a high
degree of perfection. Very wonderful, among other things, is the
accuracy with which he studied and specified in several synoptical
tables the number of the roots of molar teeth, and all the variations
occurring not only in their number, but also in their form, length, etc.
In Chapter IV, speaking of the means by which teeth are held in
their sockets, Eustachius mentions in quite explicit terms the
ligaments of the teeth. He begins by saying that the perfect
correspondence between the dental roots and the alveoli, both in
shape and in size, is one of the elements which contribute to the
firmness of the teeth, since the alveolus, being exactly applied, on
all sides, to the root or roots of the tooth, causes the latter, by this
simple fact, to be fixed in a determined position. Also, the nerves
inserted in each single tooth contribute, as was already the opinion
of Galen, to the stability of these organs. “There exist besides”—
Eustachius continues—“very strong ligaments, principally attached to
the roots, by which these latter are tightly connected with the
alveoli” (adsunt præterea vincula fortissima radicibus præcipue
adherentia, quibus præsepiolis arctissime colligantur). Lastly, says
the author, the gums, too, embracing the teeth at their exit from the
alveoli, contribute to their firmness. And here Eustachius notes that
in the joining of the gums to the teeth there is great analogy to that
of the skin with the finger nails; a very proper observation, which
makes us almost suppose that the perspicacious mind of Eustachius
may have guessed the kindred nature of nails and teeth.
In Chapter XV are related the researches made by the author to
ascertain at what period the development of the teeth begins. Here
is a passage of this chapter, almost literally translated:
“Hippocrates, before anyone else, wrote that the first teeth are
formed in the uterus. Wishing to assure myself thereof, I dissected
many abortive fetuses, and by very careful observations I found it to
be true that the teeth have their origin during intra-uterine life.
Wherefore, the opinion of those who consider that the first teeth are
formed from the milk, and those of the second dentition from food
and drink, must be declared entirely false. In fact, by opening both
jaws of a stillborn fetus, one may find, on each side of each jaw, the
incisors, the canine, and three molars, partly mucous and partly
osseous, and already sufficiently large and entirely surrounded by
their alveoli. Then removing, with a skilful hand, the incisors and the
canines, there may be observed a very thin partition only just
ossified; and if this be removed with equal care, an equal number of
incisors and canines, almost mucous and very much smaller, appear,
which, enclosed in special alveoli behind the first, would exactly
correspond in position each with its congener, if in both jaws the
canine were not resting for the greater part on the next incisor so as
almost to hide it.”
As to the molars (by which name also the bicuspids are here meant),
Eustachius says that he found but three on each side, and no trace
whatever of the others. Nevertheless, he considers it quite probable
that the germs of the latter should also exist in the fetus, although
so small as to escape observation. He gives many ingenious reasons
in support of his mode of thinking, and comes to the general
conclusion, that not only the temporary teeth but also the
permanent ones have, all of them, their origin during fetal life; a
false conclusion simply because too general, and which shows once
more how, in biological science, one runs great risk of falling into
error whenever one tries to draw too free deductions from observed
phenomena.
The researches of Fallopius and Eustachius confirm and complete
each other. These two eminent anatomists, who gave great glory to
Italy by their immortal discoveries and works, were the first to shed
a brilliant light upon the development of the teeth, and thus opened
up the way to all subsequent research on odontogeny.
In settling the period in which the formation of the teeth begins,
Fallopius was still more successful than Eustachius. His patient
investigations showed him that the development of the teeth
commences partly in the uterus and partly after birth, which is
perfectly true, as was made clear by later embryological researches.
Fallopius found in each fetal jaw twelve teeth.289 In this he agrees
perfectly with his contemporary, Eustachius, who, as we have seen a
short while ago, found in fetusus, only just born, the incisors, the
canines, and three molars for each side of each jaw. Eustachius,
however, observed in the fetus the germs of the permanent incisors
and canines as well, a thing not noted by Fallopius.
It is not to be wondered at that some discrepancy should exist
between the observations of these two eminent anatomists. The
researches of which we are speaking are sufficiently delicate and
difficult; and even much more recent authors are far from agreeing
perfectly, as far as regards the period, in which the development of
the teeth begins. Serres, in his Essai sur l’anatomie et la physiologie
des dents (Paris, 1817), sustains the view that in the fetus he has
observed the germs of all the teeth, both temporary and permanent,
while Joseph Linderer (Handbuch der Zahnheilkunde, Berlin, 1842)
says that, although he has followed the preparative method
indicated by Serres, he could never discover in the fetus the germs
of all the teeth. Perhaps, he adds, the time when the development
of the teeth begins varies considerably in individuals, just as we
remark differences in the time of eruption.
In Chapter XVII of his book, Eustachius speaks of the process of
formation of the teeth, which he studied in abortive fetuses, in
stillborn children, in children a few months old, and also in kids.
On dissecting a fetal jaw, there may be found on each side, as we
have already seen, the incisors, the canines, and three molars, still
soft and imperfect, separated from one another by very thin osseous
partitions. Each of these teeth is enclosed within a follicle or little
bag of a grayish white color, rather more mucous and glutinous than
membranous, and in form somewhat like the pod of a vegetable,
with the only difference that it shows an opening at one of the
extremities, from which the tooth somewhat protrudes, as if it were
germinating. The more recent and softer the tooth, the more its
follicle has a mucous appearance and differs from the nature of
membranes. As it does not adhere to the underlying tooth, it is easy
to separate them. As to the tooth, it is at that period of its
development partly osseous and partly mucous, since that part
which later on projects from the gum soon becomes transformed
into a white thin and concave scale, which gives the idea of one of
the little cells of a honeycomb. This scale is harder and more
conspicuous in the incisors, since these, at this stage, are better
formed; the canines are less advanced in development, and the
molars still less; and among these latter, those are less developed
which are more distant from the canines. The deeper part of the
tooth consists of a mucous and tenacious substance, harder,
however, than the substance of the follicle, and of a whitish color
with a tendency to dark red, translucent, and somewhat brilliant.
Thus, says Eustachius, the teeth present themselves in a human
fetus; but he who cannot obtain a human fetus may observe the
same things in a kid.
Although the author does not express himself very explicitly, he
seems to consider the follicle of the tooth substantially identical with
its ligament. “This is at first mucous, but afterward, becoming more
consistent, causes the tooth to adhere to the socket and gum very
firmly, as if it were glued.”
“As the part of the tooth which comes out of the gum projects from
the aperture of the follicle like a gem from its bezel, so—says
Eustachius—some believe that the crown of a temporary tooth is a
mere appendix, and that the follicle comes out of its concavity
through a dividing line which they imagine to exist between this
supposed appendix and the remaining part of the tooth. But
assuredly those who assert such things show that they have studied
the anatomy of the teeth so carelessly that, by this one error, they
make manifest their great ignorance together with their great
temerity.290 The line which is observed on the tooth on the part
corresponding to the adhesion of the gingival margin and of the
dental ligament is very superficial, and after having scraped it away,
there does not remain any trace of a division. But apart from this
everyone can very easily observe, even in infants, or in kids, that the
tooth when ossified does not present any line of division and that
the still mucous follicle envelops it freely, and may be easily
separated from the tooth; which would not be the case, if the follicle
issued from between the tooth and its supposed appendix.”
Thus, Eustachius declares entirely false the opinion already
expressed by Celsus, that the permanent tooth grows from the root
of the milk tooth. He affirms clearly and decisively that between the
external and the radical part of a milk tooth no real division exists,
and that the ossification of the tooth, beginning from the crown,
proceeds without any interruption right down to the end of the root.
If it were true, says he, that in children only the imaginary epiphysis
or appendix falls, and that the new tooth is substantially represented
by the remaining part of the first, it could never happen, as instead
it often does, that the new tooth appears before the first one falls.
Besides, between the lower part of the first tooth and the upper part
of the second no correspondence exists either in size or shape, as
ought necessarily to be the case if the two parts were joined
together. This is not all; the lower part of the temporary tooth is
perforated, and receives in its interior bloodvessels and nerves,
whilst the upper part of the permanent tooth is quite massive and
imperforated. How, then, could this second tooth transmit
bloodvessels and nerves into the cavity of the first? Again, how could
the continuity of these bloodvessels and nerves with their respective
branches be possible, if an imperforate body, such as the crown of
the permanent tooth, were really interposed?
But what is the use of so many arguments? exclaimed Eustachius. To
remove even the slightest doubt and to put an end to any
controversy on such a point, only one fact is sufficient, which is
revealed to us by anatomical dissection, and that is, that the teeth
which appear about the seventh year are not only not united to
those which fall at the same period, but cannot even be in contact
with them, owing to the presence of a thin osseous partition.
In the following chapter291 Eustachius speaks of the central cavity of
the teeth and of the substance contained in it. In young teeth, he
says, the dental cavity is very large, in proportion to the size of the
tooth. According to some anatomists, the central cavity of a tooth is
coated by a very soft and thin membrane, formed by a tissue of very
small vessels and nerves; and besides, this cavity is filled with
marrow, like hollow bones. The observations of the author, however,
do not agree with these statements. The dental cavity does not
contain any fatty substance analogous to the marrow of bones. As to
the above-mentioned membrane, Eustachius doubts its existence.
The large hollow existing in children’s teeth contains, he says, a
mucous substance, somewhat hard, and very smooth at its surface—
almost like a cuticle—but which has rather the appearance of a
concretion than of a membranous tissue. At any rate, adds
Eustachius, if the substance alluded to is made to dry up in the
shade, it acquires an appearance not unlike that of a membrane. It
is certain, however, that at an early age the substance contained in
the dental cavity does not adhere to the walls of the latter after the
manner of a periosteum, but is found in simple contact with the
same, and can, therefore, be separated from them with the greatest
ease.
As years pass by, the dental cavity becomes narrower and narrower,
because the substance contained inside the tooth gradually becomes
ossified at the surface, adhering to the dental scale previously
formed, in the very same manner as the internal or woody part of a
tree adheres to the bark. Of the two hard substances which make up
a tooth, the outer one is white, tense, and dense, like marble, the
underlying one, instead, is somewhat dark, rough, and less compact.
To observe accurately the above-mentioned facts, the author advises
searching for them, first, in the molar teeth of the ox or the ram,
and then in human teeth, and likewise, first in children or in recently
born animals, and then in adults.
Chapters XIX and XX are, comparatively speaking, of little
importance. In the former the author undertakes especially to