Group Abstract Group Abstract

Message Boards Message Boards

Computer Analysis of Poetry — Part 1: Metrical Pattern

Posted 7 years ago
POSTED BY: Mark Greenberg
25 Replies
Posted 5 years ago
POSTED BY: Mark Greenberg

The way you plotted is what I call the traditional way. As in A in the attached shape. If this is the case, what is the need for the Wolfram language or where does it fit as far as the graph is concerned?
enter image description here

I am just trying to understand, because I expect this language will be of great use in discovering analogy or relation in many fields like comparative prosody and Architecture, poetry and music. So far I have been doing that by traditional plotting. I will notify you once I publish a new subject about this. B is an introduction to verse and architecture.

POSTED BY: Khashan Khashan

@Khashan Khashan your images and ideas are interesting. It would be great if you could post you Wolfram Language code in these posts here, like Mark did and everyone else does on this form, without referencing to external documents. Then it would be very fun to reproduce and explore your results. I would love to see your code. You can also embed your notebook into the post or attach it to the post. Thank you for sharing ideas.

POSTED BY: Kapio Letto

@Kapio Letto, Freelancer Thank you OK. I will start under the the title : ( Is there poetry in architecture ? ).. It will be in many posts. Most of the posts were published here and there. I wll post some of the comments on that. I donot understand WL but I feel it can enrich and explore many subjects that I used to tackle in a direct simple way..

POSTED BY: Khashan Khashan
Posted 5 years ago

The graph plotting was done in this manner:

  • create a grid on the coordinate plane {{{1,1}, {1,2}, {1,3}...}, {{2,1}, {2,2}, {2,3}}...}
  • draw a line to the coordinate + {0, .5} for stressed syllables and + {0, -.5} for unstressed

This is a very simple thing to do in the Wolfram Language.

It is traditional in the sense that meter is traditionally thought of as a series of stressed and unstressed syllables, forming so many feet, in a predictable pattern. I don't recognize the foot as a unit though.

POSTED BY: Mark Greenberg

Was the graph plotting achieved by two methods: traditional and Wolfram computational language?

POSTED BY: Khashan Khashan
Posted 5 years ago

English syllables are stressed over a continuum from totally unstressed to undeniably stressed. In speech, the continuum of stresses become a nuance of pronunciation and musical intonation patterns. Our sense of rhythm in poetry though seems to rely on just two kinds of syllables: stressed and unstressed. Therefore, I try to boil every syllable down to either stressed (1) or unstressed (0). I use many factors to determine this, including the phonetic representation provided by WordData, whether there is a stop punctuation or end of line after the syllable, the consonant and vowel patterns, and some replacement rules that avoid too many consecutive stressed or unstressed syllables. I have also tried predicting what kind of rhythm it is, duple-meter or triple-meter, to resolve the remaining stresses, though my most recent version doesn't do this.

After that, I simply graph the 1's and 0's. In some ways what I'm doing is very traditional; in some ways not. I use Graphics[] to draw the output on a grid, but the lines are very much like an x-y plot of the stress values over time.

POSTED BY: Mark Greenberg

Please follow and correct me. I started with the impression that you reached the graph by a program based on the binary numbers 1 and 0 then that program produced the graph. I understand now that you used wolfram language to produce an already traditionally plotted graph using 1 and 0 for the y-axis to prove the efficiency of Wolfram Language. Am I correct?

POSTED BY: Khashan Khashan
Posted 5 years ago

Khashan, the graphic produced by my code is a direct plot of the 1 and 0 values over time, wrapping at the end of each poetic line and aligned on the line's last stressed syllable. Then I put the orthographic representation of each syllable in the graphic so we humans can follow along. (In the new version I'm working on, I also put a tooltip of the IPA representation of each syllable.)

