Working with vowel points (niqqud) and other marks

Published

July 11, 2024

Vowels

The Unicode specification defines combining characters for the Tiberian vowel points (niqqud). The BiblicalHebrew package defines character constants that can be used to refer to these combining values (), and offers a parallel suite of functions for composing strings with the vowel points.

Note

For situations where it might be easier to code with character sets such as ASCII or other non-Unicode character sets, the package defines constant names for the consonantal characters of the Hebrew alphabet. (See the complete list of constants in the reference section of this documentation.) For example:

using BiblicalHebrew
BiblicalHebrew.aleph_ch
'א': Unicode U+05D0 (category Lo: Letter, other)

For example, add a qamats to an aleph character:

pointed = qamats('א')
"אָ"

You can also use these functions to append a vowel point to a string.

qamats("כְת")
"כְתָ"

You can of course chain these functions. To compose hateph vowels, for example, use the sheva function, then a function for a vowel:

hateph_seghol = sheva("א") |> seghol
"אְֶ"

There is also a suite of functions for adding cantillation and other marks, such as metheg.

qamats_metheg = qamats("א") |> metheg
"אָֽ"

Other marks

cantillation or stress: ole

  • dagesh and mappiq
dagesh("ב")
"בּ"
mappiq("ה")
"הּ"
Warning

These are identical in Unicode! (They shouldn’t be.)

  • numeric: gershe

Summary of functions for adding vowel points to strings

qamats

Add qamats to string s.

Example

julia> qamats("ב")
"בָ"
qamats(s)

patah

Add patah to string s.

Example

julia> patah("ב")
"בַ"
patah(s)

seghol

Add seghol to string s.

Example

julia> seghol("ב")
"בֶ"
seghol(s)

hiriq

Add hiriq to string s.

Example

julia> hiriq("ב")
"בִ"
hiriq(s)

tsere

Add tsere to string s.

Example

julia> tsere("ב")
"בֵ"
tsere(s)

qubbuts

Add qubbuts to string s.

Example

julia> qubbuts("ב")
"בֻ"
qubbuts(s)

holam

Add holam to string s.

Example

julia> holam("ב")
"בֹ"
holam(s)

sheva

Add sheva to string s.

Example

julia> sheva("ב")
"בְ"
sheva(s)

metheg

Add metheg to string s.

Example

julia> qamats("ב") |> metheg
"בָֽ"
metheg(s)

Cantillation and other notation

ole

Add accent ole to string s.

Example

julia> ole("עוֹלֶה")
"עוֹלֶה֫"
ole(s)

mappiq

Add mappiq to string s.

Example

julia> mappiq("ה")
"הּ"
mappiq(s)

dagesh

Add dagesh to string s.

dagesh(s)

gershe

Append gershe to string s.

maqaf_join

Connect a list of tokens together with maqaf.

Example

julia> maqaf_join(["עַל", "פְנֵי"])
"עַל־פְנֵי"
maqaf_join(v)

Join a pair of strings together with maqaf.

Example

julia> maqaf_join("עַל", "פְנֵי")
"עַל־פְנֵי"
maqaf_join(s1, s2)