charlesLoder / havarotjs

A Typescript package for getting syllabic data about Hebrew text with niqqud.
https://www.npmjs.com/package/havarotjs
MIT License
12 stars 6 forks source link

Feature: option for vowel after meteg/gaya #129

Closed charlesLoder closed 1 year ago

charlesLoder commented 1 year ago

Currently if a sheva occurs after a meteg, there is no way to make the sheva a sheva nach

const str = "יְדַֽעְיָה";
const result = new Text(str).syllables.map((s) => ({ text: s.text, isClosed: s.isClosed }));
console.log(result);

// [
//   { text: 'יְ', isClosed: false },
//   { text: 'דַֽ', isClosed: false },
//   { text: 'עְ', isClosed: false },
//   { text: 'יָה', isClosed: false }
// ]

It would be helpful to have an option for this, to produce these results:

const str = "יְדַֽעְיָה";
const result = new Text(str, { meteg: false }).syllables.map((s) => ({ text: s.text, isClosed: s.isClosed }));
console.log(result);

// [
//   { text: 'יְ', isClosed: false },
//   { text: 'דַֽעְ', isClosed: true },
//   { text: 'יָה', isClosed: false }
// ]

This will allow it to more correctly match the Tiberian tradition.

See Khan 2020 1.2.10 where "יְדַֽעְיָה" is [jaˌðaˑʕˌjɔː]