Skip to content

Instantly share code, notes, and snippets.

@JonathanReeve
Created February 23, 2018 21:51
Show Gist options
  • Save JonathanReeve/d63092ba4b309544aac7463e6818251c to your computer and use it in GitHub Desktop.
Save JonathanReeve/d63092ba4b309544aac7463e6818251c to your computer and use it in GitHub Desktop.
Spacy Experiments
Display the source blob
Display the rendered blob
Raw
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
"import spacy"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
"nlp = spacy.load('en_core_web_lg')"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"outputs": [],
"source": [
"draculaRaw = open('dracula.txt').read()"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {},
"outputs": [],
"source": [
"draculaDoc = nlp(draculaRaw)"
]
},
{
"cell_type": "code",
"execution_count": 13,
"metadata": {},
"outputs": [],
"source": [
"sents = list(draculaDoc.sents)"
]
},
{
"cell_type": "code",
"execution_count": 16,
"metadata": {},
"outputs": [],
"source": [
"sent5 = sents[5]"
]
},
{
"cell_type": "code",
"execution_count": 17,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"feared"
]
},
"execution_count": 17,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"sent5.root"
]
},
{
"cell_type": "code",
"execution_count": 19,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"I feared to go very far from the station, as we had arrived\n",
"late and would start as near the correct time as possible."
]
},
"execution_count": 19,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"sent5"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# This is a heading\n",
"\n",
"This my description. It has _italics_. It has **boldface**. It has <http://google.com> links."
]
},
{
"cell_type": "code",
"execution_count": 26,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"0 ... \n",
" \n",
"\n",
"1 ... _3 May. \n",
"\n",
"2 ... Bistritz._--Left Munich at 8:35 P. M., on 1st \n",
"\n",
"3 ... May, arriving at\n",
"Vienna early next morning; should have arrived at 6:46, but train was an\n",
"hour late. \n",
"\n",
"4 ... Buda-Pesth seems a wonderful place, from the glimpse which I\n",
"got of it from the train and the little I could walk through the\n",
"streets. \n",
"\n",
"5 ... I feared to go very far from the station, as we had arrived\n",
"late and would start as near the correct time as possible. \n",
"\n",
"6 ... The\n",
"impression I had was that we were leaving the West and entering the\n",
"East; the most western of splendid bridges over the Danube, which is\n",
"here of noble width and depth, took us among the traditions of Turkish\n",
"rule.\n",
"\n",
" \n",
"\n",
"7 ... We left in pretty good time, and came after nightfall to Klausenburgh.\n",
" \n",
"\n",
"8 ... Here I stopped for the night at the Hotel Royale. \n",
"\n",
"9 ... I had for dinner, or\n",
"rather supper, a chicken done up some way with red pepper, which was\n",
"very good but thirsty. \n",
"\n"
]
}
],
"source": [
"for i, sent in enumerate(sents[:10]): \n",
" print(i, \"...\", sent, '\\n')"
]
},
{
"cell_type": "code",
"execution_count": 22,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"I\n",
"go\n",
".\n"
]
}
],
"source": [
"for child in sent5.root.children:\n",
" print(child)"
]
},
{
"cell_type": "code",
"execution_count": 27,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"0.5967200992647439"
]
},
"execution_count": 27,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"sent5.similarity(sent[2])"
]
},
{
"cell_type": "code",
"execution_count": 28,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"I feared to go very far from the station, as we had arrived\n",
"late and would start as near the correct time as possible."
]
},
"execution_count": 28,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"sent5"
]
},
{
"cell_type": "code",
"execution_count": 39,
"metadata": {},
"outputs": [],
"source": [
"texts = [word.text for word in sent5]\n",
"tags = [word.tag_ for word in sent5]"
]
},
{
"cell_type": "code",
"execution_count": 45,
"metadata": {},
"outputs": [],
"source": [
"myZip = zip(texts, tags)"
]
},
{
"cell_type": "code",
"execution_count": 47,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"[, _3 May., Bistritz._--Left Munich at 8:35 P. M., on 1st, May, arriving at\n",
" Vienna early next morning; should have arrived at 6:46, but train was an\n",
" hour late., Buda-Pesth seems a wonderful place, from the glimpse which I\n",
" got of it from the train and the little I could walk through the\n",
" streets., I feared to go very far from the station, as we had arrived\n",
" late and would start as near the correct time as possible., The\n",
" impression I had was that we were leaving the West and entering the\n",
" East; the most western of splendid bridges over the Danube, which is\n",
" here of noble width and depth, took us among the traditions of Turkish\n",
" rule.\n",
" , We left in pretty good time, and came after nightfall to Klausenburgh., Here I stopped for the night at the Hotel Royale., I had for dinner, or\n",
" rather supper, a chicken done up some way with red pepper, which was\n",
" very good but thirsty., (_Mem., _, get recipe for Mina.), I asked the\n",
" waiter, and he said it was called \"paprika hendl,\" and that, as it was a\n",
" national dish, I should be able to get it anywhere along the\n",
" Carpathians., I found my smattering of German very useful here; indeed, I\n",
" don't know how I should be able to get on without it.\n",
" , Having had some time at my disposal when in London, I had visited the\n",
" British Museum, and made search among the books and maps in the library\n",
" regarding Transylvania; it had struck me that some foreknowledge of the\n",
" country could hardly fail to have some importance in dealing with a\n",
" nobleman of that country., I find that the district he named is in the\n",
" extreme east of the country, just on the borders of three states,\n",
" Transylvania, Moldavia and Bukovina, in the midst of the Carpathian\n",
" mountains; one of the wildest and least known portions of Europe., I was\n",
" not able to light on any map or work giving the exact locality of the\n",
" Castle Dracula, as there are no maps of this country as yet to compare\n",
" with our own Ordnance Survey maps; but I found that Bistritz, the post\n",
" town named by Count Dracula, is a fairly well-known place., I shall enter\n",
" here some of my notes, as they may refresh my memory when I talk over my\n",
" travels with Mina.\n",
" , In the population of Transylvania there are four distinct nationalities:\n",
" Saxons in the South, and mixed with them the Wallachs, who are the\n",
" descendants of the Dacians;, Magyars in the West, and Szekelys in the\n",
" East and North., I am going among the latter, who claim to be descended\n",
" from Attila and the Huns., This may be so, for when the Magyars conquered\n",
" the country in the eleventh century they found the Huns settled in it., I\n",
" read that every known superstition in the world is gathered into the\n",
" horseshoe of the Carpathians, as if it were the centre of some sort of\n",
" imaginative whirlpool; if so my stay may be very interesting., (_Mem., _, I\n",
" must ask the Count all about them.)\n",
" , I did not sleep well, though my bed was comfortable enough, for I had\n",
" all sorts of queer dreams., There was a dog howling all night under my\n",
" window, which may have had something to do with it; or it may have been\n",
" the paprika, for I had to drink up all the water in my carafe, and was\n",
" still thirsty., Towards morning I slept and was wakened by the continuous\n",
" knocking at my door, so I guess I must have been sleeping soundly then., I had for breakfast more paprika, and a sort of porridge of maize flour\n",
" which they said was \"mamaliga,\" and egg-plant stuffed with forcemeat, a\n",
" very excellent dish, which they call \"impletata.\", (_Mem., _, get recipe\n",
" for this also.), I had to hurry breakfast, for the train started a little\n",
" before eight, or rather it ought to have done so, for after rushing to\n",
" the station at 7:30 I had to sit in the carriage for more than an hour\n",
" before we began to move., It seems to me that the further east you go the\n",
" more unpunctual are the trains., What ought they to be in China?\n",
" , All day long we seemed to dawdle through a country which was full of\n",
" beauty of every kind., Sometimes we saw little towns or castles on the\n",
" top of steep hills such as we see in old missals; sometimes we ran by\n",
" rivers and streams which seemed from the wide stony margin on each side\n",
" of them to be subject to great floods., It takes a lot of water, and\n",
" running strong, to sweep the outside edge of a river clear., At every\n",
" station there were groups of people, sometimes crowds, and in all sorts\n",
" of attire., Some of them were just like the peasants at home or those I\n",
" saw coming through France and Germany, with short jackets and round hats\n",
" and home-made trousers; but others were very picturesque., The women\n",
" looked pretty, except when you got near them, but they were very clumsy\n",
" about the waist., They had all full white sleeves of some kind or other,\n",
" and most of them had big belts with a lot of strips of something\n",
" fluttering from them like the dresses in a ballet, but of course there\n",
" were petticoats under them., The strangest figures we saw were the\n",
" Slovaks, who were more barbarian than the rest, with their big cow-boy\n",
" hats, great baggy dirty-white trousers, white linen shirts, and enormous\n",
" heavy leather belts, nearly a foot wide, all studded over with brass\n",
" nails., They wore high boots, with their trousers tucked into them, and\n",
" had long black hair and heavy black moustaches., They are very\n",
" picturesque, but do not look prepossessing., On the stage they would be\n",
" set down at once as some old Oriental band of brigands., They are,\n",
" however, I am told, very harmless and rather wanting in natural\n",
" self-assertion.\n",
" , It was on the dark side of twilight when we got to Bistritz, which is a\n",
" very interesting old place., Being practically on the frontier--for the\n",
" Borgo Pass leads from it into Bukovina--it has had a very stormy\n",
" existence, and it certainly shows marks of it., Fifty years ago a series\n",
" of great fires took place, which made terrible havoc on five separate\n",
" occasions., At the very beginning of the seventeenth century it underwent\n",
" a siege of three weeks and lost 13,000 people, the casualties of war\n",
" proper being assisted by famine and disease.\n",
" , Count Dracula had directed me to go to the Golden Krone Hotel, which I\n",
" found, to my great delight, to be thoroughly old-fashioned, for of\n",
" course, I wanted to see all I could of the ways of the country., I was\n",
" evidently expected, for when I got near the door I faced a\n",
" cheery-looking elderly woman in the usual peasant dress--white\n",
" undergarment with long double apron, front, and back, of coloured stuff\n",
" fitting almost too tight for modesty., When I came close she bowed and\n",
" said, \"The Herr Englishman?\", \"Yes,\" I said, \"Jonathan Harker.\", She\n",
" smiled, and gave some message to an elderly man in white shirt-sleeves,\n",
" who had followed her to the door., He went, but immediately returned with\n",
" a letter:--\n",
" \n",
" , \"My Friend.--Welcome to the Carpathians., I am anxiously expecting\n",
" you., Sleep well to-night., At three to-morrow the diligence will\n",
" start for Bukovina; a place on it is kept for you., At the Borgo\n",
" Pass my carriage will await you and will bring you to me., I trust\n",
" that your journey from London has been a happy one, and that you\n",
" will enjoy your stay in my beautiful land.\n",
" , \"Your friend,\n",
" \n",
" \"DRACULA.\"\n",
" \n",
" , _, 4 May._--I found that my landlord had got a letter from the Count,\n",
" directing him to secure the best place on the coach for me; but on\n",
" making inquiries as to details he seemed somewhat reticent, and\n",
" pretended that he could not understand my German., This could not be\n",
" true, because up to then he had understood it perfectly; at least, he\n",
" answered my questions exactly as if he did., He and his wife, the old\n",
" lady who had received me, looked at each other in a frightened sort of\n",
" way., He mumbled out that the money had been sent in a letter, and that\n",
" was all he knew., When I asked him if he knew Count Dracula, and could\n",
" tell me anything of his castle, both he and his wife crossed themselves,\n",
" and, saying that they knew nothing at all, simply refused to speak\n",
" further., It was so near the time of starting that I had no time to ask\n",
" any one else, for it was all very mysterious and not by any means\n",
" comforting.\n",
" , Just before I was leaving, the old lady came up to my room and said in a\n",
" very hysterical way:\n",
" \n",
" \"Must you go?, Oh!, young Herr, must you go?, \" She was in such an excited\n",
" state that she seemed to have lost her grip of what German she knew, and\n",
" mixed it all up with some other language which I did not know at all., I\n",
" was just able to follow her by asking many questions., When I told her\n",
" that I must go at once, and that I was engaged on important business,\n",
" she asked again:\n",
" , \"Do you know what day it is?\", I answered that it was the fourth of May., She shook her head as she said again:\n",
" \n",
" \"Oh, yes!, I know that!, I know that, but do you know what day it is?, \" On\n",
" my saying that I did not understand, she went on:\n",
" \n",
" \"It is the eve of St. George's Day., Do you not know that to-night, when\n",
" the clock strikes midnight, all the evil things in the world will have\n",
" full sway?, Do you know where you are going, and what you are going to?\", She was in such evident distress that I tried to comfort her, but\n",
" without effect., Finally she went down on her knees and implored me not\n",
" to go; at least to wait a day or two before starting., It was all very\n",
" ridiculous, but I did not feel comfortable., However, there was business\n",
" to be done, and I could allow nothing to interfere with it., I therefore\n",
" tried to raise her up, and said, as gravely as I could, that I thanked\n",
" her, but my duty was imperative, and that I must go., She then rose and\n",
" dried her eyes, and taking a crucifix from her neck offered it to me., I\n",
" did not know what to do, for, as an English Churchman, I have been\n",
" taught to regard such things as in some measure idolatrous, and yet it\n",
" seemed so ungracious to refuse an old lady meaning so well and in such a\n",
" state of mind., She saw, I suppose, the doubt in my face, for she put the\n",
" rosary round my neck, and said, \"For your mother's sake,\" and went out\n",
" of the room., I am writing up this part of the diary whilst I am waiting\n",
" for the coach, which is, of course, late; and the crucifix is still\n",
" round my neck., Whether it is the old lady's fear, or the many ghostly\n",
" traditions of this place, or the crucifix itself, I do not know, but I\n",
" am not feeling nearly as easy in my mind as usual., If this book should\n",
" ever reach Mina before I do, let it bring my good-bye., Here comes the\n",
" coach!\n",
" \n",
" , * , * , * , * , *\n",
" \n",
" _5 May., The Castle._--The grey of the morning has passed, and the sun is\n",
" high over the distant horizon, which seems jagged, whether with trees or\n",
" hills, I know not, for it is so far off that big things and little, are\n",
" mixed., I am not sleepy, and, as I am not to be called till I awake,\n",
" naturally I write till sleep comes., There are many odd things to put\n",
" down, and, lest who reads them may fancy that I dined too well before I\n",
" left Bistritz, let me put down my dinner exactly., I dined on what they\n",
" called \"robber steak\"--bits of bacon, onion, and beef, seasoned with red\n",
" pepper, and strung on sticks and roasted over the fire, in the simple\n",
" style of the London cat's meat!, The wine was Golden Mediasch, which\n",
" produces a queer sting on the tongue, which is, however, not\n",
" disagreeable., I had only a couple of glasses of this, and nothing else.\n",
" , When I got on the coach the driver had not taken his seat, and I saw him\n",
" talking with the landlady., They were evidently talking of me, for every\n",
" now and then they looked at me, and some of the people who were sitting\n",
" on the bench outside the door--which they call by a name meaning\n",
" \"word-bearer\"--came and listened, and then looked at me, most of them\n",
" pityingly., I could hear a lot of words often repeated, queer words, for\n",
" there were many nationalities in the crowd; so I quietly got my polyglot\n",
" dictionary from my bag and looked them out., I must say they were not\n",
" cheering to me, for amongst them were \"Ordog\"--Satan, \"pokol, \"--, hell,\n",
" \"stregoica\"--witch, \"vrolok\" and \"vlkoslak\"--, both of which mean the same\n",
" thing, one being Slovak and the other Servian for something that is\n",
" either were-wolf or vampire., (_Mem., _, I must ask the Count about these\n",
" superstitions)\n",
" \n",
" When we started, the crowd round the inn door, which had by this time\n",
" swelled to a considerable size, all made the sign of the cross and\n",
" pointed two fingers towards me., With some difficulty I got a\n",
" fellow-passenger to tell me what they meant; he would not answer at\n",
" first, but on learning that I was English, he explained that it was a\n",
" charm or guard against the evil eye., This was not very pleasant for me,\n",
" just starting for an unknown place to meet an unknown man; but every one\n",
" seemed so kind-hearted, and so sorrowful, and so sympathetic that I\n",
" could not but be touched., I shall never forget the last glimpse which I\n",
" had of the inn-yard and its crowd of picturesque figures, all crossing\n",
" themselves, as they stood round the wide archway, with its background of\n",
" rich foliage of oleander and orange trees in green tubs clustered in the\n",
" centre of the yard., Then our driver, whose wide linen drawers covered\n",
" the whole front of the box-seat--\"gotza\" they call them--cracked his big\n",
" whip over his four small horses, which ran abreast, and we set off on\n",
" our journey.\n",
" , I soon lost sight and recollection of ghostly fears in the beauty of the\n",
" scene as we drove along, although had I known the language, or rather\n",
" languages, which my fellow-passengers were speaking, I might not have\n",
" been able to throw them off so easily., Before us lay a green sloping\n",
" land full of forests and woods, with here and there steep hills, crowned\n",
" with clumps of trees or with farmhouses, the blank gable end to the\n",
" road., There was everywhere a bewildering mass of fruit blossom--apple,\n",
" plum, pear, cherry; and as we drove by I could see the green grass under\n",
" the trees spangled with the fallen petals., In and out amongst these\n",
" green hills of what they call here the \"Mittel Land\" ran the road,\n",
" losing itself as it swept round the grassy curve, or was shut out by the\n",
" straggling ends of pine woods, which here and there ran down the\n",
" hillsides like tongues of flame., The road was rugged, but still we\n",
" seemed to fly over it with a feverish haste., I could not understand then\n",
" what the haste meant, but the driver was evidently bent on losing no\n",
" time in reaching Borgo Prund., I was told that this road is in summertime\n",
" excellent, but that it had not yet been put in order after the winter\n",
" snows., In this respect it is different from the general run of roads in\n",
" the Carpathians, for it is an old tradition that they are not to be kept\n",
" in too good order., Of old the Hospadars would not repair them, lest the\n",
" Turk should think that they were preparing to bring in foreign troops,\n",
" and so hasten the war which was always really at loading point.\n",
" , Beyond the green swelling hills of the Mittel Land rose mighty slopes\n",
" of forest up to the lofty steeps of the Carpathians themselves., Right\n",
" and left of us they towered, , with the afternoon sun falling full upon\n",
" them and bringing out all the glorious colours of this beautiful range,\n",
" deep blue and purple in the shadows of the peaks, green and brown where\n",
" grass and rock mingled, and an endless perspective of jagged rock and\n",
" pointed crags, till these were themselves lost in the distance, where\n",
" the snowy peaks rose grandly., Here and there seemed mighty rifts in the\n",
" mountains, through which, as the sun began to sink, we saw now and again\n",
" the white gleam of falling water., One of my companions touched my arm as\n",
" we swept round the base of a hill and opened up the lofty, snow-covered\n",
" peak of a mountain, which seemed, as we wound on our serpentine way, to\n",
" be right before us:--\n",
" , \"Look!, Isten szek!\"--\"God's seat!\"--and he crossed himself reverently.\n",
" , As we wound on our endless way, and the sun sank lower and lower behind\n",
" us, the shadows of the evening began to creep round us., This was\n",
" emphasised by the fact that the snowy mountain-top still held the\n",
" sunset, and seemed to glow out with a delicate cool pink., Here and there\n",
" we passed Cszeks and Slovaks, all in picturesque attire, but I noticed\n",
" that goitre was painfully prevalent., By the roadside were many crosses,\n",
" and as we swept by, my companions all crossed themselves., Here and there\n",
" was a peasant man or woman kneeling before a shrine, who did not even\n",
" turn round as we approached, but seemed in the self-surrender of\n",
" devotion to have neither eyes nor ears for the outer world., There were\n",
" many things new to me: for instance, hay-ricks in the trees, and here\n",
" and there very beautiful masses of weeping birch, their white stems\n",
" shining like silver through the delicate green of the leaves., Now and\n",
" again we passed a leiter-wagon--the ordinary peasant's cart--with its\n",
" long, snake-like vertebra, calculated to suit the inequalities of the\n",
" road., On this were sure to be seated quite a group of home-coming\n",
" peasants, the Cszeks with their white, and the Slovaks with their\n",
" coloured, sheepskins, the latter carrying lance-fashion their long\n",
" staves, with axe at end., As the evening fell it began to get very cold,\n",
" and the growing twilight seemed to merge into one dark mistiness the\n",
" gloom of the trees, oak, beech, and pine, though in the valleys which\n",
" ran deep between the spurs of the hills, as we ascended through the\n",
" Pass, the dark firs stood out here and there against the background of\n",
" late-lying snow., Sometimes, as the road was cut through the pine woods\n",
" that seemed in the darkness to be closing down upon us, great masses of\n",
" greyness, which here and there bestrewed the trees, produced a\n",
" peculiarly weird and solemn effect, which carried on the thoughts and\n",
" grim fancies engendered earlier in the evening, when the falling sunset\n",
" threw into strange relief the ghost-like clouds which amongst the\n",
" Carpathians seem to wind ceaselessly through the valleys., Sometimes the\n",
" hills were so steep that, despite our driver's haste, the horses could\n",
" only go slowly., I wished to get down and walk up them, as we do at home,\n",
" but the driver would not hear of it., \", No, no,\" he said; \"you must not\n",
" walk here; the dogs are too fierce\"; and then he added, with what he\n",
" evidently meant for grim pleasantry--for he looked round to catch the\n",
" approving smile of the rest--\"and you may have enough of such matters\n",
" before you go to sleep.\", The only stop he would make was a moment's\n",
" pause to light his lamps.\n",
" , When it grew dark there seemed to be some excitement amongst the\n",
" passengers, and they kept speaking to him, one after the other, as\n",
" though urging him to further speed., He lashed the horses unmercifully\n",
" with his long whip, and with wild cries of encouragement urged them on\n",
" to further exertions., Then through the darkness I could see a sort of\n",
" patch of grey light ahead of us, as though there were a cleft in the\n",
" hills., The excitement of the passengers grew greater; the crazy coach\n",
" rocked on its great leather springs, and swayed like a boat tossed on a\n",
" stormy sea., I had to hold on., The road grew more level, and we appeared\n",
" to fly along., Then the mountains seemed to come nearer to us on each\n",
" side and to frown down upon us; we were entering on the Borgo Pass., One\n",
" by one several of the passengers offered me gifts, which they pressed\n",
" upon me with an earnestness which would take no denial; these were\n",
" certainly of an odd and varied kind, but each was given in simple good\n",
" faith, with a kindly word, and a blessing, and that strange mixture of\n",
" fear-meaning movements which I had seen outside the hotel at\n",
" Bistritz--the sign of the cross and the guard against the evil eye., Then, as we flew along, the driver leaned forward, and on each side the\n",
" passengers, craning over the edge of the coach, peered eagerly into the\n",
" darkness., It was evident that something very exciting was either\n",
" happening or expected, but though I asked each passenger, no one would\n",
" give me the slightest explanation., This state of excitement kept on for\n",
" some little time; and at last we saw before us the Pass opening out on\n",
" the eastern side., There were dark, rolling clouds overhead, and in the\n",
" air the heavy, oppressive sense of thunder., It seemed as though the\n",
" mountain range had separated two atmospheres, and that now we had got\n",
" into the thunderous one., I was now myself looking out for the conveyance\n",
" which was to take me to the Count., Each moment I expected to see the\n",
" glare of lamps through the blackness; but all was dark., The only light\n",
" was the flickering rays of our own lamps, in which the steam from our\n",
" hard-driven horses rose in a white cloud., We could see now the sandy\n",
" road lying white before us, but there was on it no sign of a vehicle., The passengers drew back with a sigh of gladness, which seemed to mock\n",
" my own disappointment., I was already thinking what I had best do, when\n",
" the driver, looking at his watch, said to the others something which I\n",
" could hardly hear, it was spoken so quietly and in so low a tone; I\n",
" thought it was \"An hour less than the time.\", Then turning to me, he said\n",
" in German worse than my own:--\n",
" \n",
" \"There is no carriage here., The Herr is not expected after all., He will\n",
" now come on to Bukovina, and return to-morrow or the next day; better\n",
" the next day., \" Whilst he was speaking the horses began to neigh and\n",
" snort and plunge wildly, so that the driver had to hold them up., Then,\n",
" amongst a chorus of screams from the peasants and a universal crossing\n",
" of themselves, a calèche, with four horses, drove up behind us, overtook\n",
" us, and drew up beside the coach., I could see from the flash of our\n",
" lamps, as the rays fell on them, that the horses were coal-black and\n",
" splendid animals., They were driven by a tall man, with a long brown\n",
" beard and a great black hat, which seemed to hide his face from us., I\n",
" could only see the gleam of a pair of very bright eyes, which seemed red\n",
" in the lamplight, as he turned to us., He said to the driver:--\n",
" \n",
" \"You are early to-night, my friend.\", The man stammered in reply:--\n",
" \n",
" \"The English Herr was in a hurry,\" to which the stranger replied:--\n",
" \n",
" \"That is why, I suppose, you wished him to go on to Bukovina., You cannot\n",
" deceive me, my friend; I know too much, and my horses are swift., \" As he\n",
" spoke he smiled, and the lamplight fell on a hard-looking mouth, with\n",
" very red lips and sharp-looking teeth, as white as ivory., One of my\n",
" companions whispered to another the line from Burger's \"Lenore\":--\n",
" \n",
" \", Denn die Todten, reiten schnell\"--\n",
" (\"For the dead travel fast.\")\n",
" , The strange driver evidently heard the words, for he looked up with a\n",
" gleaming smile., The passenger turned his face away, at the same time\n",
" putting out his two fingers and crossing himself., \"Give me the Herr's\n",
" luggage,\" said the driver; and with exceeding alacrity my bags were\n",
" handed out and put in the calèche., Then I descended from the side of the\n",
" coach, as the calèche was close alongside, the driver helping me with a\n",
" hand which caught my arm in a grip of steel; his strength must have been\n",
" prodigious., Without a word he shook his reins, the horses turned, and we\n",
" swept into the darkness of the Pass., As I looked back I saw the steam\n",
" from the horses of the coach by the light of the lamps, and projected\n",
" against it the figures of my late companions crossing themselves., Then\n",
" the driver cracked his whip and called to his horses, and off they swept\n",
" on their way to Bukovina., As they sank into the darkness I felt a\n",
" strange chill, and a lonely feeling came over me; but a cloak was thrown\n",
" over my shoulders, and a rug across my knees, and the driver said in\n",
" excellent German:--\n",
" , \"The night is chill, mein Herr, and my master the Count bade me take all\n",
" care of you., There is a flask of slivovitz (the plum brandy of the\n",
" country) underneath the seat, if you should require it., \" I did not take\n",
" any, but it was a comfort to know it was there all the same., I felt a\n",
" little strangely, and not a little frightened., I think had there been\n",
" any alternative I should have taken it, instead of prosecuting that\n",
" unknown night journey., The carriage went at a hard pace straight along,\n",
" then we made a complete turn and went along another straight road., It\n",
" seemed to me that we were simply going over and over the same ground\n",
" again; and so I took note of some salient point, and found that this was\n",
" so., I would have liked to have asked the driver what this all meant, but\n",
" I really feared to do so, for I thought that, placed as I was, any\n",
" protest would have had no effect in case there had been an intention to\n",
" delay., By-and-by, however, as I was curious to know how time was\n",
" passing, I struck a match, and by its flame looked at my watch; it was\n",
" within a few minutes of midnight., This gave me a sort of shock, for I\n",
" suppose the general superstition about midnight was increased by my\n",
" recent experiences., I waited with a sick feeling of suspense.\n",
" , Then a dog began to howl somewhere in a farmhouse far down the road--a\n",
" long, agonised wailing, as if from fear., The sound was taken up by\n",
" another dog, and then another and another, till, borne on the wind which\n",
" now sighed softly through the Pass, a wild howling began, which seemed\n",
" to come from all over the country, as far as the imagination could grasp\n",
" it through the gloom of the night., At the first howl the horses began to\n",
" strain and rear, but the driver spoke to them soothingly, and they\n",
" quieted down, but shivered and sweated as though after a runaway from\n",
" sudden fright., Then, far off in the distance, from the mountains on each\n",
" side of us began a louder and a sharper howling--that of wolves--which\n",
" affected both the horses and myself in the same way--for I was minded to\n",
" jump from the calèche and run, whilst they reared again and plunged\n",
" madly, so that the driver had to use all his great strength to keep them\n",
" from bolting., In a few minutes, however, my own ears got accustomed to\n",
" the sound, and the horses so far became quiet that the driver was able\n",
" to descend and to stand before them., He petted and soothed them, and\n",
" whispered something in their ears, as I have heard of horse-tamers\n",
" doing, and with extraordinary effect, for under his caresses they became\n",
" quite manageable again, though they still trembled., The driver again\n",
" took his seat, and shaking his reins, started off at a great pace., This\n",
" time, after going to the far side of the Pass, he suddenly turned down a\n",
" narrow roadway which ran sharply to the right.\n",
" , Soon we were hemmed in with trees, which in places arched right over the\n",
" roadway till we passed as through a tunnel; and again great frowning\n",
" rocks guarded us boldly on either side., Though we were in shelter, we\n",
" could hear the rising wind, for it moaned and whistled through the\n",
" rocks, and the branches of the trees crashed together as we swept along., It grew colder and colder still, and fine, powdery snow began to fall,\n",
" so that soon we and all around us were covered with a white blanket., The\n",
" keen wind still carried the howling of the dogs, though this grew\n",
" fainter as we went on our way., The baying of the wolves sounded nearer\n",
" and nearer, as though they were closing round on us from every side., I\n",
" grew dreadfully afraid, and the horses shared my fear., The driver,\n",
" however, was not in the least disturbed; he kept turning his head to\n",
" left and right, but I could not see anything through the darkness.\n",
" , Suddenly, away on our left, I saw a faint flickering blue flame., The\n",
" driver saw it at the same moment; he at once checked the horses, and,\n",
" jumping to the ground, disappeared into the darkness., I did not know\n",
" what to do, the less as the howling of the wolves grew closer; but while\n",
" I wondered the driver suddenly appeared again, and without a word took\n",
" his seat, and we resumed our journey., I think I must have fallen asleep\n",
" and kept dreaming of the incident, for it seemed to be repeated\n",
" endlessly, and now looking back, it is like a sort of awful nightmare., Once the flame appeared so near the road, that even in the darkness\n",
" around us, I could watch the driver's motions., He went rapidly to where\n",
" the blue flame arose--it must have been very faint, for it did not seem\n",
" to illumine the place around it at all--and gathering a few stones,\n",
" formed them into some device., Once there appeared a strange optical\n",
" effect: when he stood between me and the flame he did not obstruct it,\n",
" for I could see its ghostly flicker all the same., This startled me, but\n",
" as the effect was only momentary, I took it that my eyes deceived me\n",
" straining through the darkness., Then for a time there were no blue\n",
" flames, and we sped onwards through the gloom, with the howling of the\n",
" wolves around us, as though they were following in a moving circle.\n",
" , At last there came a time when the driver went further afield than he\n",
" had yet gone, and during his absence, the horses began to tremble worse\n",
" than ever and to snort and scream with fright., I could not see any cause\n",
" for it, for the howling of the wolves had ceased altogether; but just\n",
" then the moon, sailing through the black clouds, appeared behind the\n",
" jagged crest of a beetling, pine-clad rock, and by its light I saw\n",
" around us a ring of wolves, with white teeth and lolling red tongues,\n",
" with long, sinewy limbs and shaggy hair., They were a hundred times more\n",
" terrible in the grim silence which held them than even when they howled., For myself, I felt a sort of paralysis of fear., It is only when a man\n",
" feels himself face to face with such horrors that he can understand\n",
" their true import.\n",
" , All at once the wolves began to howl as though the moonlight had had\n",
" some peculiar effect on them., The horses jumped about and reared, and\n",
" looked helplessly round with eyes that rolled in a way painful to see;\n",
" but the living ring of terror encompassed them on every side; and they\n",
" had perforce to remain within it., I called to the coachman to come, for, it seemed to me that our only chance was to try to break out through the\n",
" ring and to aid his approach., I shouted and beat the side of the\n",
" calèche, hoping by the noise to scare the wolves from that side, so as\n",
" to give him a chance of reaching the trap., How he came there, I know\n",
" not, but I heard his voice raised in a tone of imperious command, and\n",
" looking towards the sound, saw him stand in the roadway., As he swept his\n",
" long arms, as though brushing aside some impalpable obstacle, the wolves\n",
" fell back and back further still., Just then a heavy cloud passed across\n",
" the face of the moon, so that we were again in darkness.\n",
" , When I could see again the driver was climbing into the calèche, and the\n",
" wolves had disappeared., This was all so strange and uncanny that a\n",
" dreadful fear came upon me, and I was afraid to speak or move., The time\n",
" seemed interminable as we swept on our way, now in almost complete\n",
" darkness, for the rolling clouds obscured the moon., We kept on\n",
" ascending, with occasional periods of quick descent, but in the main\n",
" always ascending., Suddenly, I became conscious of the fact that the\n",
" driver was in the act of pulling up the horses in the courtyard of a\n",
" vast ruined castle, from whose tall black windows came no ray of light,\n",
" and whose broken battlements showed a jagged line against the moonlit\n",
" sky.\n",
" \n",
" \n",
" \n",
" , CHAPTER II\n",
" , JONATHAN HARKER'S JOURNAL--_continued_\n",
" \n",
" \n",
" _5, May._--I must have been asleep, for certainly if I had been fully\n",
" awake I must have noticed the approach of such a remarkable place., In\n",
" the gloom the courtyard looked of considerable size, and as several dark\n",
" ways led from it under great round arches, it perhaps seemed bigger than\n",
" it really is., I have not yet been able to see it by daylight.\n",
" , When the calèche stopped, the driver jumped down and held out his hand\n",
" to assist me to alight., Again I could not but notice his prodigious\n",
" strength., His hand actually seemed like a steel vice that could have\n",
" crushed mine if he had chosen., Then he took out my traps, and placed\n",
" them on the ground beside me as I stood close to a great door, old and\n",
" studded with large iron nails, and set in a projecting doorway of\n",
" massive stone., I could see even in the dim light that the stone was\n",
" massively carved, but that the carving had been much worn by time and\n",
" weather., As I stood, the driver jumped again into his seat and shook the\n",
" reins; the horses started forward, and trap and all disappeared down one\n",
" of the dark openings.\n",
" , I stood in silence where I was, for I did not know what to do., Of bell\n",
" or knocker there was no sign; through these frowning walls and dark\n",
" window openings it was not likely that my voice could penetrate., The\n",
" time I waited seemed endless, and I felt doubts and fears crowding upon\n",
" me., What sort of place had I come to, and among what kind of people?, What sort of grim adventure was it on which I had embarked?, Was this a\n",
" customary incident in the life of a solicitor's clerk sent out to\n",
" explain the purchase of a London estate to a foreigner?, Solicitor's\n",
" clerk!, Mina would not like that., Solicitor--for just before leaving\n",
" London, I got word that my examination was successful; and I am now a\n",
" full-blown solicitor!, I began to rub my eyes and pinch myself to see if\n",
" I were awake., It all seemed like a horrible nightmare to me, and I\n",
" expected that I should suddenly awake, and find myself at home, with\n",
" the dawn struggling in through the windows, as I had now and again felt\n",
" in the morning after a day of overwork., But my flesh answered the\n",
" pinching test, and my eyes were not to be deceived., I was indeed awake\n",
" and among the Carpathians., All I could do now was to be patient, and to\n",
" wait the coming of the morning.\n",
" , Just as I had come to this conclusion I heard a heavy step approaching\n",
" behind the great door, and saw through the chinks the gleam of a coming\n",
" light., Then there was the sound of rattling chains and the clanking of\n",
" massive bolts drawn back., A key was turned with the loud grating noise\n",
" of long disuse, and the great door swung back.\n",
" , Within, stood a tall old man, clean shaven save for a long white\n",
" moustache, and clad in black from head to foot, without a single speck\n",
" of colour about him anywhere., He held in his hand an antique silver\n",
" lamp, in which the flame burned without chimney or globe of any kind,\n",
" throwing long quivering shadows as it flickered in the draught of the\n",
" open door., The old man motioned me in with his right hand with a courtly\n",
" gesture, saying in excellent English, but with a strange intonation:--\n",
" \n",
" \"Welcome to my house!, Enter freely and of your own will!\", He made no\n",
" motion of stepping to meet me, but stood like a statue, as though his\n",
" gesture of welcome had fixed him into stone., The instant, however, that\n",
" I had stepped over the threshold, he moved impulsively forward, and\n",
" holding out his hand grasped mine with a strength which made me wince,\n",
" an effect which was not lessened by the fact that it seemed as cold as\n",
" ice--more like the hand of a dead than a living man., Again he said:--\n",
" \n",
" \"Welcome to my house., Come freely., Go safely; and leave something of the\n",
" happiness you bring!\", The strength of the handshake was so much akin to\n",
" that which I had noticed in the driver, whose face I had not seen, that\n",
" for a moment I doubted if it were not the same person to whom I was\n",
" speaking; so to make sure, I said interrogatively:--\n",
" \n",
" \"Count Dracula?\", He bowed in a courtly way as he replied:--\n",
" , \"I am Dracula; and I bid you welcome, Mr. Harker, to my house., Come in;\n",
" the night air is chill, and you must need to eat and rest.\", As he was\n",
" speaking, he put the lamp on a bracket on the wall, and stepping out,\n",
" took my luggage; he had carried it in before I could forestall him., I\n",
" protested but he insisted:--\n",
" \n",
" \"Nay, sir, you are my guest., It is late, and my people are not\n",
" available., Let me see to your comfort myself.\", He insisted on carrying\n",
" my traps along the passage, and then up a great winding stair, and\n",
" along another great passage, on whose stone floor our steps rang\n",
" heavily., At the end of this he threw open a heavy door, and I rejoiced\n",
" to see within a well-lit room in which a table was spread for supper,\n",
" and on whose mighty hearth a great fire of logs, freshly replenished,\n",
" flamed and flared.\n",
" , The Count halted, putting down my bags, closed the door, and crossing\n",
" the room, opened another door, which led into a small octagonal room lit\n",
" by a single lamp, and seemingly without a window of any sort., Passing\n",
" through this, he opened another door, and motioned me to enter., It was a\n",
" welcome sight; for here was a great bedroom well lighted and warmed with\n",
" another log fire,--also added to but lately, for the top logs were\n",
" fresh--which sent a hollow roar up the wide chimney., The Count himself\n",
" left my luggage inside and withdrew, saying, before he closed the\n",
" door:--\n",
" \n",
" \"You will need, after your journey, to refresh yourself by making your\n",
" toilet., I trust you will find all you wish., When you are ready, come\n",
" into the other room, where you will find your supper prepared., \"\n",
" , The light and warmth and the Count's courteous welcome seemed to have\n",
" dissipated all my doubts and fears., Having then reached my normal state,\n",
" I discovered that I was half famished with hunger; so making a hasty\n",
" toilet, I went into the other room.\n",
" , I found supper already laid out., My host, who stood on one side of the\n",
" great fireplace, leaning against the stonework, made a graceful wave of\n",
" his hand to the table, and said:--\n",
" \n",
" \"I pray you, be seated and sup how you please., You will, I trust, excuse\n",
" me that I do not join you; but I have dined already, and I do not sup.\"\n",
" , I handed to him the sealed letter which Mr. Hawkins had entrusted to me., He opened it and read it gravely; then, with a charming smile, he handed\n",
" it to me to read., One passage of it, at least, gave me a thrill of\n",
" pleasure.\n",
" , \"I must regret that an attack of gout, from which malady I am a constant\n",
" sufferer, forbids absolutely any travelling on my part for some time to\n",
" come; but I am happy to say I can send a sufficient substitute, one in\n",
" whom I have every possible confidence., He is a young man, full of energy\n",
" and talent in his own way, and of a very faithful disposition., He is\n",
" discreet and silent, and has grown into manhood in my service., He shall\n",
" be ready to attend on you when you will during his stay, and shall take\n",
" your instructions in all matters., \"\n",
" , The Count himself came forward and took off the cover of a dish, and I\n",
" fell to at once on an excellent roast chicken., This, with some cheese\n",
" and a salad and a bottle of old Tokay, of which I had two glasses, was\n",
" my supper., During the time I was eating it, the Count asked me many\n",
" questions as to my journey, and I told him by degrees, all I had\n",
" experienced.\n",
" , By this time I had finished my supper, and by my host's desire had drawn\n",
" up a chair by the fire and begun to smoke a cigar which he offered me,\n",
" at the same time excusing himself that he did not smoke., I had now an\n",
" opportunity of observing him, and found him of a very marked\n",
" physiognomy.\n",
" , His face was a strong--a very strong--aquiline, with high bridge of the\n",
" thin nose and peculiarly arched nostrils; with lofty domed forehead, and\n",
" hair growing scantily round the temples but profusely elsewhere., His\n",
" eyebrows were very massive, almost meeting over the nose, and with bushy\n",
" hair that seemed to curl in its own profusion., The mouth, so far as I\n",
" could see it under the heavy moustache, was fixed and rather\n",
" cruel-looking, with peculiarly sharp white teeth; these protruded over\n",
" the lips, whose remarkable ruddiness showed astonishing vitality in a\n",
" man of his years., For the rest, his ears were pale, and at the tops\n",
" extremely pointed; the chin was broad and strong, and the cheeks firm\n",
" though thin., The general effect was one of extraordinary pallor.\n",
" , Hitherto I had noticed the backs of his hands as they lay on his knees\n",
" in the firelight, and they had seemed rather white and fine; but seeing\n",
" them now close to me, I could not but notice that they were rather\n",
" coarse--broad, with squat fingers., Strange to say, there were hairs in\n",
" the centre of the palm., The nails were long and fine, and cut to a sharp\n",
" point., As the Count leaned over me and his hands touched me, I could not\n",
" repress a shudder., It may have been that his breath was rank, but a\n",
" horrible feeling of nausea came over me, which, do what I would, I could\n",
" not conceal., The Count, evidently noticing it, drew back; and with a\n",
" grim sort of smile, which showed more than he had yet done his\n",
" protuberant teeth, sat himself down again on his own side of the\n",
" fireplace., We were both silent for a while; and as I looked towards the\n",
" window I saw the first dim streak of the coming dawn., There seemed a\n",
" strange stillness over everything; but as I listened I heard as if from\n",
" down below in the valley the howling of many wolves., The Count's eyes\n",
" gleamed, and he said:--\n",
" \n",
" \"Listen to them--the children of the night., What music they make!\", Seeing, I suppose, some expression in my face strange to him, he\n",
" added:--\n",
" , \"Ah, sir, you dwellers in the city cannot enter into the feelings of the\n",
" hunter.\", Then he rose and said:--\n",
" \n",
" \", But you must be tired., Your bedroom is all ready, and to-morrow you\n",
" shall sleep as late as you will., I have to be away till the afternoon;\n",
" so sleep well and dream well!\", With a courteous bow, he opened for me\n",
" himself the door to the octagonal room, and I entered my bedroom....\n",
" , I am all in a sea of wonders., I doubt; I fear; I think strange things,\n",
" which I dare not confess to my own soul., God keep me, if only for the\n",
" sake of those dear to me!\n",
" ]"
]
},
"execution_count": 47,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"sents"
]
},
{
"cell_type": "code",
"execution_count": 36,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"'a'"
]
},
"execution_count": 36,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"l[3]"
]
},
{
"cell_type": "code",
"execution_count": 50,
"metadata": {},
"outputs": [],
"source": [
"sents = list(draculaDoc.sents)"
]
},
{
"cell_type": "code",
"execution_count": 51,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"351"
]
},
"execution_count": 51,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"len(sents)"
]
},
{
"cell_type": "code",
"execution_count": 56,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"'May, arriving at Vienna early next morning; should have arrived at 6:46, but train was an hour late.'"
]
},
"execution_count": 56,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"sents[3].text.replace('\\n', ' ')"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"open('newsents.txt').write(newSents)"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.4"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment