(Ebook) Haskell Data Analysis Cookbook by Nishant Shukla ISBN 9781783286331, 9781782169437, 9781782162643, 9781783280995, 9781849697903, 1783286334, 1782169431, 178216264X, 1783280999 - The ebook with rich content is ready for you to download
(Ebook) Haskell Data Analysis Cookbook by Nishant Shukla ISBN 9781783286331, 9781782169437, 9781782162643, 9781783280995, 9781849697903, 1783286334, 1782169431, 178216264X, 1783280999 - The ebook with rich content is ready for you to download
https://ebooknice.com/product/biota-grow-2c-gather-2c-cook-6661374
https://ebooknice.com/product/matematik-5000-kurs-2c-larobok-23848312
https://ebooknice.com/product/sat-ii-success-
math-1c-and-2c-2002-peterson-s-sat-ii-success-1722018
(Ebook) Master SAT II Math 1c and 2c 4th ed (Arco Master the SAT
Subject Test: Math Levels 1 & 2) by Arco ISBN 9780768923049,
0768923042
https://ebooknice.com/product/master-sat-ii-math-1c-and-2c-4th-ed-
arco-master-the-sat-subject-test-math-levels-1-2-2326094
(Ebook) Cambridge IGCSE and O Level History Workbook 2C - Depth Study:
the United States, 1919-41 2nd Edition by Benjamin Harrison ISBN
9781398375147, 9781398375048, 1398375144, 1398375047
https://ebooknice.com/product/cambridge-igcse-and-o-level-history-
workbook-2c-depth-study-the-united-states-1919-41-2nd-edition-53538044
https://ebooknice.com/product/clojure-data-analysis-cookbook-14916262
https://ebooknice.com/product/clojure-data-analysis-cookbook-43270732
https://ebooknice.com/product/regenerative-medicine-emerging-
techniques-to-translation-approaches-49048164
https://ebooknice.com/product/clojure-data-analysis-cookbook-6809192
Haskell Data Analysis
Cookbook
Nishant Shukla
BIRMINGHAM - MUMBAI
Haskell Data Analysis Cookbook
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or
transmitted in any form or by any means, without the prior written permission of the publisher,
except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the
information presented. However, the information contained in this book is sold without
warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers
and distributors will be held liable for any damages caused or alleged to be caused directly or
indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies
and products mentioned in this book by the appropriate use of capitals. However, Packt
Publishing cannot guarantee the accuracy of this information.
ISBN 978-1-78328-633-1
www.packtpub.com
Reviewers Proofreaders
Lorenzo Bolla Paul Hindle
James Church Jonathan Todd
Andreas Hammar Bernadette Watkins
Marisa Reddy
Indexer
Commissioning Editor Hemangini Bari
Akram Hussain
Graphics
Acquisition Editor Sheetal Aute
Sam Wood Ronak Dhruv
Valentina Dsilva
Content Development Editor
Disha Haria
Shaon Basu
Production Coordinator
Technical Editors
Arvindkumar Gupta
Shruti Rawool
Nachiket Vartak Cover Work
Arvindkumar Gupta
Copy Editors
Sarang Chari
Janbal Dharmaraj
Gladson Monteiro
Deepa Nambiar
Karuna Narayanan
Alfida Paiva
About the Author
Stepping into the world of Haskell was his excuse for better understanding Category Theory
at first, but eventually, he found himself immersed in the language. His semester-long
introductory Haskell course in the engineering school at the University of Virginia
(http://shuklan.com/haskell) has been accessed by individuals from over
154 countries around the world, gathering over 45,000 unique visitors.
Besides Haskell, he is a proponent of decentralized Internet and open source software. His
academic research in the fields of Machine Learning, Neural Networks, and Computer Vision
aim to supply a fundamental contribution to the world of computing.
Lorenzo Bolla holds a PhD in Numerical Methods and works as a software engineer in
London. His interests span from functional languages to high-performance computing to
web applications. When he's not coding, he is either playing piano or basketball.
James Church completed his PhD in Engineering Science with a focus on computational
geometry at the University of Mississippi in 2014 under the advice of Dr. Yixin Chen. While
a graduate student at the University of Mississippi, he taught a number of courses for the
Computer and Information Science's undergraduates, including a popular class on data
analysis techniques. Following his graduation, he joined the faculty of the University of
West Georgia's Department of Computer Science as an assistant professor. He is also
a reviewer of The Manga Guide To Regression Analysis, written by Shin Takahashi,
Iroha Inoue, and Trend-Pro Co. Ltd., and published by No Starch Press.
I congratulate Nishant Shukla for the tremendous job he did in writing this
superb book of recipes and thank him for the opportunity to be a part of
the process.
www.PacktPub.com
Did you know that Packt offers eBook versions of every book published, with PDF and ePub
files available? You can upgrade to the eBook version at www.PacktPub.com and as a print
book customer, you are entitled to a discount on the eBook copy. Get in touch with us at
[email protected] for more details.
At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a
range of free newsletters and receive exclusive discounts and offers on Packt books and eBooks.
TM
http://PacktLib.PacktPub.com
Do you need instant solutions to your IT questions? PacktLib is Packt's online digital book
library. Here, you can access, read and search across Packt's entire library of books.
Why Subscribe?
ff Fully searchable across every book published by Packt
ff Copy and paste, print and bookmark content
ff On demand and accessible via web browser
ii
Table of Contents
Using a self-balancing tree 133
Implementing a min-heap data structure 135
Encoding a string using a Huffman tree 138
Decoding a Huffman code 141
Chapter 6: Graph Fundamentals 143
Introduction 144
Representing a graph from a list of edges 144
Representing a graph from an adjacency list 145
Conducting a topological sort on a graph 147
Traversing a graph depth-first 149
Traversing a graph breadth-first 150
Visualizing a graph using Graphviz 151
Using Directed Acyclic Word Graphs 152
Working with hexagonal and square grid networks 154
Finding maximal cliques in a graph 156
Determining whether any two graphs are isomorphic 157
Chapter 7: Statistics and Analysis 159
Introduction 160
Calculating a moving average 160
Calculating a moving median 162
Approximating a linear regression 165
Approximating a quadratic regression 167
Obtaining the covariance matrix from samples 168
Finding all unique pairings in a list 170
Using the Pearson correlation coefficient 171
Evaluating a Bayesian network 173
Creating a data structure for playing cards 175
Using a Markov chain to generate text 178
Creating n-grams from a list 179
Creating a neural network perceptron 180
Chapter 8: Clustering and Classification 185
Introduction 186
Implementing the k-means clustering algorithm 186
Implementing hierarchical clustering 190
Using a hierarchical clustering library 193
Finding the number of clusters 196
Clustering words by their lexemes 198
Classifying the parts of speech of words 200
Identifying key words in a corpus of text 201
Training a parts-of-speech tagger 204
iii
Table of Contents
Implementing a decision tree classifier 205
Implementing a k-Nearest Neighbors classifier 210
Visualizing points using Graphics.EasyPlot 213
Chapter 9: Parallel and Concurrent Design 215
Introduction 216
Using the Haskell Runtime System options 216
Evaluating a procedure in parallel 217
Controlling parallel algorithms in sequence 219
Forking I/O actions for concurrency 220
Communicating with a forked I/O action 221
Killing forked threads 223
Parallelizing pure functions using the Par monad 225
Mapping over a list in parallel 227
Accessing tuple elements in parallel 228
Implementing MapReduce to count word frequencies 229
Manipulating images in parallel using Repa 232
Benchmarking runtime performance in Haskell 235
Using the criterion package to measure performance 237
Benchmarking runtime performance in the terminal 239
Chapter 10: Real-time Data 241
Introduction 242
Streaming Twitter for real-time sentiment analysis 242
Reading IRC chat room messages 248
Responding to IRC messages 249
Polling a web server for latest updates 251
Detecting real-time file directory changes 252
Communicating in real time through sockets 254
Detecting faces and eyes through a camera stream 256
Streaming camera frames for template matching 259
Chapter 11: Visualizing Data 263
Introduction 264
Plotting a line chart using Google's Chart API 264
Plotting a pie chart using Google's Chart API 267
Plotting bar graphs using Google's Chart API 269
Displaying a line graph using gnuplot 272
Displaying a scatter plot of two-dimensional points 274
Interacting with points in a three-dimensional space 276
Visualizing a graph network 279
Customizing the looks of a graph network diagram 281
iv
Table of Contents
Rendering a bar graph in JavaScript using D3.js 284
Rendering a scatter plot in JavaScript using D3.js 286
Diagramming a path from a list of vectors 288
Chapter 12: Exporting and Presenting 293
Introduction 294
Exporting data to a CSV file 294
Exporting data as JSON 295
Using SQLite to store data 297
Saving data to a MongoDB database 298
Presenting results in an HTML web page 300
Creating a LaTeX table to display results 302
Personalizing messages using a text template 304
Exporting matrix values to a file 305
Index 307
v
Preface
Data analysis is something that many of us have done before, maybe even without knowing
it. It is the essential art of gathering and examining pieces of information to suit a variety of
purposes—from visual inspection to machine learning techniques. Through data analysis, we
can harness the meaning from information littered all around the digital realm. It enables us
to resolve the most peculiar inquiries, perhaps even summoning new ones in the process.
Haskell acts as our conduit for robust data analysis. For some, Haskell is a programming
language reserved to the most elite researchers in academia and industry. Yet, we see it
charming one of the fastest growing cultures of open source developers around the world.
The growth of Haskell is a sign that people are uncovering its magnificent functional
pureness, resilient type safety, and remarkable expressiveness. Flip the pages of this
book to see it all in action.
Haskell Data Analysis Cookbook is more than just a fusion of two entrancing topics
in computing. It is also a learning tool for the Haskell programming language and an
introduction to simple data analysis practices. Use it as a Swiss Army Knife of algorithms
and code snippets. Try a recipe a day, like a kata for your mind. Breeze through the book
for creative inspiration from catalytic examples. Also, most importantly, dive deep into the
province of data analysis in Haskell.
Of course, none of this would have been possible without a thorough feedback from the
technical editors, brilliant chapter illustrations by Lonku (http://lonku.tumblr.com),
and helpful layout and editing support by Packt Publishing.
Chapter 2, Integrity and Inspection, explains the importance of cleaning data through recipes
about trimming whitespaces, lexing, and regular expression matching.
Preface
Chapter 4, Data Hashing, covers essential hashing functions such as MD5, SHA256,
GeoHashing, and perceptual hashing.
Chapter 5, The Dance with Trees, establishes an understanding of the tree data structure
through examples that include tree traversals, balancing trees, and Huffman coding.
Chapter 7, Statistics and Analysis, begins the investigation of important data analysis
techniques that encompass regression algorithms, Bayesian networks, and neural networks.
Chapter 8, Clustering and Classification, involves quintessential analysis methods that involve
k-means clustering, hierarchical clustering, constructing decision trees, and implementing the
k-Nearest Neighbors classifier.
Chapter 9, Parallel and Concurrent Design, introduces advanced topics in Haskell such as
forking I/O actions, mapping over lists in parallel, and benchmarking performance.
Chapter 10, Real-time Data, incorporates streamed data interactions from Twitter, Internet
Relay Chat (IRC), and sockets.
Chapter 11, Visualizing Data, deals with sundry approaches to plotting graphs, including line
charts, bar graphs, scatter plots, and D3.js visualizations.
Chapter 12, Exporting and Presenting, concludes the book with an enumeration of algorithms
for exporting data to CSV, JSON, HTML, MongoDB, and SQLite.
2
Preface
Conventions
In this book, you will find a number of styles of text that distinguish between different kinds of
information. Here are some examples of these styles, and an explanation of their meaning.
Code words in text, database table names, folder names, filenames, file extensions, pathnames,
dummy URLs, user input, and Twitter handles are shown as follows: "Apply the readString
function to the input, and get all date documents."
When we wish to draw your attention to a particular part of a code block, the relevant lines or
items are set in bold:
main :: IO ()
main = do
input <- readFile "input.txt"
print input
3
Preface
New terms and important words are shown in bold. Words that you see on the screen,
in menus, or dialog boxes for example, appear in the text like this: "Under the Downloads
section, download the cabal source package."
Reader feedback
Feedback from our readers is always welcome. Let us know what you think about this book—
what you liked or may have disliked. Reader feedback is important for us to develop titles that
you really get the most out of.
If there is a topic that you have expertise in and you are interested in either writing or
contributing to a book, see our author guide on www.packtpub.com/authors.
Customer support
Now that you are the proud owner of a Packt book, we have a number of things to help you to
get the most from your purchase.
4
Preface
Errata
Although we have taken every care to ensure the accuracy of our content, mistakes do
happen. If you find a mistake in one of our books—maybe a mistake in the text or the code—
we would be grateful if you would report this to us. By doing so, you can save other readers
from frustration and help us improve subsequent versions of this book. If you find any errata,
please report them by visiting http://www.packtpub.com/submit-errata, selecting
your book, clicking on the errata submission form link, and entering the details of your errata.
Once your errata are verified, your submission will be accepted and the errata will be uploaded
on our website, or added to any list of existing errata, under the Errata section of that title.
Any existing errata can be viewed by selecting your title from http://www.packtpub.com/
support. Code revisions can also be made on the accompanying GitHub repository located at
https://github.com/BinRoot/Haskell-Data-Analysis-Cookbook.
Piracy
Piracy of copyright material on the Internet is an ongoing problem across all media. At Packt,
we take the protection of our copyright and licenses very seriously. If you come across any
illegal copies of our works, in any form, on the Internet, please provide us with the location
address or website name immediately so that we can pursue a remedy.
We appreciate your help in protecting our authors, and our ability to bring you valuable content.
Questions
You can contact us at [email protected] if you are having a problem with any
aspect of the book, and we will do our best to address it.
5
Random documents with unrelated
content Scribd suggests to you:
Mr. Reed has "but little doubt that Boccace's Decameron was the book here
alluded to." If this gentleman's quotation from Guazzo's Civile conversation,
1586, be meant to establish the existence of the above work in an English
dress it certainly falls short of the purpose; because it is no more than a
translation of an author, who is speaking of the original Decameron. But there
is a more forcible objection to Mr. Reed's opinion, which is, that the first
complete English translation of Boccaccio's novels was not published till 1620,
and after Shakspeare's death. The dedication states indeed, that many of the
tales had long since been published; but this may allude to those which had
appeared in Painter's Palace of pleasure, or in some other similar work not
now remaining. There are likewise two or three of Boccaccio's novels in
Tarlton's Newes out of purgatory, which might be alluded to in the above
dedication, if the work which now remains under the date of 1630 was really
printed in 1589, as may be suspected from a license granted to Thomas
Gubbin. There seems to have been some prior attempt to publish the
Decameron in English, but it was "recalled by my Lord of Canterbury's
commands." See a note by Mr. Steevens prefixed to The two gentlemen of
Verona. There is a remarkable fact however that deserves to be mentioned in
this place, which is, that in the proem to Sacchetti's Novelle, written about the
year 1360, it appears that Boccaccio's novels had been then translated into
English, not a single vestige of which translation is elsewhere to be traced.
A third work that may appear to possess some right to assert its claim on the
present occasion is the Cento novelle antiche, which might have been
translated before or in Shakspeare's time, as it has been already shown in a
note on the story of Twelfth night that he had probably seen the 13th novel in
that collection. It may likewise be worth mentioning that Nashe in his Pappe
with an hatchet, speaks of a book then coming out under the title of A
hundred merrie tales, in which Martin Marprelate, i. e. John Penry, and his
friends were to be satirized.
On the whole, the evidence seems to preponderate in favour of the Cent
nouvelles nouvelles. As the greatest portion of this work consists of merry
stories, there is no impropriety in calling it The hundred merry tales; the term
hundred being part of the original title, and the epithet merry in all probability
an addition for the purpose of designating the general quality of the stories.
The Decameron of Boccaccio, which contains more tragical subjects than the
other, is called in the English translation A hundred PLEASANT novels.
Whatever the hundred merry tales really were, we find them in existence so
late as 1659, and the entire loss of them to the present age might have been
occasioned by the devastation in the great fire of London.
Scene 1. Page 432.
Claud. Whither?
It was the custom for those who were forsaken in love to wear willow
garlands. This tree might have been chosen as the symbol of sadness from
the verse in psalm 137, "We hanged our harps upon the willows, in the midst
thereof;" or else from a coincidence between the weeping willow and falling
tears. Another reason has been assigned. The Agnus castus or vitex, was
supposed by the ancients to promote chastity, "and the willow being of a
much like nature," says an old writer, "it is yet a custom that he which is
deprived of his love must wear a willow garland." Swan's Speculum mundi,
chap. 6. sect. 4. edit. 1635. Bona, the sister of the king of France, on
receiving news of Edward the Fourth's marriage with Elizabeth Grey, exclaims,
"In hope he'll prove a widower shortly, I'll wear a willow garland for his sake."
See Henry the Sixth, part iii. and Desdemona's willow song in Othello, Act IV.
Two more ballads of a similar nature may be found in Playford's Select ayres,
1659, folio, pp. 19, 21.
Scene 1. Page 438.
Beat. Civil as an orange, and something of that jealous
complexion.
This reading of the older copy has been judiciously preferred to a jealous
complexion. Yellow is an epithet often applied to jealousy by the old writers.
In The merry wives of Windsor, Nym says he will possess Ford with
yellowness. Shakspeare more usually terms it green-eyed.
Scene 3. Page 447.
Bene. ... now will he lie ten nights awake, carving the fashion
of a new doublet.
The print in Borde of the Englishman with a pair of shears, seems to have
been borrowed from some Italian or other foreign picture in ridicule of our
countrymen's folly. Coryat, in his Crudities, p. 260, has this remark; "we weare
more phantasticall fashions than any nation under the sunne doth, the French
onely excepted; which hath given occasion both to the Venetian and other
Italians to brand the Englishman with a notable marke of levity, by painting
him starke naked with a paire of shears in his hand, making his fashion of
attire according to the vaine invention of his braine-sicke head, not to
comelinesse and decorum." Purchas, in his Pilgrim, 1619, 8vo, speaks of "a
naked man with sheeres in one hand and cloth in the other," as a general
emblem of fashion. Many other allusions to such a figure might be cited, but it
was not peculiar to the English. In La geographie Françoise, by P. Du Val
d'Abbeville, 1663, 12mo, the author, speaking of the Frenchman's versatility in
dress, adds, "dans la peinture des nations on met pres de luy le cizeau."
The inconstancy of our own countrymen in the article of dress is described in
the following verses from John Halle's Courte of vertue, 1565, 12mo.
ACT III.
Scene 1. Page 469.
D. Pedro. ... the little hangman dare not shoot at him.
Dr. Farmer has illustrated this term by citing a passage from Sidney's Arcadia;
but he has omitted a previous description in which Cupid is metamorphosed
into a strange old monster, sitting on a gallows with a crown of laurel in one
hand, and a purse of money in the other, as if he would persuade folks by
these allurements to hang themselves. It is certainly possible that this might
have been Shakspeare's prototype; we should otherwise have supposed that
he had called Cupid a hangman metaphorically, from the remedy sometimes
adopted by desparing lovers.
Scene 4. Page 488.
Marg. Clap us into light o'love.
When Margaret adds that this tune "goes without a burden," she does not
mean that it never had words to it, but only that it wanted a very common
appendage to the ballads of that time. The name itself may be illustrated by
the following extract from The glasse of man's follie, 1615, 4to. "There be
wealthy houswives, and good house-keepers that use no starch, but faire
water: their linnen is white, and they looke more Christian-like in small ruffes,
then Light of love lookes in her great starched ruffs, looke she never so hie,
with eye-lids awrye." This anonymous work is written much in the manner of
Stubbes's Anatomie of abuses, and for the same purpose.
ACT IV.
Scene 1. Page 510.
Though three explanations have been already offered, there is room for
further conjecture. From the latter words of Beatrice it is clear that Benedick
had stopped her from going. She may therefore intend to say that
notwithstanding she is detained by force, she is in reality absent; her heart is
no longer Benedick's.
ACT V.
Scene 1. Page 524.
Leon. His May of youth, and bloom of lustyhood.
An allusion to these lines in the old calendars that describe the state of man:
In the Notbrowne mayde we have the expression lusty May. Capel's edit. p. 6.
Roger Ascham, speaking of young men, says; "It availeth not to see them well
taught in yong yeares, and after when they come to lust and youthfull dayes,
to give them licence to live as they lust themselves." Scholemaster, 1571, fo.
13. See a former note in p. 45.
Scene 1. Page 529.
Claud. If he be, [angry] he knows how to turn his girdle.
Mr. Holt White's ingenious note may be supported by the following passage in
Carew's Survey of Cornwall, 1602, 4to. p. 76: the author is speaking of
wrestling. "This hath also his lawes, of taking hold onely above girdle, wearing
a girdle to take hold by, playing three pulles, for tryall of the mastery, &c."
Scene 4. Page 554.
Bene. Prince, thou art sad; get thee a wife, get thee a wife;
there is no staff more reverend than one tipp'd with horn.
In this comparison the prince is the staff, and the question is what sort of a
one is here alluded to. Messrs. Steevens, Reed, and Malone, conceive it to be
the staff used in the ancient trial by wager of battle; but this seems to have
but small claim to be entitled reverend. On the contrary, as the combatants
were of the meaner class of people, who were not allowed to make use of
edged weapons, the higher ranks usually deciding the business by hired
champions, it cannot well be maintained that much, if any, reverence belongs
to such a staff. It is possible, therefore, that Shakspeare, whose allusions to
archery are almost as frequent as they are to cuckoldom, might refer to the
bowstaff, which was usually tipped with a piece of horn at each end, to make
such a notch for the string as would not wear, and at the same time to
strengthen the bow, and prevent the extremities from breaking. It is equally
possible that the walking-sticks or staves used by elderly people might be
intended, which were often headed or tipped with a cross piece of horn, or
sometimes amber. They seem to have been imitated from the crutched sticks,
or potences, as they were called, used by the friars, and by them borrowed
from the celebrated tau of St. Anthony. Thus in The Canterbury tales, the
Sompnour describes one of his friars as having "a scrippe and tipped staf,"
and he adds that
"His felaw had a staf tipped with horn."
In these instances the epithet reverend is much more appropriate than in the
others.
Mrs. Lenox, assuming, with the same inaccuracy as had been manifested in
her critique on Measure for measure, that Shakspeare borrowed his plot from
Ariosto, proceeds to censure him for "poverty of invention, want of judgment,
and wild conceits," deducing all her reasoning from false premises. This is
certainly but a bad method of illustrating Shakspeare.
MIDSUMMER NIGHT'S DREAM.
ACT I.
Scene 1. Page 6.
Ege. Happy be Theseus, our renowned duke.
This is in reality no "misapplication of a modern title," as Mr.
Steevens conceived, but a legitimate use of the word in its primitive
Latin sense of leader; and so it is often used in the Bible. Not so the
instance adduced of sheriffs of the provinces, which might have
been avoided in our printed bibles. Wicliffe had most properly used
prefectis. Shakspeare might have found Duke Theseus in the book of
Troy, or in Turbervile's Ovid's Epistles. See the argument to that of
Phædra to Hippolytus.
Scene 1. Page 9.
ACT II.
Scene 1. Page 30.
Mr. Steevens in the happy and elegant remark at the end of his note
on the last line, has made a slight mistake in substituting Puck for
the fairy. When the damsels of old gathered the May dew on the
grass, and which they made use of to improve their complexions,
they left undisturbed such of it as they perceived on the fairy-rings;
apprehensive that the fairies should in revenge destroy their beauty.
Nor was it reckoned safe to put the foot within the rings, lest they
should be liable to the fairies' power.
Scene 1. Page 32.
Puck. But they do square.
Dr. Johnson has very justly observed that to square here is to
quarrel. In investigating the reason, we must previously take it for
granted that our verb to quarrel is from the French quereller, or
perhaps both from the common source, the Latin querela.
Blackstone has remarked that the glaziers use the words square and
quarrel as synonymous terms for a pane of glass, and he might have
added for the instrument with which they cut it. This, he says, is
somewhat whimsical; but had he been acquainted with the reason,
he might have been disposed to waive his opinion, at least on the
present occasion. The glazier's instrument is a diamond, usually cut
into such a square form as the supposed diamonds on the French
and English cards, in the former of which it is still properly called
carreau, from its original. This was the square iron head of the arrow
used for the cross-bow. In English it was called a quarrel, and hence
the glazier's diamond and the pane of glass have received their
names of square and quarrel. Now we may suppose without
straining the point very violently, that these words being evidently
synonymous in one sense, have corruptedly become so in another;
and that the verb to square, which correctly and metaphorically,
even at this time, signifies to agree or accord, has been carelessly
and ignorantly wrested from its true sense, and from frequent use
become a legitimate word. The French have avoided this error, and
to express a meaning very similar to that of to quarrel or dispute,
make use of the word contrecarrer.
Scene 1. Page 37.
The above dame is a farmer's wife who has been scolding because
she was unable to procure any butter or cheese, and at Puck's
holding up the hens' rumps to prevent their laying eggs too fast.
With respect to the word aunt, it has been usually derived from the
French tante; but the original Norman term is ante. See examples in
Carpentier Suppl. ad Ducang. v. avuncula. So the author of the old
and excellent farce of Maistre Patelin,
"Vostre belle ante, mourut-elle?"
Scene 2. Page 39.
Enter Oberon and Titania.
Mr. Tyrwhitt's remark that the Pluto and Proserpine of Chaucer were
the true progenitors of Oberon and Titania, may be perfectly true;
but the name of Oberon as king of the fairies, must have been
exceedingly well known from the romance of Huon of Bourdeaux, in
which this Oberon makes a very conspicuous figure.
Scene 2. Page 41.
Of all the opinions concerning the origin of this word, that of Sir
William Spelman alone can be maintained. If instead of deriving it
from the German, he had stated that it came to us through the
Saxon Henᵹeꞅꞇ, a horse, his information had been more correct.
Although in more modern times the pages or henchmen might have
walked on foot, it is very certain that they were originally horsemen,
according to the term. Thus in Chaucer's Floure and the leafe:
ACT III.
Scene 1. Page 77.
Quin. When you have spoken your speech, enter into
that brake.
It is submitted that brake cannot in this instance signify a large
extent of ground, overgrown with furze, but merely the hawthorn
bush or tyring-house as Quince had already called it.
Scene 1. Page 83.
Bot. Nay I can gleek upon occasion.
Again, in Romeo and Juliet, Act IV. Scene 5:
It was the popular belief that ghosts retired at the approach of day.
Thus the spirit of Hamlet's father exclaims,
"But soft, methinks I scent the morning air."
In further illustration see a subsequent note on Hamlet, Act I. Scene
1.
Scene 2. Page 117.
Hel. And, sleep, that sometime shuts up sorrow's eye.
Again, in Macbeth:
"Sleep, that knits up the ravell'd sleave of care."
ACT V.
Scene 1. Page 145.
Mr. Steevens remarks that the ceremony of blessing the bed was
observed at the marriage of a princess. It was used at all marriages.
This was the form, copied from the Manual for the use of Salisbury.
"Nocte vero sequente cum sponsus et sponsa ad lectum pervenerint,
accedat sacerdos et benedicat thalamum, dicens: Benedic, Domine,
thalamum istum et omnes habitantes in eo; ut in tua pace
consistant, et in tua voluntate permaneant: et in amore tuo vivant et
senescant et multiplicentur in longitudine dierum. Per Dominum.—
Item benedictio super lectum. Benedic, Domine, hoc cubiculum,
respice, quinon dormis neque dormitas. Qui custodis Israel, custodi
famulos tuos in hoc lecto quiescentes ab omnibus fantasmaticis
demonum illusionibus: custodi eos vigilantes ut in preceptis tuis
meditentur dormientes, et te per soporem sentiant: ut hic et ubique
defensionis tuæ muniantur auxilio. Per Dominum.—Deinde fiat
benedictio super eos in lecto tantum cum Oremus. Benedicat Deus
corpora vestra et animas vestras; et det super vos benedictionem
sicut benedixit Abraham, Isaac, et Jacob, Amen.—His peractis
aspergat eos aqua benedicta, et sic discedat et dimittat eos in pace."
We may observe on this strange ceremony, that the purity of modern
times stands not in need of these holy aspersions to lull the senses
and dissipate the illusions of the Devil. The married couple would, no
doubt, rejoice when the benediction was ended. In the French
romance of Melusine, the bishop who marries her to Raymondin
blesses the nuptial bed. The ceremony is there represented in a very
ancient cut, of which a copy is subjoined. The good prelate is
sprinkling the parties with holy water. Sometimes during the
benediction the married couple only sat upon the bed; but they
generally received a portion of consecrated bread and wine. It is
recorded in France, that on frequent occasions the priest was
improperly detained till the hour of midnight, whilst the wedding
guests rioted in the luxuries of the table, and made use of language
that was extremely offensive to the clergy, and injurious to the
salvation of the parties. It was therefore, in the year 1577, ordained
by Pierre de Gondi, archbishop of Paris, that the ceremony of
blessing the nuptial bed should for the future be performed in the
day time, or at least before supper, and in the presence only of the
bride and bridegroom, and of their nearest relations.
There is a singularity in this cut which may well excuse a short
digression. This is the horned head-dress of the bride, a fashion that
prevailed in England during the reign of Henry the Sixth, and for a
short time afterwards. Lydgate has left us an unpublished ditty, in
which he complains of it. As it is, like most of his other poetry, very
dull and very tedious, a couple of stanzas may suffice; each
concludes with a line to recommend the casting away of these
horns.
"Clerkys recorde by gret auctorite,
Hornys were yove to beestys for diffence;
A thyng contrary to femynyte
To be made sturdy of resistence.
But arche wyves egre in ther violence,
Fers as tygre for to make affray,
They have despyt and ageyn conscience
Lyst nat of pryde ther hornys cast away.
FOOTNOTES:
[11] It has not been recollected to what poet these lines belong.
LOVE'S LABOUR'S LOST
ACT I.
Scene 1. Page 181.
It was the fashion in Shakspeare's time, and had been so from the thirteenth
century, to ornament the tombs of eminent persons with figures and
inscriptions on plates of brass: to these the allusion seems rather to be made,
than to monuments that were entirely of brass, such being of very rare
occurrence.
Scene 1. Page 182.
Long. Fat paunches have lean pates.
From the Latin pinguis venter non gignit sensum tenuem. See Ray's Proverbs.
The rest of Longaville's speech, "and dainty bits," &c. merely repeats the
same sentiment for the sake of a rhime.
Scene 1. Page 183.
Biron. If study's gain be thus, and this be so.
Mr. Ritson would read, If study's gain be this. There is no occasion for any
change. Thus means after this manner; but the poet would not write this, in
order to avoid a cacophony.
Scene 1. Page 191.
The context seems to indicate that child of fancy is here used precisely in the
sense in which Milton applied it to Shakspeare, from whom he probably
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.
ebooknice.com