The Wolfram Language gives phonetic information on many English words with WordData[word, "PhoneticForm"]. This includes primary and secondary stress markers. Typical output of such an expressions is fənˈɛtɪks. This is a starting point for what I'm doing, but for many reasons it isn't enough to figure out the stress patterns in poetry. As you mentioned, word boundaries are not a consideration in determining metrical patterns. I would argue that the Greek feet should also not be considered. A major obstacle for me has been how to consistently divide up the syllables. Another has been what to do with undetermined syllables that can be either stressed or unstressed, depending on context (or sometimes depending on how the reader chooses to read the passage).

From what I can tell, there are many similarities from your approach in Arabic and mine in English. I have even used some of the same notation CVC, etc. As long as we keep the discussion relevant to programming in the Wolfram Language, I imagine that a rich conversation can be sustained on this topic.

I don't think that you have to worry about being kicked off this forum for giving Arabic examples. This is a very diverse community. And last time I checked, my friend Ahmed was the moderator. : )

POSTED BY: Mark Greenberg
Posted 5 years ago
POSTED BY: Mark Greenberg

Thanks for your quick response I feel that we are on the verge of an interesting dialogue Yes, programming is based on 1 and 0.T he question remains: why don't you plot the graph directly using these 1 and o?

Thank you for your tolerance. I was banned 0n/from an English forum for presenting the idea and comparison with Arabic. http://www.everypoet.org/pffa/showthread.php?16003-Does-it-work-in-English&s

POSTED BY: Khashan Khashan
POSTED BY: Khashan Khashan
Posted 7 years ago
POSTED BY: Mark Greenberg

Mark,

You should have received an email notification, It was by no means rejected. But there was a serious problem: we were unable to get anything like the results you showed in the examples. Our request was that you try to figure out what was the problem, and we included the result we were obtaining.

I apologize for this not reaching you. We need to look into our email notification setup to try to diagnose the issue there.

POSTED BY: Daniel Lichtblau
Posted 6 years ago

Thanks, Daniel, for your response. I looked through my email and did not find one from Wolfram Research about the function. Perhaps it was sent to the wrong address. Mine is mgreenberg1520@gmail.com. I would like to see the results you were getting so I can diagnose the problem.

POSTED BY: Mark Greenberg

This is really nice. Would it be possible to do this with classical Hebrew poetry as well? And should it be transliterated?

Mark, Please consider submitting this to the Wolfram Function Repository (at least a couple of us on the review team would like to see it there). PoeticMeterDiagram was one name that was suggested in some discussion.

POSTED BY: Daniel Lichtblau
Posted 7 years ago

Hi, Daniel. Yes, now that the Wolfram Summer School is over, I'll turn my energies to writing such a function. My project at Summer School was to improve the code outlined here with machine learning and extend the analysis of poetry to include rhyme. The post is here. The meter function should be ready in a month or so. : )

POSTED BY: Mark Greenberg

I look forward to receiving it. Thanks.

POSTED BY: Daniel Lichtblau
Posted 6 years ago

I did submit the function, called ScansionDiagram, about two weeks ago to the Function Repository. It was more robust than what I posted here — more accurate, better graphics, more options. I'm assuming that it was rejected, because I have not seen it appear in the repository. Is there a way I can track the status of a submission and perhaps find out why it was rejected?

POSTED BY: Mark Greenberg
POSTED BY: Szabolcs Horvát
Posted 7 years ago

It might be called ScansionDiagram, TextMeter, or something else. I think that the words poetry, poem, and verse should not be in the name because it could be used for prose too.

POSTED BY: Mark Greenberg
POSTED BY: Szabolcs Horvát
Posted 7 years ago

Thanks, Szabolcs. The code is specific to English in two ways. First, it relies on WordData, which is an English language database. Second, the replacement rules are based on English language features like the preference to avoid three stressed syllables in a row. I don't know anything about Hungarian, but maybe it is possible to rework this code to draw on a database of Hungarian words for the syllable and phonetic information and resolve ambiguous syllables through different replacement rules.

POSTED BY: Mark Greenberg

enter image description here - Congratulations! This post is now featured in our Staff Pick column as distinguished by a badge on your profile of a Featured Contributor! Thank you, keep it coming, and consider contributing your work to the The Notebook Archive!

POSTED BY: EDITORIAL BOARD
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard