Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/utils/syllabifier.ts
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,15 @@ const setIsClosed = (syllable: Syllable, index: number, arr: Syllable[]) => {
};

const setIsAccented = (syllable: Syllable) => {
// if the syllable is final and has a furtive pataḥ, it should not be accented
if (!syllable.next && /(?:\u{05D7}|\u{05E2}|\u{05D4}\u{05BC}).?\u{05B7}/u.test(syllable.text)) {
syllable.isAccented = false;
if (syllable.prev?.value) {
syllable.prev.value.isAccented = true;
return;
}
}

if (syllable.isAccented) {
return;
}
Expand Down
30 changes: 30 additions & 0 deletions test/syllable.isAccented.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -255,4 +255,34 @@ describe("Test if a syllable is accented", () => {
});
});
});

describe("Furtive pataḥ never bears primary stress", () => {
// Epenthetic furtive pataḥ on final ח/ע/הּ is not a stress position.
// Postpositive accents and the milraʿ fallback often land on that letter
// (especially lone Segolta in WLC); stress belongs on the preceding syllable.

test("WLC lone Segolta on furtive (הָרָקִיעַ֒)", () => {
testIsAccented("הָרָקִיעַ֒", [false, false, true, false]);
});

test("MAM doubled Segolta still stresses pre-furtive", () => {
testIsAccented("הָרָקִ֒יעַ֒", [false, false, true, false]);
});

test("zaqef on קִ is unchanged", () => {
testIsAccented("לָרָקִ֔יעַ", [false, false, true, false]);
});

test("atnah on קִ is unchanged", () => {
testIsAccented("לָרָקִ֑יעַ", [false, false, true, false]);
});

test("unaccented רוּחַ stresses shureq, not furtive", () => {
testIsAccented("רוּחַ", [true, false]);
});

test("unaccented מַדּוּעַ stresses long vowel, not furtive", () => {
testIsAccented("מַדּוּעַ", [false, true, false]);
});
});
});
Loading