Sunday, May 03, 2020

BERT for Poetry

After the fun I had with the BERT Summariser and short stories, I decided to turn the trick to poetry. If anything the results are even better.

Here are five examples, starting with The Wasteland, which perfectly illustrates BERT's ability to find continuity.

The Wasteland, by T.S. Eliot


I. The Burial of the Dead

April is the cruellest month, breeding
Lilacs out of the dead land, mixing
Memory and desire, stirring
Dull roots with spring rain.
If you see dear Mrs. Equitone,
Tell her I bring the horoscope myself:
One must be so careful these days.
When Lil’s husband got demobbed, I said—
I didn’t mince my words, I said to her myself,
HURRY UP PLEASE ITS TIME
Now Albert’s coming back, make yourself a bit smart.
But at my back from time to time I hear
The sound of horns and motors, which shall bring
Sweeney to Mrs. Porter in the spring.
In this decayed hole among the mountains
In the faint moonlight, the grass is singing
Over the tumbled graves, about the chapel
There is the empty chapel, only the wind’s home.


The Sonnets, by William Shakespeare


When forty winters shall besiege thy brow,
And dig deep trenches in thy beauty's field,
Thy youth's proud livery so gazed on now,
Will be a tatter'd weed of small worth held:
Then being asked, where all thy beauty lies,
Where all the treasure of thy lusty days;
To say, within thine own deep sunken eyes,
Were an all-eating shame, and thriftless praise.
Thy outward thus with outward praise is crown'd;
But those same tongues, that give thee so thine own,
In other accents do this praise confound
By seeing farther than the eye hath shown.
For I am shamed by that which I bring forth,
And so should you, to love things nothing worth.
So that eternal love in love's fresh case,
Weighs not the dust and injury of age,
Nor gives to necessary wrinkles place,
But makes antiquity for aye his page;
Finding the first conceit of love there bred,
Where time and outward form would show it dead.
Never believe though in my nature reign'd,
All frailties that besiege all kinds of blood,
That it could so preposterously be stain'd,
To leave for nothing all thy sum of good;
For nothing this wide universe I call,
Save thou, my rose, in it thou art my all.
Thence comes it that my name receives a brand,
And almost thence my nature is subdu'd
To what it works in, like the dyer's hand:
Pity me, then, and wish I were renew'd;
Whilst, like a willing patient, I will drink,
Potions of eisel 'gainst my strong infection;
No bitterness that I will bitter think,
Nor double penance, to correct correction.
Poor soul, the centre of my sinful earth,
My sinful earth these rebel powers array,
Why dost thou pine within and suffer dearth,
Painting thy outward walls so costly gay?
Then soul, live thou upon thy servant's loss,
And let that pine to aggravate thy store;
Buy terms divine in selling hours of dross;
Within be fed, without be rich no more:
So shall thou feed on Death, that feeds on men,
And Death once dead, there's no more dying then.


Poems by Elizabeth Barrett Browning


We sow the glebe, we reap the corn,
We build the house where we may rest,
And then, at moments, suddenly,
We look up to the great wide sky,
Inquiring wherefore we were born…
For earnest or for jest? Ere I answered he was gone,
And none was left to love in all the world.
A THOUGHT ay like a flower upon mine heart,
And drew around it other thoughts like bees
For multitude and thirst of sweetnesses;
Whereat rejoicing, I desired the art
Of the Greek whistler, who to wharf and mart
Could lure those insect swarms from orange-trees
That I might hive with me such thoughts and please
My soul so, always.
Let them feel that this cold metallic motion
Is not all the life God fashions or reveals:
Let them prove their living souls against the notion
That they live in you, or under you, O wheels!
If He heard us, He would surely
(For they call Him good and mild)
Answer, smiling down the steep world very purely,
'Come and rest with me, my child.'
They look up with their pale and sunken faces,
And their look is dread to see,
For they mind you of their angels in high places,
With eyes turned on Deity;—
"How long," they say, "how long, O cruel nation,
Will you stand, to move the world, on a child's heart,—
Stifle down with a mailed heel its palpitation,
And tread onward to your throne amid the mart?
How there you sat in summer-time,
May yet be in your mind;
And how you heard the green woods sing
Beneath the freshening wind. Not as the conqueror comes,
They, the true-hearted, came;
Not with the roll of the stirring drums,
And the trumpet that sings of fame;
Not as the flying come,
In silence and in fear, -
They shook the depths of the desert's gloom
With their hymns of lofty cheer.
EXPERIENCE, like a pale musician, holds
A dulcimer of patience in his hand,
Whence harmonies, we cannot understand,
Of God; will in his worlds, the strain unfolds
In sad-perplexed minors: deathly colds
Fall on us while we hear, and countermand
Our sanguine heart back from the fancyland
With nightingales in visionary wolds.


