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. : )