Tuesday 28 September 2021

A Rosetta Stone

While on holiday, in the early hours of the morning, I heard it said to me, Do a Rosetta Stone. 

Show the future and the past a new way of learning that is 1 to 1 (isomorphic) with the modern texts. No vowels, no music, just a full spelling.

viamr alohim nywh adm bxlmnu cdmutnu,

 ויאמר אלוֹהים נעשה אדם בצלמנוּ כדמוּתנוּ,

virdu bdgt him ubyof hwmiim ubbhmh ubcl-harx ubcl-hrmw hromw yl-harx.

וירדוּ בדגת הים וּבעוֹף השמיים וּבבהמה וּבכל-הארץ וּבכל-הרמש הרוֹמש על-הארץו.

That is somewhere in Genesis. I'm sure you can find it. 

But this seemed too little - so I asked - How will I include the pointed as well as the full text - and the music?

Start with the music and show its relationship to the text and its pronunciation. Then move to the 'full spelling' and SimHebrew - somehow get the four ways in which real people deal with language and beauty onto a single decodable image.

Here is Psalms 117 as the study object.

Psalms 117 - Top line: Original Hebrew with vowels and cantillation signs.
Musical score is completely derivable from the cantillation signs.
Lyrics below the music are a rough guide to pronunciation.
The third line of text is the SimHebrew.