The Rape of the Lock, by Alexander Pope


'Nolueram, Belinda, tuos violare capillos;
 Sed juvat, hoc precibus me tribuisse tuis.'
If e'er one vision touch thy infant thought,
Of all the nurse and all the priest have taught;
Of airy elves by moonlight shadows seen,
The silver token, and the circled green,
Or virgins visited by angel-powers,
With golden crowns and wreaths of heavenly flowers;
Hear and believe! Unnumber'd treasures ope at once, and here
The various offerings of the world appear;
From each she nicely culls with curious toil,
And decks the goddess with the glittering spoil.
Then prostrate falls, and begs with ardent eyes
Soon to obtain, and long possess the prize:
The powers gave ear, and granted half his prayer,
The rest, the winds dispersed in empty air.
to your charge repair:
The fluttering fan be Zephyretta's care;
The drops to thee, Brillante, we consign;
And, Momentilla, let the watch be thine;
Do thou, Crispissa, tend her favourite lock;
Ariel himself shall be the guard of Shock.
Hither the heroes and the nymphs resort,
To taste awhile the pleasures of a court;
In various talk the instructive hours they pass'd,
Who gave the ball, or paid the visit last;
One speaks the glory of the British Queen,
And one describes a charming Indian screen;
A third interprets motions, looks, and eyes;
At every word a reputation dies.
At this, the blood the virgin's cheek forsook,
A livid paleness spreads o'er all her look;
She sees, and trembles at the approaching ill,
Just in the jaws of ruin, and Codille.
The Gnome rejoicing bears her gifts away,
Spreads his black wings, and slowly mounts to day.
No common weapons in their hands are found,
Like gods they fight, nor dread a mortal wound.


Poems by Henry Wadsworth Longfellow


Filled is Life's goblet to the brim;
And though my eyes with tears are dim,
I see its sparkling bubbles swim,
And chant a melancholy hymn
With solemn voice and slow lines
Listen my children and you shall hear
Of the midnight ride of Paul Revere,
On the eighteenth of April, in Seventy-five;
Hardly a man is now alive
Who remembers that famous day and year.
Birds of passage sailed through the leaden air, from the ice-bound,
Desolate northern bays to the shores of tropical islands,
Harvests were gathered in; and wild with the winds of September
Wrestled the trees of the forest, as Jacob of old with the angel.
Then, as the night descended, the herds returned from their pastures;
Sweet was the moist still air with the odor of milk from their udders;
Lowing they waited, and long, at the well-known bars of the farm-yard,--
Waited and looked in vain for the voice and the hand of the milkmaid.
From the red stone of the quarry
With his hand he broke a fragment,
Moulded it into a pipe-head,
Shaped and fashioned it with figures;
From the margin of the river
Took a long reed for a pipe-stem,
With its dark green leaves upon it;
Filled the pipe with bark of willow,
With the bark of the red willow;
Breathed upon the neighboring forest,
Made its great boughs chafe together,
Till in flame they burst and kindled;
And erect upon the mountains,
Gitche Manito, the mighty,
Smoked the calumet, the Peace-Pipe,
As a signal to the nations. The worthy pastor --
The shepherd of that wandering flock,
That has the ocean for its wold,
That has the vessel for its fold,
Leaping ever from rock to rock --
Spake, with accents mild and clear,
Words of warning, words of cheer,
But tedious to the bridegroom's ear.
I tell the mariner when to sail the seas;
I waft o'er all the land from far away
The breath and bloom of the Hesperides,
My birthplace. One mass of shade,
The elm-trees drop their curtains down;
By palace, park, and colonnade
I walk as in a foreign town.

No comments: