100% found this document useful (1 vote)
215 views

Download full Text Analytics with Python A Practical Real World Approach to Gaining Actionable Insights from Your Data 1st Edition Dipanjan Sarkar ebook all chapters

Real

Uploaded by

urtezforkskf
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
215 views

Download full Text Analytics with Python A Practical Real World Approach to Gaining Actionable Insights from Your Data 1st Edition Dipanjan Sarkar ebook all chapters

Real

Uploaded by

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

Download the Full Version of textbook for Fast Typing at textbookfull.

com

Text Analytics with Python A Practical Real World


Approach to Gaining Actionable Insights from Your
Data 1st Edition Dipanjan Sarkar

https://textbookfull.com/product/text-analytics-with-python-
a-practical-real-world-approach-to-gaining-actionable-
insights-from-your-data-1st-edition-dipanjan-sarkar/

OR CLICK BUTTON

DOWNLOAD NOW

Download More textbook Instantly Today - Get Yours Now at textbookfull.com


Recommended digital products (PDF, EPUB, MOBI) that
you can download immediately if you are interested.

Text Analytics with Python - A Practitioner's Guide to


Natural Language Processing 2nd Edition Dipanjan Sarkar

https://textbookfull.com/product/text-analytics-with-python-a-
practitioners-guide-to-natural-language-processing-2nd-edition-
dipanjan-sarkar/
textboxfull.com

Practical Python Data Visualization: A Fast Track Approach


To Learning Data Visualization With Python Ashwin Pajankar

https://textbookfull.com/product/practical-python-data-visualization-
a-fast-track-approach-to-learning-data-visualization-with-python-
ashwin-pajankar/
textboxfull.com

Product Analytics: Applied Data Science Techniques for


Actionable Consumer Insights (Pearson Business Analytics
Series) 1st Edition Rodrigues
https://textbookfull.com/product/product-analytics-applied-data-
science-techniques-for-actionable-consumer-insights-pearson-business-
analytics-series-1st-edition-rodrigues/
textboxfull.com

Practical Natural Language Processing with Python With


Case Studies from Industries Using Text Data at Scale 1st
Edition Mathangi Sri
https://textbookfull.com/product/practical-natural-language-
processing-with-python-with-case-studies-from-industries-using-text-
data-at-scale-1st-edition-mathangi-sri/
textboxfull.com
Stream Analytics with Microsoft Azure Real time data
processing for quick insights using Azure Stream Analytics
1st Edition Anindita Basak
https://textbookfull.com/product/stream-analytics-with-microsoft-
azure-real-time-data-processing-for-quick-insights-using-azure-stream-
analytics-1st-edition-anindita-basak/
textboxfull.com

Mastering Machine Learning with Python in Six Steps: A


Practical Implementation Guide to Predictive Data
Analytics Using Python 1st Edition Manohar Swamynathan
(Auth.)
https://textbookfull.com/product/mastering-machine-learning-with-
python-in-six-steps-a-practical-implementation-guide-to-predictive-
data-analytics-using-python-1st-edition-manohar-swamynathan-auth/
textboxfull.com

Python Real World Machine Learning: Real World Machine


Learning: Take your Python Machine learning skills to the
next level 1st Edition Joshi
https://textbookfull.com/product/python-real-world-machine-learning-
real-world-machine-learning-take-your-python-machine-learning-skills-
to-the-next-level-1st-edition-joshi/
textboxfull.com

Real World Python A Hacker s Guide to Solving Problems


with Code 1st Edition Lee Vaughan

https://textbookfull.com/product/real-world-python-a-hacker-s-guide-
to-solving-problems-with-code-1st-edition-lee-vaughan/

textboxfull.com

Data Science and Analytics with Python 1st Edition Jesus


Rogel-Salazar

https://textbookfull.com/product/data-science-and-analytics-with-
python-1st-edition-jesus-rogel-salazar/

textboxfull.com
Text Analytics
with Python
A Practical Real-World Approach to
Gaining Actionable Insights from
Your Data

Dipanjan Sarkar
Text Analytics
with Python
A Practical Real-World
Approach to Gaining Actionable
Insights from your Data

Dipanjan Sarkar
Text Analytics with Python: A Practical Real-World Approach to Gaining Actionable
Insights from Your Data
Dipanjan Sarkar
Bangalore, Karnataka
India
ISBN-13 (pbk): 978-1-4842-2387-1 ISBN-13 (electronic): 978-1-4842-2388-8
DOI 10.1007/978-1-4842-2388-8
Library of Congress Control Number: 2016960760
Copyright © 2016 by Dipanjan Sarkar
This work is subject to copyright. All rights are reserved by the Publisher, whether the whole
or part of the material is concerned, specifically the rights of translation, reprinting, reuse of
illustrations, recitation, broadcasting, reproduction on microfilms or in any other physical
way, and transmission or information storage and retrieval, electronic adaptation, computer
software, or by similar or dissimilar methodology now known or hereafter developed.
Trademarked names, logos, and images may appear in this book. Rather than use a trademark
symbol with every occurrence of a trademarked name, logo, or image we use the names, logos,
and images only in an editorial fashion and to the benefit of the trademark owner, with no
intention of infringement of the trademark.
The use in this publication of trade names, trademarks, service marks, and similar terms, even
if they are not identified as such, is not to be taken as an expression of opinion as to whether or
not they are subject to proprietary rights.
While the advice and information in this book are believed to be true and accurate at the
date of publication, neither the authors nor the editors nor the publisher can accept any legal
responsibility for any errors or omissions that may be made. The publisher makes no warranty,
express or implied, with respect to the material contained herein.
Managing Director: Welmoed Spahr
Lead Editor: Mr. Sarkar
Technical Reviewer: Shanky Sharma
Editorial Board: Steve Anglin, Pramila Balan, Laura Berendson, Aaron Black,
Louise Corrigan, Jonathan Gennick, Robert Hutchinson, Celestin Suresh John,
Nikhil Karkal, James Markham, Susan McDermott, Matthew Moodie, Natalie Pao,
Gwenan Spearing
Coordinating Editor: Sanchita Mandal
Copy Editor: Corbin Collins
Compositor: SPi Global
Indexer: SPi Global
Artist: SPi Global
Distributed to the book trade worldwide by Springer Science+Business Media New York,
233 Spring Street, 6th Floor, New York, NY 10013. Phone 1-800-SPRINGER, fax (201) 348-4505,
e-mail [email protected], or visit www.springeronline.com. Apress Media, LLC is a
California LLC and the sole member (owner) is Springer Science + Business Media Finance Inc
(SSBM Finance Inc). SSBM Finance Inc is a Delaware corporation.
For information on translations, please e-mail [email protected], or visit www.apress.com.
Apress and friends of ED books may be purchased in bulk for academic, corporate,
or promotional use. eBook versions and licenses are also available for most titles.
For more information, reference our Special Bulk Sales–eBook Licensing web page at
www.apress.com/bulk-sales.
Any source code or other supplementary materials referenced by the author in this text are
available to readers at www.apress.com. For detailed information about how to locate your
book’s source code, go to www.apress.com/source-code/. Readers can also access source code
at SpringerLink in the Supplementary Material section for each chapter.
Printed on acid-free paper
This book is dedicated to my parents, partner, well-wishers,
and especially to all the developers, practitioners, and
organizations who have created a wonderful and thriving
ecosystem around analytics and data science.
Contents at a Glance

About the Author����������������������������������������������������������������������������� xv


About the Technical Reviewer������������������������������������������������������� xvii
Acknowledgments�������������������������������������������������������������������������� xix
Introduction������������������������������������������������������������������������������������ xxi


■Chapter 1: Natural Language Basics���������������������������������������������� 1

■Chapter 2: Python Refresher�������������������������������������������������������� 51

■Chapter 3: Processing and Understanding Text�������������������������� 107

■Chapter 4: Text Classification����������������������������������������������������� 167

■Chapter 5: Text Summarization�������������������������������������������������� 217

■Chapter 6: Text Similarity and Clustering����������������������������������� 265

■Chapter 7: Semantic and Sentiment Analysis���������������������������� 319

Index���������������������������������������������������������������������������������������������� 377

v
Contents

About the Author����������������������������������������������������������������������������� xv


About the Technical Reviewer������������������������������������������������������� xvii
Acknowledgments�������������������������������������������������������������������������� xix
Introduction������������������������������������������������������������������������������������ xxi


■Chapter 1: Natural Language Basics���������������������������������������������� 1
Natural Language������������������������������������������������������������������������������������ 2
What Is Natural Language?�������������������������������������������������������������������������������������� 2
The Philosophy of Language������������������������������������������������������������������������������������� 2
Language Acquisition and Usage������������������������������������������������������������������������������ 5

Linguistics����������������������������������������������������������������������������������������������� 8
Language Syntax and Structure������������������������������������������������������������ 10
Words��������������������������������������������������������������������������������������������������������������������� 11
Phrases������������������������������������������������������������������������������������������������������������������� 12
Clauses������������������������������������������������������������������������������������������������������������������� 14
Grammar����������������������������������������������������������������������������������������������������������������� 15
Word Order Typology����������������������������������������������������������������������������������������������� 23

Language Semantics����������������������������������������������������������������������������� 25
Lexical Semantic Relations������������������������������������������������������������������������������������ 25
Semantic Networks and Models����������������������������������������������������������������������������� 28
Representation of Semantics��������������������������������������������������������������������������������� 29

vii
■ Contents

Text Corpora������������������������������������������������������������������������������������������ 37
Corpora Annotation and Utilities����������������������������������������������������������������������������� 38
Popular Corpora������������������������������������������������������������������������������������������������������ 39
Accessing Text Corpora������������������������������������������������������������������������������������������ 40

Natural Language Processing��������������������������������������������������������������� 46


Machine Translation������������������������������������������������������������������������������������������������ 46
Speech Recognition Systems��������������������������������������������������������������������������������� 47
Question Answering Systems��������������������������������������������������������������������������������� 47
Contextual Recognition and Resolution������������������������������������������������������������������ 48
Text Summarization������������������������������������������������������������������������������������������������ 48
Text Categorization������������������������������������������������������������������������������������������������� 49

Text Analytics���������������������������������������������������������������������������������������� 49
Summary����������������������������������������������������������������������������������������������� 50

■Chapter 2: Python Refresher�������������������������������������������������������� 51
Getting to Know Python������������������������������������������������������������������������� 51
The Zen of Python��������������������������������������������������������������������������������������������������� 54
Applications: When Should You Use Python?���������������������������������������������������������� 55
Drawbacks: When Should You Not Use Python?����������������������������������������������������� 58
Python Implementations and Versions������������������������������������������������������������������� 59
Installation and Setup��������������������������������������������������������������������������� 60
Which Python Version?������������������������������������������������������������������������������������������� 60
Which Operating System?�������������������������������������������������������������������������������������� 61
Integrated Development Environments������������������������������������������������������������������ 61
Environment Setup������������������������������������������������������������������������������������������������� 62
Virtual Environments���������������������������������������������������������������������������������������������� 64

Python Syntax and Structure����������������������������������������������������������������� 66

viii
■ Contents

Data Structures and Types�������������������������������������������������������������������� 69


Numeric Types�������������������������������������������������������������������������������������������������������� 70
Strings�������������������������������������������������������������������������������������������������������������������� 72
Lists������������������������������������������������������������������������������������������������������������������������ 73
Sets������������������������������������������������������������������������������������������������������������������������ 74
Dictionaries������������������������������������������������������������������������������������������������������������� 75
Tuples��������������������������������������������������������������������������������������������������������������������� 76
Files������������������������������������������������������������������������������������������������������������������������ 77
Miscellaneous��������������������������������������������������������������������������������������������������������� 78

Controlling Code Flow��������������������������������������������������������������������������� 78


Conditional Constructs������������������������������������������������������������������������������������������� 79
Looping Constructs������������������������������������������������������������������������������������������������� 80
Handling Exceptions����������������������������������������������������������������������������������������������� 82

Functional Programming����������������������������������������������������������������������� 84
Functions���������������������������������������������������������������������������������������������������������������� 84
Recursive Functions����������������������������������������������������������������������������������������������� 85
Anonymous Functions�������������������������������������������������������������������������������������������� 86
Iterators������������������������������������������������������������������������������������������������������������������ 87
Comprehensions����������������������������������������������������������������������������������������������������� 88
Generators�������������������������������������������������������������������������������������������������������������� 90
The itertools and functools Modules���������������������������������������������������������������������� 91
Classes�������������������������������������������������������������������������������������������������� 91
Working with Text���������������������������������������������������������������������������������� 94
String Literals��������������������������������������������������������������������������������������������������������� 94
String Operations and Methods������������������������������������������������������������������������������ 96

Text Analytics Frameworks����������������������������������������������������������������� 104


Summary��������������������������������������������������������������������������������������������� 106

ix
■ Contents


■Chapter 3: Processing and Understanding Text�������������������������� 107
Text Tokenization��������������������������������������������������������������������������������� 108
Sentence Tokenization������������������������������������������������������������������������������������������ 108
Word Tokenization������������������������������������������������������������������������������������������������ 112

Text Normalization������������������������������������������������������������������������������� 115


Cleaning Text�������������������������������������������������������������������������������������������������������� 115
Tokenizing Text����������������������������������������������������������������������������������������������������� 116
Removing Special Characters������������������������������������������������������������������������������� 116
Expanding Contractions���������������������������������������������������������������������������������������� 118
Case Conversions������������������������������������������������������������������������������������������������� 119
Removing Stopwords�������������������������������������������������������������������������������������������� 120
Correcting Words�������������������������������������������������������������������������������������������������� 121
Stemming������������������������������������������������������������������������������������������������������������� 128
Lemmatization������������������������������������������������������������������������������������������������������ 131

Understanding Text Syntax and Structure������������������������������������������� 132


Installing Necessary Dependencies���������������������������������������������������������������������� 133
Important Machine Learning Concepts����������������������������������������������������������������� 134
Parts of Speech (POS) Tagging����������������������������������������������������������������������������� 135
Shallow Parsing���������������������������������������������������������������������������������������������������� 143
Dependency-based Parsing���������������������������������������������������������������������������������� 153
Constituency-based Parsing��������������������������������������������������������������������������������� 158

Summary��������������������������������������������������������������������������������������������� 165

■Chapter 4: Text Classification����������������������������������������������������� 167
What Is Text Classification?����������������������������������������������������������������� 168
Automated Text Classification������������������������������������������������������������� 170
Text Classification Blueprint���������������������������������������������������������������� 172
Text Normalization������������������������������������������������������������������������������� 174
Feature Extraction������������������������������������������������������������������������������� 177

x
■ Contents

Bag of Words Model���������������������������������������������������������������������������������������������� 179


TF-IDF Model�������������������������������������������������������������������������������������������������������� 181
Advanced Word Vectorization Models������������������������������������������������������������������� 187

Classification Algorithms��������������������������������������������������������������������� 193


Multinomial Naïve Bayes�������������������������������������������������������������������������������������� 195
Support Vector Machines�������������������������������������������������������������������������������������� 197

Evaluating Classification Models��������������������������������������������������������� 199


Building a Multi-Class Classification System�������������������������������������� 204
Applications and Uses������������������������������������������������������������������������� 214
Summary��������������������������������������������������������������������������������������������� 215

■Chapter 5: Text Summarization�������������������������������������������������� 217
Text Summarization and Information Extraction��������������������������������� 218
Important Concepts����������������������������������������������������������������������������� 220
Documents����������������������������������������������������������������������������������������������������������� 220
Text Normalization������������������������������������������������������������������������������������������������ 220
Feature Extraction������������������������������������������������������������������������������������������������ 221
Feature Matrix������������������������������������������������������������������������������������������������������ 221
Singular Value Decomposition������������������������������������������������������������������������������ 221
Text Normalization������������������������������������������������������������������������������� 223
Feature Extraction������������������������������������������������������������������������������� 224
Keyphrase Extraction�������������������������������������������������������������������������� 225
Collocations���������������������������������������������������������������������������������������������������������� 226
Weighted Tag–Based Phrase Extraction��������������������������������������������������������������� 230
Topic Modeling������������������������������������������������������������������������������������ 234
Latent Semantic Indexing������������������������������������������������������������������������������������� 235
Latent Dirichlet Allocation������������������������������������������������������������������������������������� 241
Non-negative Matrix Factorization����������������������������������������������������������������������� 245
Extracting Topics from Product Reviews�������������������������������������������������������������� 246

xi
■ Contents

Automated Document Summarization������������������������������������������������ 250


Latent Semantic Analysis������������������������������������������������������������������������������������� 253
TextRank��������������������������������������������������������������������������������������������������������������� 256
Summarizing a Product Description��������������������������������������������������������������������� 261

Summary��������������������������������������������������������������������������������������������� 263

■Chapter 6: Text Similarity and Clustering����������������������������������� 265
Important Concepts����������������������������������������������������������������������������� 266
Information Retrieval (IR)�������������������������������������������������������������������������������������� 266
Feature Engineering��������������������������������������������������������������������������������������������� 267
Similarity Measures���������������������������������������������������������������������������������������������� 267
Unsupervised Machine Learning Algorithms�������������������������������������������������������� 268

Text Normalization������������������������������������������������������������������������������� 268


Feature Extraction������������������������������������������������������������������������������� 270
Text Similarity�������������������������������������������������������������������������������������� 271
Analyzing Term Similarity�������������������������������������������������������������������� 271
Hamming Distance����������������������������������������������������������������������������������������������� 274
Manhattan Distance��������������������������������������������������������������������������������������������� 275
Euclidean Distance����������������������������������������������������������������������������������������������� 277
Levenshtein Edit Distance������������������������������������������������������������������������������������ 278
Cosine Distance and Similarity����������������������������������������������������������������������������� 283
Analyzing Document Similarity����������������������������������������������������������� 285
Cosine Similarity��������������������������������������������������������������������������������������������������� 287
Hellinger-Bhattacharya Distance�������������������������������������������������������������������������� 289
Okapi BM25 Ranking�������������������������������������������������������������������������������������������� 292

Document Clustering��������������������������������������������������������������������������� 296

xii
■ Contents

Clustering Greatest Movies of All Time������������������������������������������������ 299


K-means Clustering���������������������������������������������������������������������������������������������� 301
Affinity Propagation���������������������������������������������������������������������������������������������� 308
Ward’s Agglomerative Hierarchical Clustering����������������������������������������������������� 313

Summary��������������������������������������������������������������������������������������������� 317

■Chapter 7: Semantic and Sentiment Analysis���������������������������� 319
Semantic Analysis������������������������������������������������������������������������������� 320
Exploring WordNet������������������������������������������������������������������������������� 321
Understanding Synsets����������������������������������������������������������������������������������������� 321
Analyzing Lexical Semantic Relations������������������������������������������������������������������ 323

Word Sense Disambiguation��������������������������������������������������������������� 330


Named Entity Recognition������������������������������������������������������������������� 332
Analyzing Semantic Representations�������������������������������������������������� 336
Propositional Logic����������������������������������������������������������������������������������������������� 336
First Order Logic��������������������������������������������������������������������������������������������������� 338

Sentiment Analysis������������������������������������������������������������������������������ 342


Sentiment Analysis of IMDb Movie Reviews��������������������������������������� 343
Setting Up Dependencies ������������������������������������������������������������������������������������ 343
Preparing Datasets����������������������������������������������������������������������������������������������� 347
Supervised Machine Learning Technique������������������������������������������������������������� 348
Unsupervised Lexicon-based Techniques������������������������������������������������������������� 352
Comparing Model Performances�������������������������������������������������������������������������� 374
Summary��������������������������������������������������������������������������������������������� 376

Index���������������������������������������������������������������������������������������������� 377

xiii
About the Author

Dipanjan Sarkar is a data scientist at Intel, the world’s


largest silicon company, which is on a mission to make
the world more connected and productive. He primarily
works on analytics, business intelligence, application
development, and building large-scale intelligent
systems. He received his master’s degree in information
technology from the International Institute of Information
Technology, Bangalore, with a focus on data science and
software engineering. He is also an avid supporter of
self-learning, especially through massive open online
courses, and holds a data science specialization from
Johns Hopkins University on Coursera.

Sarkar has been an analytics practitioner for over four years, specializing in statistical,
predictive, and text analytics. He has also authored a couple of books on R and machine
learning, reviews technical books, and acts as a course beta tester for Coursera.
Dipanjan’s interests include learning about new technology, financial markets, disruptive
startups, data science, and more recently, artificial intelligence and deep learning. In his
spare time he loves reading, gaming, and watching popular sitcoms and football.

xv
About the Technical
Reviewer

Shanky Sharma Currently leading the AI team at Nextremer India, Shanky Sharma’s work
entails implementing various AI and machine learning–related projects and working on
deep learning for speech recognition in Indic languages. He hopes to grow and scale new
horizons in AI and machine learning technologies. Statistics intrigue him and he loves
playing with numbers, designing algorithms, and giving solutions to people. He sees
himself as a solution provider rather than a scripter or another IT nerd who codes. He
loves heavy metal and trekking and giving back to society, which, he believes, is the task
of every engineer. He also loves teaching and helping people. He is a firm believer that we
learn more by helping others learn.

xvii
Acknowledgments

This book would definitely not be a reality without the help and support from some
excellent people in my life. I would like to thank my parents, Digbijoy and Sampa,
my partner Durba, and my family and well-wishers for their constant support and
encouragement, which really motivates me and helps me strive to achieve more.
This book is based on various experiences and lessons learned over time. For that I
would like to thank my managers, Nagendra Venkatesh and Sanjeev Reddy, for believing
in me and giving me an excellent opportunity to tackle challenging problems and also
grow personally. For the wealth of knowledge I gained in text analytics in my early days,
I would like to acknowledge Dr. Mandar Mutalikdesai and Dr. Sanket Patil for not only
being good managers but excellent mentors.
A special mention goes out to my colleagues Roopak Prajapat and Sailaja
Parthasarathy for collaborating with me on various problems in text analytics. Thanks to
Tamoghna Ghosh for being a great mentor and friend who keeps teaching me something
new every day, and to my team, Raghav Bali, Tushar Sharma, Nitin Panwar, Ishan
Khurana, Ganesh Ghongane, and Karishma Chug, for making tough problems look easier
and more fun.
A lot of the content in this book would not have been possible without Christine Doig
Cardet, Brandon Rose, and all the awesome people behind Python, Continuum Analytics,
NLTK, gensim, pattern, spaCy, scikit-learn, and many more excellent open source
frameworks and libraries out there that make our lives easier. Also to my friend Jyotiska,
thank you for introducing me to Python and for learning and collaborating with me on
various occasions that have helped me become what I am today.
Last, but never least, a big thank you to the entire team at Apress, especially
to Celestin Suresh John, Sanchita Mandal, and Laura Berendson for giving me this
wonderful opportunity to share my experience and what I’ve learned with the community
and for guiding me and working tirelessly behind the scenes to make great things happen!

xix
Introduction

I have been into mathematics and statistics since high school, when numbers began to
really interest me. Analytics, data science, and more recently text analytics came much
later, perhaps around four or five years ago when the hype about Big Data and Analytics
was getting bigger and crazier. Personally I think a lot of it is over-hyped, but a lot of it is
also exciting and presents huge possibilities with regard to new jobs, new discoveries, and
solving problems that were previously deemed impossible to solve.
Natural Language Processing (NLP) has always caught my eye because the human
brain and our cognitive abilities are really fascinating. The ability to communicate
information, complex thoughts, and emotions with such little effort is staggering once
you think about trying to replicate that ability in machines. Of course, we are advancing
by leaps and bounds with regard to cognitive computing and artificial intelligence (AI),
but we are not there yet. Passing the Turing Test is perhaps not enough; can a machine
truly replicate a human in all aspects?
The ability to extract useful information and actionable insights from heaps of
unstructured and raw textual data is in great demand today with regard to applications in
NLP and text analytics. In my journey so far, I have struggled with various problems, faced
many challenges, and learned various lessons over time. This book contains a major
chunk of the knowledge I’ve gained in the world of text analytics, where building a fancy
word cloud from a bunch of text documents is not enough anymore.
Perhaps the biggest problem with regard to learning text analytics is not a lack of
information but too much information, often called information overload. There are
so many resources, documentation, papers, books, and journals containing so much
theoretical material, concepts, techniques, and algorithms that they often overwhelm
someone new to the field. What is the right technique to solve a problem? How does
text summarization really work? Which are the best frameworks to solve multi-class text
categorization? By combining mathematical and theoretical concepts with practical
implementations of real-world use-cases using Python, this book tries to address this
problem and help readers avoid the pressing issues I’ve faced in my journey so far.
This book follows a comprehensive and structured approach. First it tackles the
basics of natural language understanding and Python constructs in the initial chapters.
Once you’re familiar with the basics, it addresses interesting problems in text analytics
in each of the remaining chapters, including text classification, clustering, similarity
analysis, text summarization, and topic models. In this book we will also analyze text
structure, semantics, sentiment, and opinions. For each topic, I cover the basic concepts
and use some real-world scenarios and data to implement techniques covering each
concept. The idea of this book is to give you a flavor of the vast landscape of text analytics
and NLP and arm you with the necessary tools, techniques, and knowledge to tackle your
own problems and start solving them. I hope you find this book helpful and wish you the
very best in your journey through the world of text analytics!

xxi
CHAPTER 1

Natural Language Basics

We have ushered in the age of Big Data where organizations and businesses are having
difficulty managing all the data generated by various systems, processes, and transactions.
However, the term Big Data is misused a lot due to the nature of its popular but vague
definition of “the 3 V’s”—volume, variety, and velocity of data. This is because sometimes
it is very difficult to exactly quantify what data is “Big.” Some might think a billion records
in a database would be Big Data, but that number seems really minute compared to the
petabytes of data being generated by various sensors or even social media. There is a large
volume of unstructured textual data present across all organizations, irrespective of their
domain. Just to take some examples, we have vast amounts of data in the form of tweets,
status updates, comments, hashtags, articles, blogs, wikis, and much more on social
media. Even retail and e-commerce stores generate a lot of textual data from new product
information and metadata with customer reviews and feedback.
The main challenges associated with textual data are twofold. The first challenge
deals with effective storage and management of this data. Usually textual data is
unstructured and does not adhere to any specific predefined data model or schema,
which is usually followed by relational databases. However, based on the data semantics,
you can store it in either SQL-based database management systems (DBMS) like SQL
Server or even NoSQL-based systems like MongoDB. Organizations having enormous
amounts of textual datasets often resort to file-based systems like Hadoop where they
dump all the data in the Hadoop Distributed File System (HDFS) and access it as needed,
which is one of the main principles of a data lake.
The second challenge is with regard to analyzing this data and trying to extract
meaningful patterns and useful insights that would be beneficial to the organization.
Even though we have a large number of machine learning and data analysis techniques
at our disposal, most of them are tuned to work with numerical data, hence we have
to resort to areas like natural language processing (NLP) and specialized techniques,
transformations, and algorithms to analyze text data, or more specifically natural
language, which is quite different from programming languages that are easily
understood by machines. Remember that textual data, being highly unstructured, does
not follow or adhere to structured or regular syntax and patterns—hence we cannot
directly use mathematical or statistical models to analyze it.

Electronic supplementary material The online version of this chapter


(doi:10.1007/978-1-4842-2388-8_1) contains supplementary material, which is available
to authorized users.

© Dipanjan Sarkar 2016 1


D. Sarkar, Text Analytics with Python, DOI 10.1007/978-1-4842-2388-8_1
CHAPTER 1 ■ NATURAL LANGUAGE BASICS

Before we dive into specific techniques and algorithms to analyze textual data, we will be
going over some of the main concepts and theoretical principles associated with the nature
of text data in this chapter. The primary intent here is to get you familiarized with concepts
and domains associated with natural language understanding, processing, and text analytics.
We will be using the Python programming language in this book primarily for accessing and
analyzing text data. The examples in this chapter will be pretty straightforward and fairly easy
to follow. However, you can quickly skim over Chapter 2 in case you want to brush up on
Python before going through this chapter. All the examples are available with this book and
also in my GithHub repository at https://github.com/dipanjanS/text-analytics-with-
python which includes programs, code snippets and datasets. This chapter covers concepts
relevant to natural language, linguistics, text data formats, syntax, semantics, and grammars
before moving on to more advanced topics like text corpora, NLP, and text analytics.

Natural Language
Textual data is unstructured data but it usually belongs to a specific language following
specific syntax and semantics. Any piece of text data—a simple word, sentence, or
document—relates back to some natural language most of the time. In this section, we
will be looking at the definition of natural language, the philosophy of language, language
acquisition, and the usage of language.

What Is Natural Language?


To understand text analytics and natural language processing, we need to understand
what makes a language “natural.” In simple terms, a natural language is one developed
and evolved by humans through natural use and communication, rather than
constructed and created artificially, like a computer programming language.
Human languages like English, Japanese, and Sanskrit are natural languages. Natural
languages can be communicated in different forms, including speech, writing, or even signs.
There has been a lot of scholarship and effort applied toward understanding the origins,
nature, and philosophy of language. We will discuss that briefly in the following section.

The Philosophy of Language


We now know what a natural language means. But think about the following questions.
What are the origins of a language? What makes the English language “English”? How did
the meaning of the word fruit come into existence? How do humans communicate among
themselves with language? These are definitely some heavy philosophical questions.
The philosophy of language mainly deals with the following four problems and seeks
answers to solve them:
• The nature of meaning in a language
• The use of language
• Language cognition
• The relationship between language and reality

2
CHAPTER 1 ■ NATURAL LANGUAGE BASICS

• The nature of meaning in a language is concerned with the


semantics of a language and the nature of meaning itself. Here,
philosophers of language or linguistics try to find out what it
means to actually “mean” anything—that is, how the meaning of
any word or sentence originated and came into being and how
different words in a language can be synonyms of each other and
form relations. Another thing of importance here is how structure
and syntax in the language pave the way for semantics, or to be
more specific, how words, which have their own meanings, are
structured together to form meaningful sentences. Linguistics
is the scientific study of language, a special field that deals with
some of these problems we will be looking at in more detail later
on. Syntax, semantics, grammars, and parse trees are some ways
to solve these problems. The nature of meaning can be expressed
in linguistics between two human beings, notably a sender and
a receiver, as what the sender tries to express or communicate
when they send a message to a receiver, and what the receiver
ends up understanding or deducing from the context of the
received message. Also from a non-linguistic standpoint, things
like body language, prior experiences, and psychological effects
are contributors to meaning of language, where each human
being perceives or infers meaning in their own way, taking into
account some of these factors.
• The use of language is more concerned with how language is used
as an entity in various scenarios and communication between
human beings. This includes analyzing speech and the usage of
language when speaking, including the speaker’s intent, tone,
content and actions involved in expressing a message. This is often
termed as a speech act in linguistics. More advanced concepts such
as the origins of language creation and human cognitive activities
such as language acquisition which is responsible for learning and
usage of languages are also of prime interest.
• Language cognition specifically focuses on how the cognitive
functions of the human brain are responsible for understanding
and interpreting language. Considering the example of a typical
sender and receiver, there are many actions involved from
message communication to interpretation. Cognition tries to find
out how the mind works in combining and relating specific words
into sentences and then into a meaningful message and what is
the relation of language to the thought process of the sender and
receiver when they use the language to communicate messages.
• The relationship between language and reality explores the
extent of truth of expressions originating from language. Usually,
philosophers of language try to measure how factual these
expressions are and how they relate to certain affairs in our world
which are true. This relationship can be expressed in several ways,
and we will explore some of them.

3
CHAPTER 1 ■ NATURAL LANGUAGE BASICS

One of the most popular models is the triangle of reference, which is used to explain
how words convey meaning and ideas in the minds of the receiver and how that meaning
relates back to a real world entity or fact. The triangle of reference was proposed by
Charles Ogden and Ivor Richards in their book, The Meaning of Meaning, first published
in 1923, and is denoted in Figure 1-1.

Figure 1-1. The triangle of reference model

The triangle of reference model is also known as the meaning of meaning model,
and I have depicted the same in Figure1-1 with a real example of a couch being perceived
by a person which is present in front of him. A symbol is denoted as a linguistic symbol,
like a word or an object that evokes thought in a person’s mind. In this case, the symbol
is the couch, and this evokes thoughts like what is a couch, a piece of furniture that can
be used for sitting on or lying down and relaxing, something that gives us comfort. These
thoughts are known as a reference and through this reference the person is able to relate it
to something that exists in the real world, termed a referent. In this case the referent is the
couch which the person perceives to be present in front of him.
The second way to find out relationships between language and reality is known as
the direction of fit, and we will talk about two main directions here. The word-to-world
direction of fit talks about instances where the usage of language can reflect reality. This
indicates using words to match or relate to something that is happening or has already
happened in the real world. An example would be the sentence The Eiffel Tower is really
big, which accentuates a fact in reality. The other direction of fit, known as world-to-word,
talks about instances where the usage of language can change reality. An example here
would be the sentence I am going to take a swim, where the person I is changing reality
by going to take a swim by representing the same in the sentence being communicated.
Figure 1-2 shows the relationship between both the directions of fits.

4
CHAPTER 1 ■ NATURAL LANGUAGE BASICS

Figure 1-2. The direction of fit representation

It is quite clear from the preceding depiction that based on the referent that is
perceived from the real world, a person can form a representation in the form of a symbol
or word and consequently can communicate the same to another person, which forms a
representation of the real world based on the received symbol, thus forming a cycle.

Language Acquisition and Usage


By now, we have seen what natural languages mean and the concepts behind language,
its nature, meaning, and use. In this section, we will talk in further detail about how
language is perceived, understood, and learned using cognitive abilities by humans, and
finally we will end our discussion with the main forms of language usage, discussed in
brief as speech acts. It is important to not only understand what natural language denotes
but also how humans interpret, learn, and use the same language so that we are able to
emulate some of these concepts programmatically in our algorithms and techniques
when we try to extract insights from textual data.

Language Acquisition and Cognitive Learning


Language acquisition is defined as the process by which human beings utilize their
cognitive abilities, knowledge, and experience to understand language based on
hearing and perception and start using it in terms of words, phrases, and sentences to
communicate with other human beings. In simple terms, the ability of acquiring and
producing languages is language acquisition.

5
CHAPTER 1 ■ NATURAL LANGUAGE BASICS

The history of language acquisition dates back centuries. Philosophers and scholars
have tried to reason and understand the origins of language acquisition and came up
with several theories, such as language being a god-gifted ability that is passed down
from generation to generation. Plato indicated that a form of word-meaning mapping
would have been responsible in language acquisition. Modern theories have been
proposed by various scholars and philosophers, and some of the popular ones, most
notably B.S. Skinner, indicated that knowledge, learning, and use of language were
more of a behavioral consequent. Human beings, or to be more specific, children, when
using specific words or symbols of any language, experience language based on certain
stimuli which get reinforced in their memory thanks to consequent reactions to their
usage repeatedly. This theory is based on operant or instrumentation conditioning,
which is a type of conditional learning where the strength of a particular behavior or
action is modified based on its consequences such as reward or punishment, and these
consequent stimuli help in reinforcing or controlling behavior and learning. An example
would be that children would learn that a specific combination of sounds made up a word
from repeated usage of it by their parents or by being rewarded by appreciation when
they speak it correctly or by being corrected when they make a mistake while speaking
the same. This repeated conditioning would end up reinforcing the actual meaning and
understanding of the word in a child’s memory for the future. To sum it up, children try to
learn and use language mostly behaviorally by imitating and hearing from adults.
However, this behavioral theory was challenged by renowned linguist Noam
Chomsky, who proclaimed that it would be impossible for children to learn language just
by imitating everything from adults. This hypothesis does stand valid in the following
examples. Although words like go and give are valid, children often end up using an
invalid form of the word, like goed or gived instead of went or gave in the past tense.
It is assured that their parents didn’t utter these words in front of them, so it would be
impossible to pick these up based on the previous theory of Skinner. Consequently,
Chomsky proposed that children must not only be imitating words they hear but also
extracting patterns, syntax, and rules from the same language constructs, which is
separate from just utilizing generic cognitive abilities based on behavior.
Considering Chomsky’s view, cognitive abilities along with language-specific
knowledge and abilities like syntax, semantics, concepts of parts of speech, and grammar
together form what he termed a language acquisition device that enabled humans to
have the ability of language acquisition. Besides cognitive abilities, what is unique
and important in language learning is the syntax of the language itself, which can be
emphasized in his famous sentence Colorless green ideas sleep furiously. If you observe
the sentence and repeat it many times, it does not make sense. Colorless cannot be
associated with green, and neither can ideas be associated with green, nor can they sleep
furiously. However, the sentence has a grammatically correct syntax. This is precisely
what Chomsky tried to explain—that syntax and grammar depict information that is
independent from the meaning and semantics of words. Hence, he proposed that the
learning and identifying of language syntax is a separate human capability compared
to other cognitive abilities. This proposed hypothesis is also known as the autonomy
of syntax. These theories are still widely debated among scholars and linguists, but it is
useful to explore how the human mind tends to acquire and learn language. We will now
look at the typical patterns in which language is generally used.

6
CHAPTER 1 ■ NATURAL LANGUAGE BASICS

Language Usage
The previous section talked about speech acts and how the direction of fit model
is used for relating words and symbols to reality. In this section we will cover some
concepts related to speech acts that highlight different ways in which language is used in
communication.
There are three main categories of speech acts: locutionary, illocutionary, and
perlocutionary acts. Locutionary acts are mainly concerned with the actual delivery
of the sentence when communicated from one human being to another by speaking
it. Illocutionary acts focus further on the actual semantics and significance of the
sentence which was communicated. Perlocutionary acts refer to the actual effect the
communication had on its receiver, which is more psychological or behavioral.
A simple example would be the phrase Get me the book from the table spoken by a
father to his child. The phrase when spoken by the father forms the locutionary act. This
significance of this sentence is a directive, which directs the child to get the book from the
table and forms an illocutionary act. The action the child takes after hearing this, that is, if
he brings the book from the table to his father, forms the perlocutionary act.
The illocutionary act was a directive in this case. According to the philosopher John
Searle, there are a total of five different classes of illocutionary speech acts, as follows:
• Assertives are speech acts that communicate how things are already
existent in the world. They are spoken by the sender when he tries
to assert a proposition that could be true or false in the real world.
These assertions could be statements or declarations. A simple
example would be The Earth revolves round the Sun. These messages
represent the word-to-world direction of fit discussed earlier.
• Directives are speech acts that the sender communicates to the
receiver asking or directing them to do something. This represents
a voluntary act which the receiver might do in the future after
receiving a directive from the sender. Directives can either be
complied with or not complied with, since they are voluntary. These
directives could be simple requests or even orders or commands.
An example directive would be Get me the book from the table,
discussed earlier when we talked about types of speech acts.
• Commisives are speech acts that commit the sender or speaker
who utters them to some future voluntary act or action. Acts like
promises, oaths, pledges, and vows represent commisives, and
the direction of fit could be either way. An example commisive
would be I promise to be there tomorrow for the ceremony.
• Expressives reveal a speaker or sender’s disposition and outlook
toward a particular proposition communicated through the
message. These can be various forms of expression or emotion,
such as congratulatory, sarcastic, and so on. An example
expressive would be Congratulations on graduating top of the class.

7
CHAPTER 1 ■ NATURAL LANGUAGE BASICS

• Declarations are powerful speech acts that have the capability


to change the reality based on the declared proposition in the
message communicated by the speaker\sender. The usual direction
of fit is world-to-word, but it can go the other way also. An example
declaration would be I hereby declare him to be guilty of all charges.
These speech acts are the primary ways in which language is used and
communicated among human beings, and without even realizing it, you end up using
hundreds of them on any given day. We will now look at linguistics and some of the main
areas of research associated with it.

Linguistics
We have touched on what natural language means, how language is learned and used,
and the origins of language acquisition. These kinds of things are formally researched
and studied in linguistics by researchers and scholars called linguists. Formally, linguistics
is defined as the scientific study of language, including form and syntax of language,
meaning, and semantics depicted by the usage of language and context of use. The origins
of linguistics can be dated back to the 4th century BCE, when Indian scholar and linguist
Panini formalized the Sanskrit language description. The term linguistics was first defined
to indicate the scientific study of languages in 1847, approximately before which the term
philology was used to indicate the same. Although a detailed exploration of linguistics is
not needed for text analytics, it is useful to know the different areas of linguistics because
some of them are used extensively in natural language processing and text analytics
algorithms. The main distinctive areas of study under linguistics are as follows:
• Phonetics: This is the study of the acoustic properties of sounds
produced by the human vocal tract during speech. It includes
studying the properties of sounds as well as how they are created
and by human beings. The smallest individual unit of human
speech in a specific language is called a phoneme. A more generic
term across languages for this unit of speech is phone.
• Phonology: This is the study of sound patterns as interpreted in
the human mind and used for distinguishing between different
phonemes to find out which ones are significant. The structure,
combination, and interpretations of phonemes are studied in
detail, usually by taking into account a specific language at a
time. The English language consists of around 45 phonemes.
Phonology usually extends beyond just studying phonemes and
includes things like accents, tone, and syllable structures.
• Syntax: This is usually the study of sentences, phrases, words, and
their structures. It includes researching how words are combined
together grammatically to form phrases and sentences. Syntactic
order of words used in a phrase or a sentence matter because the
order can change the meaning entirely.

8
CHAPTER 1 ■ NATURAL LANGUAGE BASICS

• Semantics: This involves the study of meaning in language


and can be further subdivided into lexical and compositional
semantics.
• Lexical semantics: The study of the meanings of words and
symbols using morphology and syntax.
• Compositional semantics: Studying relationships among
words and combination of words and understanding the
meanings of phrases and sentences and how they are related.
• Morphology: A morpheme is the smallest unit of language that
has distinctive meaning. This includes things like words, prefixes,
suffixes, and so on which have their own distinct meanings.
Morphology is the study of the structure and meaning of these
distinctive units or morphemes in a language. Specific rules and
syntaxes usually govern the way morphemes can combine together.
• Lexicon: This is the study of properties of words and phrases
used in a language and how they build the vocabulary of the
language. These include what kinds of sounds are associated with
meanings for words, the parts of speech words belong to, and
their morphological forms.
• Pragmatics: This is the study of how both linguistic and non-
linguistic factors like context and scenario might affect the
meaning of an expression of a message or an utterance. This
includes trying to infer whether there are any hidden or indirect
meanings in the communication.
• Discourse analysis: This analyzes language and exchange of
information in the form of sentences across conversations among
human beings. These conversations could be spoken, written, or
even signed.
• Stylistics: This is the study of language with a focus on the style of
writing, including the tone, accent, dialogue, grammar, and type
of voice.
• Semiotics: This is the study of signs, symbols, and sign processes
and how they communicate meaning. Things like analogy,
metaphors, and symbolism are covered in this area.
Although these are the main areas of study and research, linguistics is an enormous field
with a much bigger scope than what is mentioned here. However, things like language syntax
and semantics are some of the most important concepts that often form the foundations to
natural language processing. The following section looks at them more closely.

9
CHAPTER 1 ■ NATURAL LANGUAGE BASICS

Language Syntax and Structure


We already know what language, syntax, and structure indicate. Syntax and structure
usually go hand in hand, where a set of specific rules, conventions, and principles usually
govern the way words are combined into phrases, phrases get combines into clauses, and
clauses get combined into sentences. We will be talking specifically about the English
language syntax and structure in this section because in this book we will be dealing
with textual data that belongs to the English language. But a lot of these concepts can be
extended to other languages too. Knowledge about the structure and syntax of language is
helpful in many areas like text processing, annotation, and parsing for further operations
such as text classification or summarization.
In English, words usually combine together to form other constituent units. These
constituents include words, phrases, clauses, and sentences. All these constituents
exist together in any message and are related to each other in a hierarchical structure.
Moreover, a sentence is a structured format of representing a collection of words provided
they follow certain syntactic rules like grammar. Look at the bunch of words represented
in Figure 1-3.

Figure 1-3. A collection of words without any relation or structure

From the collection of words in Figure 1-3, it is very difficult to ascertain what it
might be trying to convey or mean. Indeed, languages are not just comprised of groups of
unstructured words. Sentences with proper syntax not only help us give proper structure
and relate words together but also help them convey meaning based on the order or
position of the words. Considering our previous hierarchy of sentence → clause → phrase
→ word, we can construct the hierarchical sentence tree in Figure 1-4 using shallow
parsing, a technique using for finding out the constituents in a sentence.

Figure 1-4. Structured sentence following the hierarchical syntax

10
CHAPTER 1 ■ NATURAL LANGUAGE BASICS

From the hierarchical tree in Figure 1-4, we get the sentence The brown fox is quick
and he is jumping over the lazy dog. We can see that the leaf nodes of the tree consist of
words, which are the smallest unit here, and combinations of words form phrases, which
in turn form clauses. Clauses are connected together through various filler terms or words
such as conjunctions and form the final sentence. In the next section, we will look at each
of these constituents in further detail and understand how to analyze them and find out
what the major syntactic categories are.

Words
Words are the smallest units in a language that are independent and have a meaning of
their own. Although morphemes are the smallest distinctive units, morphemes are not
independent like words, and a word can be comprised of several morphemes. It is useful
to annotate and tag words and analyze them into their parts of speech (POS) to see the
major syntactic categories. Here, we will cover the main categories and significance of the
various POS tags. Later in Chapter 3 we will examining them in further detail and looking
at methods of generating POS tags programmatically.
Usually, words can fall into one of the following major categories.
• N(oun): This usually denotes words that depict some object or
entity which may be living or nonliving. Some examples would be
fox, dog, book, and so on. The POS tag symbol for nouns is N.
• V(erb): Verbs are words that are used to describe certain actions,
states, or occurrences. There are a wide variety of further
subcategories, such as auxiliary, reflexive, and transitive verbs (and
many more). Some typical examples of verbs would be running,
jumping, read, and write. The POS tag symbol for verbs is V.
• Adj(ective): Adjectives are words used to describe or qualify other
words, typically nouns and noun phrases. The phrase beautiful
flower has the noun (N) flower which is described or qualified
using the adjective (ADJ) beautiful. The POS tag symbol for
adjectives is ADJ.
• Adv(erb): Adverbs usually act as modifiers for other words
including nouns, adjectives, verbs, or other adverbs. The phrase
very beautiful flower has the adverb (ADV) very, which modifies
the adjective (ADJ) beautiful, indicating the degree to which the
flower is beautiful. The POS tag symbol for adverbs is ADV.
Besides these four major categories of parts of speech, there are other categories
that occur frequently in the English language. These include pronouns, prepositions,
interjections, conjunctions, determiners, and many others. Furthermore, each POS tag
like the noun (N) can be further subdivided into categories like singular nouns (NN),
singular proper nouns (NNP), and plural nouns (NNS). We will be looking at POS tags in
further detail in Chapter 3 when we process and parse textual data and implement POS
taggers to annotate text.

11
CHAPTER 1 ■ NATURAL LANGUAGE BASICS

Considering our previous example sentence (The brown fox is quick and he is
jumping over the lazy dog) where we built the hierarchical syntax tree, if we were to
annotate it using basic POS tags, it would look like Figure 1-5.

Figure 1-5. Annotated words with their POS tags

In Figure 1-5 you may notice a few unfamiliar tags. The tag DET stands for
determiner, which is used to depict articles like a, an, the, and so on. The tag CONJ
indicates conjunction, which is usually used to bind together clauses to form sentences.
The PRON tag stands for pronoun, which represents words that are used to represent or
take the place of a noun.
The tags N, V, ADJ and ADV are typical open classes and represent words belonging
to an open vocabulary. Open classes are word classes that consist of an infinite set of words
and commonly accept the addition of new words to the vocabulary which are invented
by people. Words are usually added to open classes through processes like morphological
derivation, invention based on usage, and creating compound lexemes. Some popular
nouns added fairly recently include Internet and multimedia. Closed classes consist of a
closed and finite set of words and do not accept new additions. Pronouns are a closed class.
The following section looks at the next level of the hierarchy: phrases.

Phrases
Words have their own lexical properties like parts of speech, which we saw earlier. Using
these words, we can order them in ways that give meaning to the words such that each
word belongs to a corresponding phrasal category and one of the words is the main or head
word. In the hierarchy tree, groups of words make up phrases, which form the third level
in the syntax tree. By principle, phrases are assumed to have at least two or more words,
considering the pecking order of words ← phrases ← clauses ← sentences. However, a
phrase can be a single word or a combination of words based on the syntax and position
of the phrase in a clause or sentence. For example, the sentence Dessert was good has only
three words, and each of them rolls up to three phrases. The word dessert is a noun as well
as a noun phrase, is depicts a verb as well as a verb phrase, and good represents an adjective
as well as an adjective phrase describing the aforementioned dessert.
There are five major categories of phrases:
• Noun phrase (NP): These are phrases where a noun acts as
the head word. Noun phrases act as a subject or object to a
verb. Usually a noun phrases can be a set of words that can be
replaced by a pronoun without rendering the sentence or clause
syntactically incorrect. Some examples would be dessert, the lazy
dog, and the brown fox.

12
CHAPTER 1 ■ NATURAL LANGUAGE BASICS

• Verb phrase (VP): These phrases are lexical units that have a
verb acting as the head word. Usually there are two forms of verb
phrases. One form has the verb components as well as other
entities such as nouns, adjectives, or adverbs as parts of the
object. The verb here is known as a finite verb. It acts as a single
unit in the hierarchy tree and can function as the root in a clause.
This form is prominent in constituency grammars. The other form
is where the finite verb acts as the root of the entire clause and
is prominent in dependency grammars. Another derivation of
this includes verb phrases strictly consisting of verb components
including main, auxiliary, infinitive, and participles. The sentence
He has started the engine can be used to illustrate the two types of
verb phrases that can be formed. They would be has started the
engine and has started, based on the two forms just discussed.
• Adjective phrase (ADJP): These are phrases with an adjective as
the head word. Their main role is to describe or qualify nouns
and pronouns in a sentence, and they will be either placed before
or after the noun or pronoun. The sentence The cat is too quick
has an adjective phrase, too quick, qualifying cat, which is a noun
phrase.
• Adverb phrase (ADVP): These phrases act like adverbs since
the adverb acts as the head word in the phrase. Adverb phrases
are used as modifiers for nouns, verbs, or adverbs themselves
by providing further details that describe or qualify them. In
the sentence The train should be at the station pretty soon, the
adjective phrase pretty soon describes when the train would be
arriving.
• Prepositional phrase (PP): These phrases usually contain a
preposition as the head word and other lexical components like
nouns, pronouns, and so on. It acts like an adjective or adverb
describing other words or phrases. The phrase going up the stairs
contains a prepositional phrase up, describing the direction of the
stairs.
These five major syntactic categories of phrases can be generated from words using
several rules, some of which have been discussed, like utilizing syntax and grammars
of different types. We will be exploring some of the popular grammars in a later section.
Shallow parsing is a popular natural language processing technique to extract these
constituents, including POS tags as well as phrases from a sentence. For our sentence The
brown fox is quick and he is jumping over the lazy dog, we have obtained seven phrases
from shallow parsing, as shown in Figure 1-6.

Figure 1-6. Annotated phrases with their tags


13
Random documents with unrelated
content Scribd suggests to you:
CHARLES.
And what then would become of us all? They dig the gold out of the
bowels of the earth, of which we are so proud; it is true we could do
without it, as any thing that would lie in a small compass, might pass
in exchange as money: but iron we could not spare; we should do
every thing in a very clumsy manner without iron tools.—Only think
of the various comforts which accrue to society from this one metal:
and men must procure it.
EMILIA.
That is true.—And if we rightly consider it, we may say with truth,
that iron is more valuable than gold.
CHARLES.
It is not only more valuable, but our abode on the earth would be
uncomfortable without it:—it is apparently a necessary; and the great
instrument of civilization.
WILLIAM.
We see greater respect paid to a goldsmith than a common
mechanic, though the first we could do without.
EMILIA.
Perhaps it is because that a goldsmith gains greater profit, and
goes better clothed.
CHARLES.
You have well observed, Emilia. We are very unreasonable when
we are proud of dress. Where should we get the finery, if the hard
hands of the diligent labourer did not provide the materials? A
diamond is dug out of the earth without our assistance. Silk stuff,
prepared by the industry of a worm, and in which we pride ourselves,
is worked for us without our knowing how.—Yet, we are delighted
with the praise we receive, as much as we could be had we invented
the arts, or manufactured the product of the earth. We only wear
what the skill and industry of others have procured for us.—What are
we, when we recollect such foolish pride?—We who presume to
arrogate merit to ourselves, which belongs to others; to the weavers
and taylors—and even to the worms that contribute to adorn us. But
you may say, such habits are a proof that we are rich, or born in a
distinguished rank.—It is nothing!—We are, as I have just proved,
indebted for the gold and silver to the poor miners, who, at the
expence of health, dig it out of the mine—and we possess it by mere
chance.—And our birth, of which we are apt to boast so much, is
equally accidental.
EMILIA.
But we pay more respect to painters, and all those who exercise the
fine arts, than we do to mechanics, though theirs are not useful
employments.
CHARLES.
That is, because we involuntarily pay respect to an improved mind.
Dr. Bartlett has taught me to make distinctions. Those employments,
in which the mind is exercised more than the body, tend to cultivate
the understanding, the noblest kind of superiority. Those artists
afford food for the mind; pleasures that the man has not any
conception of who is occupied in manual labour. We may choose our
companions and friends; but all the labourers in the great field of
life, are our brothers; and equally deserve the rights of humanity.
And they are superior to their fellow men who are most extensively
useful, not those who, in false state, exhibit diamonds and gold on
their body, whilst their minds are, perhaps, inferior to those of the
poor creatures, who, by a weak taper’s light, dug them out of their
hidden place, to decorate folly, not ornament virtue; for virtue has
inherent splendor.

Dear mother, I will never exalt myself on account of my birth


again; but I will try to gain the noblest distinction, that of virtue. For
with respect to understanding, I have often seen the witty applauded,
when those you termed wise, were scarcely observed.—What, is not
this admiring the dazzling and neglecting the useful? But, you say the
generality are superficial, and only attend to the outside of things. I
will try to remember, that the praise of one sensible person, is of
more worth than the encomium of a crowd; because they consider
before they speak.
WILLIAM.
LETTER LII.
William to his Mother.

Honest Harry is returned quite recovered, that is, as well as he will


ever be; for the surgeon was right, he will be a cripple all his life. Sir
Charles and his Lady are much concerned, for he was a faithful
servant, and has been in the family some years. This morning we had
the following conversation.
CHARLES.
Harry’s accident makes me very uneasy.—Poor fellow! he was so
well-made—so active.
SIR CHARLES.
We ought to draw useful lessons from the misfortunes we deplore.
You find we are not a moment sure of ourselves. He rose in the
morning alert, full of health—before night, he was stretched on a bed
—helpless as a babe. A single unforeseen accident, which we cannot
guard against, may in a moment deprive us of our limbs, our sight,
nay, even of life itself. To him who lives conformable to the laws of
God, no death is sudden or dreadful.
CHARLES.
Accidents, you say, we cannot guard against; but are there not
many misfortunes which we bring on ourselves through
imprudence?
WILLIAM.
An event of this kind, a fatal one, happened last year in Holland.
Two boys were at play struggling together with a pistol, they did not
know it was loaded, the pistol went off, and one of them was killed,
and the other so shocked that he has walked about the fields
melancholy ever since.
SIR CHARLES.
That misfortune was entirely their own fault. It should always be a
fixed rule with boys never to play with firearms; for in every thing
that depends on ourselves we ought to be circumspect, and to be
careful of our own lives, and of the lives of others, as a loan, which we
must return at the time it pleases the Almighty to demand it—we
must return our talents improved, or fearfully wait for the
punishment denounced against the unfaithful servant.
WILLIAM.
Are not they equally wrong who venture their lives on the ice,
before the frost is quite set in, only for the pleasure of skaiting a few
days sooner?
SIR CHARLES.
The passion for pleasure so blinds them, that they think not of the
danger. It is then wrong to indulge ourselves in all that we desire, for
when this propensity to present pleasure is master of us, it
dispossesses our judgment of its rightful place in the mind, and the
quiet suggestions, reflection would obtrude, are not heard in the
tumult.
CHARLES.
But, Sir, what is Harry to do? He is not now capable of service.
EMILIA.
I know my parents are so good—so humane—
LADY GRANDISON.
Well, and what would Emilia say further?
EMILIA.
You know better than I what is proper to do for him.
SIR CHARLES.
Speak, tell us your opinion.
EMILIA.
You gave a yearly income to our old gardener because he had been
a faithful servant.
SIR CHARLES.
Very true; but the gardener was a decrepid old man, worn out in
the service of my family; he could not do any thing to earn a
livelihood. I respect old age, I would not grub up a tree which had
long afforded me a shade; and the horse I rode on, when I was
young, has now a meadow to range in, and a soft bed to stretch those
limbs on, which were formerly active in my service.
EMILIA.
I would readily save my pocket-money, and give up the new
clothes I have been promised, to contribute to support poor Harry.
SIR CHARLES.
You are a good girl; what you have said adorns your face, and
makes you appear much more lovely than the finest ornaments
could. But, Charles, let me hear what you would advise?
CHARLES.
I am afraid to give you advice, you know every thing so much
better than I do.
LADY GRANDISON.
That is very well observed; but your father asks, not to be informed
what is proper to be done, but to hear your sentiments.
CHARLES.
I respect Harry, nay love him; though not as I love my dear father,
and I would fain serve him.
SIR CHARLES.
Go on, Charles.
CHARLES.
His father was a good shoe-maker, and worked hard to bring up a
large family; he brought Harry up a shoe-maker; but Harry had a
mind to see the world, as he told me, when he was sick, and he left
his father, he was then very sorry for it. His father died since he has
been in your service, and he has constantly sent most part of his
wages to his poor mother.—Now if you would have the goodness to
give him a little furniture, and leather and tools, he and his mother
might live together, and they would both be provided for; and, in
time, he might be able to return you the money, for he has an honest
heart.
SIR CHARLES.
What, without interest, Charles?
CHARLES.
Now, Sir, you joke with me—but I perceive why.
LADY GRANDISON.
Because you were so very careful, and would have the money
returned.

Charles kissed his mother’s cheek, and said, forgive me, I see you
will do more for him, than I could presume to ask.
SIR CHARLES.
Yes, I am glad that your sentiments so well accord with mine. We
do the poor an essential service when we put them in a way to earn
their own subsistence; for then we support the body without injuring
the mind. Idleness in every station leads to vice. Do you go and speak
to Harry, and ask him how much will be requisite for this purpose,
and then we will give him it as a reward for his fidelity, and to
comfort him under his misfortune.
CHARLES.
Dear parents, I thank you; I will run immediately and tell him the
good news. It will rejoice his heart, for when he was sick and
delirious, he raved about his mother, and repented, sorely repented
that he had not followed her advice and worked at his own trade. He
will be so glad to maintain his mother, for the poor old woman, after
bringing up a family, finds it hard to stand at the wash-tub.—He was
going—
EMILIA.
Stop a moment, I must go with you, for I love to see people happy.

O, my dear mother, how delightful it is to have it in our power to


be bountiful. The poor man cried for joy, when Charles informed him
what his parents designed to do for him. Thus God provides for those
who behave well to their parents. He saved to assist an old mother,
and now he is lame his master takes care of him. In this way, said Sir
Charles, we ought to lighten the afflictions we are liable to, and must
humbly endure.
Two months more and I shall again be with you.

WILLIAM.
LETTER LIII.
William to his Mother.

Edward is come again this afternoon, and looks very well. He


informed us of a disagreeable accident which happened lately, and
shows very clearly how imprudent it is to talk idly, and merely for the
sake of having something to say, to canvass the faults or even the
vices of others. But I will give you the particulars of a conversation
we had in consequence of this information.
EDWARD.
You knew Colonel Brown, Charles. Last week Captain Fiery shot
him.
CHARLES.
And for what reason?
EDWARD.
Because his son, in a large company, spoke very disrespectfully of
the Captain, and said he was a man whose word could not be
depended on.
CHARLES.
Suppose it was so, it was not proper to speak of it, especially in a
large company; these kind of conversations proceed oftener from
folly than from a detestation of vice, or a nice sense of honour, which
makes a person feel indignation, when any of his fellow-creatures act
meanly.
WILLIAM.
How could the Colonel be answerable for what his son said?
EDWARD.
Fiery is a hot-headed foolish man, and because he could not have
satisfaction from a youth, demanded it of the father. He apologized
for his son’s imprudence; but Fiery would not listen to reason, he
compelled the other to meet him, his profession did not allow him to
refuse a challenge; he was killed on the spot, and Fiery sat off directly
for France.
CHARLES.
And what will he get by the name of courage, which his rash
insensibility may have procured him? He must never return to his
native country, his hands have been dyed in the blood of his fellow-
creature, he has robbed a family of its support, and in consequence of
his violating the laws of humanity, is compelled to wander in a
strange country, and only to receive that attention his money will
procure.
WILLIAM.
But young Brown, how I pity him!
CHARLES.
Yes, he deserves pity; he is continually upbraiding himself with his
folly, and lamenting his rashness, his want of consideration, which
has deprived his mother of all her comfort, and himself of a tender
friend and affectionate father.
EDWARD.
Yet, many think him not to blame, he only spoke the truth. Captain
Fiery’s character is generally known, and he is as generally despised.
CHARLES.
Believe me, brother, we are not always to say what is true, when it
tends to the prejudice of another we must be silent; it is more to our
credit to soften the faults we must mention, and better still, perhaps,
not to mention them at all. Dr. Bartlett has often told me, that those
who accustom themselves to tell all they know of others, will
imperceptibly deviate from truth, and, forgetting compassion, will
become unjust.
WILLIAM.
I agree with you, and think it possible that those who build their
virtues on the vices of others, will soon have only comparative virtue.
CHARLES.
It is chiefly to tell some news, or to appear of consequence, that
people retail scandalous anecdotes; yet, those who listen to such
stories with malignant pleasure, despise and fear the slanderer;
though murder should not happen, many disagreeable consequences
may follow, and we should never mention the faults of others without
a chance of reclaiming them.

The conversation was interrupted, and so I must bid you adieu.

WILLIAM.
LETTER LIV.
William to his Mother.

Last Friday we all of us went to pay a visit where there was a large
party of young people, and some of them of the first rank. After we
came home we conversed about them.
EDWARD.
What think you, Charles, of the various dresses you saw? Young
Owen’s shabby coat appeared very conspicuous near Sir William
Turner’s elegant fashionable suit.
CHARLES.
Young Owen is not rich, but I am sure that he in his plain dress
commands more respect than Sir William, if we go into company to
be amused and improved and not to see a block on which fine clothes
are hung.
WILLIAM.
You make me laugh, Charles; so, those who take so much pains to
adorn their persons are, in your opinion, mere blocks.
CHARLES.
I do not absolutely say so, but this I am certain of, that those who
are as accomplished and entertaining as young Owen, ought to take
place of him, whose rank, fortune, and appearance are his only claim
to notice.
EMILIA.
Lady Jane L—— was of a different opinion; she said, she should
certainly have staid at home, had she guessed that Owen would have
been there, for she could not bear to sit in company with a youth
whose grandfather was a mean mechanic.
CHARLES.
Many persons of quality are of the same opinion, but I have been
told that we ought always to prefer merit to birth and riches; the
former is the fruit of our own labour, but the latter is merely
accidental.
EDWARD.
But it seems a rule in life to seek rather the company of superiors
than inferiors.
CHARLES.
To seek either to associate with superiors or inferiors constantly,
would, in my opinion, be equally mean, equally tend to debase the
soul; friendship requires equality.
WILLIAM.
Lady Jane, whom Emilia was speaking of, appears to me very ill-
natured. Did you not observe how she ridiculed that modest young
gentleman who was a little deformed?
EMILIA.
Yes; she called him a spider, a little ape, and spoke so loud, that he
heard her and appeared disconcerted, and yet she continued to
laugh.
CHARLES.
Lady Jane did not recollect, that though her title announced her
rank, her behaviour proved she was not well-bred. She had not sense
to discover, that intolerable pride is a great fault, and deformity only
a misfortune. She did not recollect, that it is her Creator she was
blaming, and that a single fall, or some other casualty, might soon
render her an object of ridicule; and, at any rate, time quickly flies,
and will insensibly destroy those charms she is now so proud of; and
the ignorant may in their turn laugh at her, when she appears old
and ugly, without wisdom or virtue to render gray hairs respectable.
How often have I heard my tutor say, that wisdom and virtue never
grow old, on the contrary, while they are useful to mankind, they
spread a real splendor over the character of an individual.

Dear mother, how often have you warned me against such


behaviour, and how tenderly have I seen you treat those whom
others despised? Farewel.

WILLIAM.
LETTER LV.
William to his Mother.

Forgive me, dear mother, for having been so long silent, but I have
only disagreeable tidings to communicate to you. We all wear a face
of woe; my worthy benefactor, our dear Sir Charles, is very ill, and
has been so for some time. The physicians think him in great danger,
and we expect nothing but death. Lady Grandison, as you may well
imagine, is almost inconsolable. Emilia is continually weeping, and
Edward appears almost distracted. I will give you an account of a
conversation we had yesterday, after we left the sick room. Edward
clasped his hands together as in despair, and threw himself into a
chair in an adjoining chamber. Ah! William, he cried, how it grieves
me to think I have so often offended my more than father; yes, my
friend, every thing I have done now haunts me, and pains my very
soul.
WILLIAM.
My dear Edward be comforted, he is still alive, and God may
perhaps restore him to health.
EDWARD.
I know I do not deserve that favour, I have so often offended him,
and though he has forgiven me, I can never forgive myself; and,
perhaps, God will not forgive me. Happy Charles, who now, because
he has always been dutiful, can look for his father’s death with a
sedate sorrow, while I fly from his sick bed, continually tormented by
fear and remorse.
WILLIAM.
Indeed he appears to have much fortitude.
EDWARD.
He has a Father in heaven that is good to him, who gives him
power to support his grief.
WILLIAM.
Pray you also to that Father, and you too will obtain his favour; the
unhappy who sincerely turn to him, will always find him
compassionate and ready to forgive those who really lament their
faults, not merely the consequences produced by them.
EDWARD.
Well then, I will do so; but oh! William, my heart is very heavy.

Dear mother, I pity poor Edward, but I admire Charles; and I do


not know which to praise most, his filial love, or his sedateness and
patience; in the bitterness of his grief he scarcely ever leaves his sick
parent, he gives him his medicines, stifles his sighs, and hides his
tears, and almost seems afraid to breathe when his father closes his
eyes; but I have seen him fold his hands together, and, lifting up his
eyes to heaven, pray with ardour. I will not send this letter off till to-
morrow, when I will write again.
WILLIAM, in continuation.
How much I was affected yesterday afternoon. I went, after I had
done writing, to Sir Charles’s chamber, I opened the door softly, but
instead of Charles, saw Lady Grandison and Emilia, both kneeling at
the bed-side; I stole away unperceived to seek for Charles, I could not
find him in any of the chambers, no one knew where he was. Oh! said
I to myself, where is my dear Charles? I ran into the garden, and
there I found him in the summer-house; he was kneeling down, his
hands and eyes were lifted up to heaven, and big tears rolled down
his cheeks; I heard him pray with earnestness, but could only
distinguish a few words.
Preserve, oh! my God, my dear, my affectionate father—grant
him longer life, Thou knowest best, Thou art infinitely merciful, oh!
pardon me, I wish to die to save him, to save my mother from the
anguish she must endure if deprived of him.
He seemed in an agony, and at length arose with more apparent
firmness; I could no longer be silent, I caught his hand, God will
preserve your father, I exclaimed; I hope so, answered he, but let us
walk round the garden, that my mother may not see that I have been
crying, it would add to her sorrows. We walked backwards and
forwards, when Charles resumed the discourse; You heard me pray
then?
WILLIAM.
No, I only heard a few incoherent words, and that you wished to
die, to save your father.
CHARLES.
Of how much more consequence is his life than mine? I scarcely
know how I should live without him. My wish was a selfish one, for
perfect happiness is not to be found on earth; I have heard him often
say, the happiest have their troubles, and the best their failings,
which disturb their earthly peace.
WILLIAM.
What a comfort would these sensible reflections afford, should you
lose your father?
CHARLES.
I hope they would; though it now appears to me, that nothing
could afford me comfort, should I be deprived of the best of fathers.
Come, let us go in; I would not lose the few moments that still afford
me an opportunity of shewing my affection and alleviating his
sufferings.
We went immediately into the house. Sir Charles had slept near an
hour, and was something better; he called Charles with a faint, yet a
distinct voice, as soon as he heard him enter the room; he
approached the bed and threw himself upon his knees, he took hold
of his father’s hand and kissed it several times with a kind of eager
respect; what sensibility, what sincerity and grief, did I not see in his
countenance! The tears were rolling fast down his cheeks, it would be
impossible to delineate the scene.—What does my father want? asked
he; what would he say to his son? I wish, answered Sir Charles, to tell
you, that your duty and affection will soften the pangs of death, your
mother will still have a friend, your sister a protector, and your past
behaviour makes me rely on your future. You weep, grieve not my
son, sometime or other we must have been separated, but if you obey
your heavenly father we shall meet again, where death has no
dominion.
CHARLES.
But, my dear father, if you recover now, I might die before you.
SIR CHARLES.
Would you then, Charles, rather have me suffer, than endure grief
yourself? Do you love me?
CHARLES.
Do I love you!—I love you more than I love myself.
SIR CHARLES.
No, my dear, you are mistaken; you love yourself better, or you
would not wish me to live in a world where there are so many cares
and sorrows.
CHARLES.
It is true, but I pray forgive me, I cannot help wishing to keep you
here. I cannot forbear thinking how unhappy I shall be, when I lose
my father; I have such need of your wise counsel, you are the guide of
my youth,—my first friend.
SIR CHARLES.
You will still have a good mother, and you have a Father in heaven,
who will never leave you nor forsake you; reconcile your mind to the
event: if I die, recollect that I am only gone a little while before you;
be virtuous, remember your Creator, fulfil all your duties to your
fellow-creatures, and you will without fear wait for the last solemn
hour, and the moment when we shall meet again.—But I have said
sufficient, submit yourself to the Ruler of the universe, who loves you
even better than I do.

My friend Charles rose up, and retired from the bed, without being
able to speak, his heart was full, he threw himself into a chair. My
father, said he, has commanded me to submit to the will of heaven;
this affecting command is, perhaps, the last I shall ever receive from
his dear mouth.—Well then, I must, I will be resigned. I will suppress
my grief as well as I can, and wait the event with fortitude; my father
has taught me how to live, and I shall now learn of him how to die;
by imitating his virtues, I may be thought worthy to dwell with him
in heaven, to meet him never to part again.
The physician came in with Dr. Bartlett, he found his patient much
better, and gave us some hopes; the good Doctor took Charles by the
hand, and advised him to take some rest, for he had not been in bed
these three nights: but Charles begged to be excused; I cannot sleep,
Sir, said he, while my father suffers so much. No, I slumber by his
bed when he rests, that is sufficient. Indeed, who can so well take
care of a father as his own son? Who can love him as well as I do? My
eye must see if he lies down soft and easy, I must cover him, I must
warm his dear hands in mine when I find them cold.—I must do
more—I must receive his last breath.—He could not go on, and when
they still continued to press him, he said, he esteemed too much the
few precious hours he could now spend with his father to lose one,
while there was a shadow of danger.
What a son, dear mother! but even the recital has affected me so
much, I can only assure you that I am your dutiful son,

WILLIAM.
LETTER LVI.
Mrs. D—— to William.

I was very much concerned when I heard of your benefactor’s


alarming illness; but I would fain hope, with you, my dear William,
that heaven will restore so good a man, whose example the world has
so much need of. Yet, my son, what an opportunity presents itself for
you to view death without terror. You see with what peace and
tranquility a Christian can wait for his dying hour; one who has
observed the duties of christianity, and not assumed the mere name.
You behold the good Sir Charles resigned to the will of heaven,
calmly waiting for his dissolution; yes, every one who has lived well,
may be termed the friend of God, and secure of his protection at the
last trying hour, may view it without dismay. He knows, that released
from all the cares and sufferings of this life, he is going to enjoy the
presence and favour of the supreme fountain of good, whose favorite
he is, because he has endeavoured to copy the perfections, as far as
he could discover them, of that Being he adored. Death has nothing
terrible in it for him; no, death, at that moment, appears his best
friend, as it conducts him to an eternity of happiness, which, even in
this world, he has had a foretaste of; and besides, what delight may
not a further improvement in knowledge afford to one who has
already advanced a few steps in the attainment of it. Life is like a
dream, which quickly passes away, and virtue only forces it to leave
lasting traces behind. Let us, my son, endeavour to be good, and then
we may all expect to meet where our great improvement in virtue
may ensure our happiness. Neglect not to inform me, by the first
packet, of the present state of health of our much-esteemed friend.

D.
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade

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

Let us accompany you on the journey of exploring knowledge and


personal growth!

textbookfull.com

You might also like