The above image has all you need to begin to learn what is in the Leningrad codex. The top words are left to right but each word is right to left. I have only once read a right to left hymn book (At St George's in Jerusalem at the Arabic service.) and I couldn't go there with the English based software that I have available. Here are the words in their traditional form:

הַֽלְל֣וּ אֶת־יְ֭הוָה כָּל־גּוֹיִ֑ם (1)

שַׁ֝בְּח֗וּהוּ כָּל־הָאֻמִּֽים

כִּ֥י גָ֘בַ֤ר עָלֵ֨ינוּ ׀ חַסְדּ֗וֹ וֶֽאֱמֶת־יְהוָ֥ה לְעוֹלָ֗ם הַֽלְלוּ־יָֽהּ (2)

These signs and symbols completely determine the content of the music and the syllable by syllable transcription into rough pronunciation. The music is generated by a computer program  and expressed in Music XML (according to the musical transformation inferred by Suzanne Haïk-Vantoura). The rough pronunciation is from a transcription algorithm made up by me (also in Music XML). The whole is then rendered by Musescore. There is no information lost in the transformations. (There is the odd bug in my syllabic transcription.) 

The SimHebrew is the identical Hebrew text transformed by an algorithm into consonants only (and a dot or two to allow the variation on vav that is o and u). It is possible to learn how to pronounce this transformation the same way that a modern Hebrew child learns to read -- except that it is in Latin characters and not square text. 

It can be transformed into square text without loss of any consonants. (See here for an online transformation.)

א הללוּ את-יהוה כל-גוֹיים 
שבחוּהוּ כל-האוּמימ
ב כי גבר עלינוּ חסדוֹ ואמת-יהוה לעוֹלם הללוּ-יה

It is therefore a left-to-right version of the standard malé (full spelling) Hebrew text that a Hebrew child would learn. I am not a Hebrew child but now I can learn and see the Hebrew word structures without compromise and learn Hebrew using left to right reading and in the alphabet that I am familiar with. (Of course I have to learn a slight variation on pronouncing that alphabet - but every language does that to you!)

Notice there are only three lines in the poem: two verses, three musical lines. True there is a mordent (revia) half way through the third line, but it is a slight pause, compared to the cadence on the subdominant in verse 1. 

Praise Yahweh, all nations.
Commend him, all the clans.
For his mercy has prevailed over us, and the truth of Yahweh is forever. Praise Yah.

The whole second verse is the rationale - that mercy and truth will prevail - for ever. You could expand on this allusion to the theophany of Exodus 34 and cover the theology of Tanach. (This was Jonah's problem - wasn't it - that there are always going to be those who will take advantage of mercy - perhaps he anticipated game theory.)

Theology is a worthwhile endeavour within the bounds of our eras and within reach - not so far away that we must ascend to heaven or cross over beyond the seas ...
la bwmiim hia ... 
vla-mybr lim hia ... 
ci-qrob aliç hdbr maod 
bpiç ublbbç lywoto s

See Deuteronomy 30:14 - and the SimHebrew Bible will not impose the unnecessary burden of right to left strange letters on you - you can have the matter near to you utterly, in your mouth and in your heart to do it.

Tell your friends - the book will be out soon and available at your favorite distributor.

Thursday 16 September 2021

Explaining a bit of project history

I am remembering the days of my infancy and the Bible I tried to learn from to read Hebrew. Look at verse 9: the verse containing the verb yod-qof-dalet, וַֽיַּעֲקֹד֙ אֶת־יִצְחָ֣ק בְּנ֔וֹ, in SimHebrew, viyqod at-ixkq bno. Note in this Bible how far away from the English verse 9 is in the Hebrew. I actually tried to use this Bible when listening to a reading - years ago now. It was nearly impossible to see the assumptions hidden in the translation in real time. How often, I wondered did that verb 'bind' occur?


Here is the same page from the SimHebrew Bible. There is no difficulty matching the Hebrew and the English here. They are always side by side. And you have time both to hear a different version being read, and to process the decisions in the translation you are listening to. 

I use this on my phone (a lot less heavy than the paper edition of course) and am easily able to navigate from the psalm to the lesson and even to search English or Hebrew. And I see that the word for bound (bind) - rendered trussed in the English guide on the right (my translation) is a hapax - at least as far as the word form is concerned. If I went to the built-in glossary, a click would bring me to a full concordance showing the uniqueness of the word form but a few other uses in Genesis as well. See yqd.

Searching in the SimHebrew Bible

Two of us have collaborated on this project, Jonathan Orr-Stav, a third-generation Hebrew-English translator, and Bob MacDonald, a retired programmer and musician whose translation is included as the English Guide to the Hebrew.

The two projects, SimHebrew reaching back over the last 20 years, and my translation for the music of the te'amim, over the last 15 years, converged with some rapidity during the pandemic. Jonathan completed his semi-manual transcription of the malé text, and I wrote a program to convert the text of the Aleppo Codex to equivalent SimHebrew. This convergence allowed us to automate the proof-reading process, his manual process refining my program, and my programming allowing him to find typos.

The project has been designed to allow non-Hebrew readers to see and learn Biblical Hebrew more easily. It removes the barrier of right to left reading as well as learning a strange tongue in a strange alphabet. It also yields significant technical advantages:
  1. One big advantage is a single keyboard for entering accurate search criteria. I have seen and used multiple Hebrew keyboards and they are both incompatible and inconvenient. 
  2. The compactness of SimHebrew highlights the structure of the Hebrew word forms for those who do not read square text. 
  3. I have programmed with Unicode and it would have been impossible to do what I have done to semi-automate the translation process without a Latin abbreviation for Hebrew characters. I made my own up 10 or so years ago and switched to SimHebrew in 2019 because it is a better mapping. 
SimHebrew allows and will allow many to see and hear Hebrew who otherwise would not get over the barriers of rtl processing, multiple keyboards, and square text.

To quip (again) on Qohelet: In contrast to Qohelet's view, "vain cl-kdw tkt hwmw", there is something new under the sun. It's called Simhebrew. It is a new way of reading Hebrew - complementary to but easier than the square text.

Look for The SimHebrew Bible // The Hebrew Bible in Simulated Hebrew – with English Guide, ISBN 978-0-9811338-1-2. General availability is November 11. I can't tell you the cost yet, but it will be a lot less expensive and more useful than that paper Bible from 15 years ago. 

Sunday 12 September 2021

The SimHebrew Bible - Planning the production date

The Hebrew Bible in Simulated
Hebrew – with English Guide

The SimHebrew Bible is pending production. [Update - we have selected a date - Nov 11. Links here. I am actively looking for reviewers. Please contact me via a comment or via twitter DM @drmacdonald.] Just a few little things to fully set up this book subtitled, "The Hebrew Bible in Simulated Hebrew – with English Guide".

I love having this book on my phone. It's worth all the past 15 years of effort and it uses that effort effectively and thoroughly. I can find anything in the words and their forms and uses with a few swipes and clicks and all the uses of a word or a phrase in English or Hebrew using the built-in search.

I have been testing the full navigation within the book as divided into 24 books and now 929 files. Starting a chapter after the 'gap', (if scrolling, or at the top of a page, if not) - is important for ease of eyeballing where you are. The book is repeated for each chapter because some readers do not tell you exactly where you are when you reopen the book.

The background-color(s) I have simplified, but I have left in a discrete left-border for the first page of each of the 24 books as noted in the previous post on CSS classes.

I thought about programming a back button – but there is no need since the reader software provides an adequate one. (But I may do it anyway for people who browse and don't want to hunt and peck in the table of contents.)

I have added the glossary page from the concordance. That allows the reader to have a search and click, by English lemma or Hebrew root, to a list of every usage of a word or its root and a pronunciation guide for it – too valuable to leave out. Given that the Hebrew is also in Latin letters, it is very easy to search for a given Hebrew word form throughout the book itself.

It's a single volume with the whole of the 'Old Testament' in SimHebrew with an English Guide. A real value for study. 

Here is an example of a page of Jonah with hgdolh highlighted. With the phrase hyir hgdolh {the great city} showing clearly used 3 times in that story, you might note that only in one other place is this phrase used. Imagine how easy it would be to learn Hebrew with this book at your fingertips.

Notice the different usage of prepositions in the instructions to Jonah between chapters 1 and 3. Look closely at the search block. The first time the preposition is 'yl'. The second time it is 'al'. Now ask, Are they really equivalent, the second with a lighter glottal stop, the other deeper in the throat - perhaps more urgent the first time, and then a realization that Jonah needs to be cajoled more gently into doing what he is told? Fishy tale... but a great read - (and I have a full score of a 20 minute cantata if anyone wants to perform it - choir and soloists and harp - could be arranged for small orchestra).

Using a built in search capacity - as easy to search the Hebrew as it is an English phrase


Wednesday 8 September 2021

The SimHebrew Bible nearing publication

I have been spending time over the last 6 weeks designing the e-book for the SimHebrew Bible. It is a single book. The past month I have been learning how to control cascading style sheets in order to make this piece of software (an e-book is software and needs controlling like any other piece of software) maintainable and to prove that I have the structure right.

The Bible is a complex structure. One of the problems is how to present the 39 books in the traditional 24. The divisions are tricky from the point of view of designing the navigation in a large book.

Figure 1: the Opening of Ruth in the SimHebrew Bible
Here is the beginning of the book of Ruth taken from my tests on an iPhone. 

You can see the structure of a single book - 
  • surrounded entirely by a border - maybe I will cut off the side borders to allow for wider screen real-estate for this two-column work.
  • then the title - a real heading for navigation from the main table of contents.
  • then the internal contents showing all the chapters.
  • then the top of the first chapter (on a new page if you are not using the iBook's continuous scrolling.)
  • then the chapter window. I could make this negative on the left side and positive on the right side, but I decided to keep the sides equivalent, to go back, use a back button or go to the toc and choose from there.
  • then the text itself in alternating lines.
Here are the classes used to keep all the detailed attributes out of the main body of the book and in a single small list of parameters for the html. Ruth is book# 31 (of 39). Although classed with the five scrolls, it counts as a whole book in the 24. The 24 are the 5 books of Moses, the 8 books of the prophets, the three books of poetry, the five scrolls of which Ruth is the second, making it book# 18 of 24, and the remaining: 22. Daniel 23. Ezra-Nehemiah, and 24. Chronicles.

Here is the full coding for this section that you see in Figure 1.

<div class="book-section">
<div class="prose-book" id="31"> (Ruth is one of the 21 prose books.)
<h2 class="book-head">rut (Ruth)</h2>
<div class="toc-for-24">
<div class="toc-for-24-5"> (Ruth is one of the 5 scrolls - a place for special treatment for them.)
<div class="chapter-links">
<a href="#31001">a (1)</a> | <a href="#31002">b (2)</a> | <a href="#31003">g (3)</a> | 
<a href="#31004">d (4)</a></div>
</div>
</div> (ends the toc divs for a book.)
<div class="book_hdr">
<h4 class="chapter-head">rut (Ruth)</h4></div> (Chapter head is repeated at the top of the book.)
<div class="grid-h4" id="31001"> (A small window into the next 4 chapters.)
<div class="item5">a | <a href="#31002">b</a> | <a href="#31003">g</a> | <a href="#31004">d</a></div>
<div class="item6">1 | <a href="#31002">2</a> | <a href="#31003">3</a> | <a href="#31004">4</a></div></div> (Note, if it weren't the first chapter, you would see the chapter name repeated in the window. This allows you to remember where you were when coming back to the book after a pause in your reading.)
<div class="grid1"> (A two-column format for the text itself.)
<div class="item1">
<span class="heb-verse">a </span> (Allows special treatment of verse number formatting.)
vihi bimi wpo't hwop'tim vihi ryb barx.<br/>vilç aiw mbit lkm ihudh lgur bwdh moab hua vawto uwni bniv.</div>
<div class="item2">
<span class="eng-verse">1 </span>
It was in the days of the judgment of the judges, and there was a famine in the land.<br/>And a man went from Bethlehem of Judah to reside in Sdeh-Moab, he, his wife, and his two sons.</div>
<div class="item3">
<span class="heb-verse">b </span>
vwm haiw alimlç vwm awto noymi vwm wni-bniv mklon vclion aprtim mbit lkm ihudh.<br/>viboau wdh-moab vihiu-wm.</div>
<div class="item4">
<span class="eng-verse">2 </span>
And the name of the man was Elimelek, and the name of his wife Naomi, and the name of his two sons, Mahlon and Chilion, Ephrathites from Bethlehem of Judah.<br/>And they came to Sdeh-Moab, and there they were.</div>
... and so on. (Noticee the br tags representing the musical cadences within a verse.)

Each class has many html attributes that can be modified in one place.

The e-book has to split large files for efficiency of loading the text - to avoid a long pause between chapters. The book-section is simply a point where I can direct the epub software to split the file so that the split is not arbitrary.

Figure 2: TOC for the Psalms in part
Book-section looks like this:
.book-section { page-break-after: always;}
.book-section > div {  font-weight: normal; text-align: left;  margin-top: 2px; } [the page-break is wrong - shouldn't be there since it will cause a break if the class is split.]

I am learning the CSS language as I go. I think the above means that any div tags within book-section will inherit the properties in the second line. But I don't know for sure because when I look inherited properties up on the web I get a whole set of specifications to read - and it's just too much info for the moment. I try it and see if it works - then I hope it won't get in the way later.

One thing is sure - there are no attributes defined in the text itself which is produced automatically from my database and so remains completely uncluttered with bulky repeated definitions of html attributes and completely true to the data I have developed these past 15 years - for the English, and 2 years - for my conversion of my internal coding to SimHebrew. So i can grow the book as I learn more..

Ruth is a prose book, one of the 21. So it gets the class prose-book and the toc-for-24-5 class which allows some special formatting like border colors, or background colors, to distinguish this set of books from the others. 

For contrast Figure 2 shows the top of the Psalms inner table of contents. As one of the three poetry books, it has a different border-color. Whether the borders or colors will stay is a matter for discussion. The structure is at least fully defined. I have patterned the toc according to the 5 books of psalms. 

These may end up with a split class in their middle for efficiency's sake. Similarly with other large books like Isaiah and Jeremiah.

These can be done by hand. If one does this by hand, it is best to use a unique class name for the new div - an internal book divider. Then you can remove it after the split.

So the book The SimHebrew Bible, The Hebrew Bible in Simulated Hebrew – with English Guide, is nearing completion. We will announce availability soon. In time for gift-giving to your favorite friend who you know wants to learn Hebrew.