Skip to content

Cluster

Defined in: cluster.ts:29

A cluster is group of Hebrew character constituted by:

  • an obligatory Hebrew consonant character
  • an optional ligature mark
  • an optional vowel
  • an optional taam

A Syllable is a linguistic unit, whereas a Cluster is an orthgraphic one. The word יֹו֑ם is only one syllable, but it has three clusters—יֹ, ו֑, ם. Because Hebrew orthography is both sub and supra linear, clusters can be encoded in various ways. Every Char is sequenced first for normalization, see the SBL Hebrew Font Manual, p.8.

new Cluster(cluster, noSequence?): Cluster

Defined in: cluster.ts:56

Creates a new cluster

Parameter Type Default value Description
cluster string undefined the original cluster
noSequence boolean false whether to sequence the cluster

Cluster

const str = "הָ";
const cluster = new Cluster(str);
cluster.text;
// "הָ"

Node.constructor

children: Node<Char, any, any>[] | null = null

Defined in: node.ts:21

Collection of child nodes.

Node.children


next: Node<Cluster, null, null> | null = null

Defined in: node.ts:11

Next sibling in the sequence.

Node.next


parent: Node<Syllable, any, any> | null = null

Defined in: node.ts:18

Reference to the parent container.

Node.parent


prev: Node<Cluster, null, null> | null = null

Defined in: node.ts:13

Previous sibling in the sequence.

Node.prev


value: Cluster | null = null

Defined in: node.ts:15

Node data.

Node.value

get chars(): Char[]

Defined in: cluster.ts:95

Gets all the Chars in the cluster

const text = new Text("הֲבָרֹות");
text.clusters[0].chars;
// [
// Char { original: "ה" },
// Char { original: "ֲ " }, i.e. \u{05B2} (does not print well)
// ]

Char[]

an array of sequenced Char objects


get consonantNames(): ("ALEF" | "BET" | "GIMEL" | "DALET" | "HE" | "VAV" | "ZAYIN" | "HET" | "TET" | "YOD" | "FINAL_KAF" | "KAF" | "LAMED" | "FINAL_MEM" | "MEM" | "FINAL_NUN" | "NUN" | "SAMEKH" | "AYIN" | "FINAL_PE" | "PE" | "FINAL_TSADI" | "TSADI" | "QOF" | "RESH" | "SHIN" | "TAV")[]

Defined in: cluster.ts:147

Gets all consonant names in the cluster.

const text = new Text("הֲבָרֹות");
text.clusters[0].consonantNames;
// ["HE"]

This can only every return one consonant, as a Cluster is defined by having only one consonant. Though it is impossible to have two consonants in a cluster, this api is meant for consistency with vowelNames and taamimNames

("ALEF" | "BET" | "GIMEL" | "DALET" | "HE" | "VAV" | "ZAYIN" | "HET" | "TET" | "YOD" | "FINAL_KAF" | "KAF" | "LAMED" | "FINAL_MEM" | "MEM" | "FINAL_NUN" | "NUN" | "SAMEKH" | "AYIN" | "FINAL_PE" | "PE" | "FINAL_TSADI" | "TSADI" | "QOF" | "RESH" | "SHIN" | "TAV")[]

an array of the consonant names in the cluster


get consonants(): ("א" | "ב" | "ג" | "ד" | "ה" | "ו" | "ז" | "ח" | "ט" | "י" | "ך" | "כ" | "ל" | "ם" | "מ" | "ן" | "נ" | "ס" | "ע" | "ף" | "פ" | "ץ" | "צ" | "ק" | "ר" | "ש" | "ת")[]

Defined in: cluster.ts:115

Gets all the consonant characters in the cluster

const text = new Text("הֲבָרֹות");
text.clusters[0].consonants;
// ["ה"]

This can only every return one consonant, as a Cluster`` is defined by having only one consonant. Though it is impossible to have two consonants in a cluster, this api is meant for consistency with vowelsandtaamim`

("א" | "ב" | "ג" | "ד" | "ה" | "ו" | "ז" | "ח" | "ט" | "י" | "ך" | "כ" | "ל" | "ם" | "מ" | "ן" | "נ" | "ס" | "ע" | "ף" | "פ" | "ץ" | "צ" | "ק" | "ר" | "ש" | "ת")[]

an array of the consonant characters in the cluster


get hasHalfVowel(): boolean

Defined in: cluster.ts:205

Checks if the cluster contains a half-vowel

const text = new Text("הֲבָרֹות");
text.clusters[0].hasHalfVowel;
// true
text.clusters[1].hasHalfVowel;
// false

The following characters are considered half-vowels:

  • \u{05B1} HATAF SEGOL
  • \u{05B2} HATAF PATAH
  • \u{05B3} HATAF QAMATS

boolean

a boolean indicating if the cluster contains a half-vowel


get hasLongVowel(): boolean

Defined in: cluster.ts:230

Checks if the cluster contains a long vowel

const text = new Text("הֲבָרֹות");
text.clusters[0].hasLongVowel;
// false
text.clusters[1].hasLongVowel;
// true

The following characters are considered long vowels:

  • \u{05B5} TSERE
  • \u{05B8} QAMATS
  • \u{05B9} HOLAM
  • \u{05BA} HOLAM HASER FOR VAV

boolean

a boolean indicating if the cluster contains a long vowel


get hasMeteg(): boolean

Defined in: cluster.ts:271

Checks if the cluster contains a meteg

Checks if the following character is present and a sof pasuq does not follow it:

  • \u{05BD} METEG

boolean

a boolean indicating if the cluster contains a meteg

const text = new Text("נַפְשִֽׁי׃");
text.clusters[2].hasMetheg;
// true

get hasMetheg(): boolean

Defined in: cluster.ts:252

Checks if the cluster contains a meteg

const text = new Text("נַפְשִֽׁי׃");
text.clusters[2].hasMetheg;
// true

Checks if the following character is present and a sof pasuq does not follow it:

  • \u{05BD} METEG

boolean

a boolean indicating if the cluster contains a meteg


get hasSheva(): boolean

Defined in: cluster.ts:310

Checks if the cluster contains a sheva

const text = new Text("מַלְכָּה");
text.clusters[0].hasSheva;
// false
text.clusters[1].hasSheva;
// true

Checks if the following character is present:

  • \u{05B0} SHEVA

boolean

a boolean indicating if the cluster contains a sheva


get hasShewa(): boolean

Defined in: cluster.ts:334

Checks if the cluster contains a sheva

const text = new Text("מַלְכָּה");
text.clusters[0].hasSheva;
// false
text.clusters[1].hasSheva;
// true

Checks if the following character is present:

  • \u{05B0} SHEVA

boolean

a boolean indicating if the cluster contains a sheva


get hasShortVowel(): boolean

Defined in: cluster.ts:360

Checks if the cluster contains a short vowel

const text = new Text("מַלְכָּה");
text.clusters[0].hasShortVowel;
// true
text.clusters[2].hasShortVowel;
// false

The following characters are considered short vowels:

  • \u{05B4} HIRIQ
  • \u{05B6} SEGOL
  • \u{05B7} PATAH
  • \u{05BB} QUBUTS
  • \u{05C7} QAMATS QATAN

boolean

a boolean indicating if the cluster contains a short vowel


get hasSilluq(): boolean

Defined in: cluster.ts:380

Checks if the cluster contains a silluq

const text = new Text("הָאָֽרֶץ׃");
text.clusters[2].hasSilluq;
// true

Checks if the following character is present and a sof pasuq follows it:

  • \u{05BD} METEG

boolean

a boolean indicating if the cluster contains a silluq


get hasTaamim(): boolean

Defined in: cluster.ts:430

Checks if the cluster contains a taamim character

const text = new Text("אֱלֹהִ֑ים");
text.clusters[0].hasTaamim;
// false
text.clusters[2].hasTaamim;
// true

The following characters are considered taamim:

  • \u{0591}-\u{05AF}\u{05BF}\u{05C0}\u{05C3}-\u{05C6}\u{05F3}\u{05F4}

boolean

a boolean indicating if the cluster contains a taamim character


get hasVowel(): boolean

Defined in: cluster.ts:452

Checks if the cluster contains any vowel character

const text = new Text("הֲבָרֹות");
text.clusters[0].hasVowel;
// true
text.clusters[4].hasVowel;
// false

According to Syllabification, a sheva is a vowel and serves as the nucleus of a syllable. Because Cluster is concerned with orthography, a sheva is not a vowel character.

boolean

a boolean indicating if the cluster contains any vowel character


get isMater(): boolean

Defined in: cluster.ts:506

Checks if the cluster is a mater letter

const text = new Text("סוּסָה");
text.clusters[1].isMater; // the shureq
// false
text.clusters[3].isMater; // the heh
// true

Returns true if Cluster.hasVowel, Cluster.hasSheva, Cluster.isShureq, and Cluster.next.isShureq are all false and Cluster.text contains a:

  • ה preceded by a qamets
  • ו preceded by a holem
  • י preceded by a hiriq, tsere, or segol

There are potentially other instances when a consonant may be a mater (e.g. a silent aleph), but these are the most common. Though a shureq is a mater letter, it is also a vowel itself, and thus separate from isMater.

boolean

a boolean indicating if the cluster is a mater letter


get isNotHebrew(): boolean

Defined in: cluster.ts:540

Checks if the Cluster does not have Hebrew chars

boolean

a boolean indicating if the Cluster does not have Hebrew chars

* const text = new Text("(לְעֹלָם)");
text.clusters[0].isNotHebrew;
// true

get isPunctuation(): boolean

Defined in: cluster.ts:563

Checks if the Cluster has any punctuation characters

const text = new Text("הָאָֽרֶץ׃");
text.clusters[3].isPunctuation;
// true

These are all the Hebrew characters of the category PUNCTUATION

  • \u{05BE} HEBREW PUNCTUATION MAQAF ־
  • \u{05C0} HEBREW PUNCTUATION PASEQ ׀
  • \u{05C3} HEBREW PUNCTUATION SOF PASUQ ׃
  • \u{05C6} HEBREW PUNCTUATION NUN HAFUKHA ׆

boolean

a boolean indicating if the Cluster has any punctuation characters


get isShureq(): boolean

Defined in: cluster.ts:587

Checks if the Cluster is a shureq

Returns true if Cluster.hasVowel, Cluster.hasSheva, and Cluster.prev.hasVowel are all false and Cluster.text is a vav followed by a dagesh (e.g. וּ) A shureq is a vowel itself, but contains no vowel characters (hence why hasVowel cannot be true). This allows for easier syllabification.

boolean

a boolean indicating if the Cluster is a shureq

const text = new Text("קוּם");
text.clusters[0].isShureq;
// false
text.clusters[1].isShureq;
// true

get isTaam(): boolean

Defined in: cluster.ts:614

Checks if the Cluster is a taam

const text = new Text("הָאָֽרֶץ׃");
text.clusters[3].isTaam;
// true

This is an alias for isPunctuation. Returns true is the Cluster is any of the following characters:

  • \u{05BE} HEBREW PUNCTUATION MAQAF ־
  • \u{05C0} HEBREW PUNCTUATION PASEQ ׀
  • \u{05C3} HEBREW PUNCTUATION SOF PASUQ ׃
  • \u{05C6} HEBREW PUNCTUATION NUN HAFUKHA ׆

boolean

a boolean indicating if the Cluster is a taam


get original(): string

Defined in: cluster.ts:626

The original string passed

The original string passed to the constructor that has not been normalized or sequenced. See text

string

the original string passed


get siblings(): Node<Self, Child, any>[]

Defined in: node.ts:45

Retrieves all subsequent nodes in the current sibling chain.

Node<Self, Child, any>[]

set siblings(arr): void

Defined in: node.ts:29

Connects an array of nodes as a doubly-linked sibling chain starting after this node.

Parameter Type
arr Node<Self, Child, any>[]

void

Node.siblings


get syllable(): Syllable | null

Defined in: cluster.ts:645

The parent Syllable of the cluster

const text = new Text("דָּבָר");
const lastCluster: Cluster = text.clusters[2];
lastCluster.text;
// "ר"
lastCluster.syllable.text;
// "בָר"

If created via the Text class, there should always be a syllable.

Syllable | null


get taamim(): ("֑" | "֒" | "֓" | "֔" | "֕" | "֖" | "֗" | "֘" | "֙" | "֚" | "֛" | "֜" | "֝" | "֞" | "֟" | "֠" | "֡" | "֢" | "֣" | "֤" | "֥" | "֦" | "֧" | "֨" | "֩" | "֪" | "֫" | "֬" | "֭" | "֮")[]

Defined in: cluster.ts:660

Gets all the taamim characters in the cluster

("֑" | "֒" | "֓" | "֔" | "֕" | "֖" | "֗" | "֘" | "֙" | "֚" | "֛" | "֜" | "֝" | "֞" | "֟" | "֠" | "֡" | "֢" | "֣" | "֤" | "֥" | "֦" | "֧" | "֨" | "֩" | "֪" | "֫" | "֬" | "֭" | "֮")[]

an array of taamim characters in the cluster

const text = new Text("אֱלֹהֶ֑֔יךָ");
text.clusters[2].taamim;
// ["֑", "֔"]

get taamimNames(): ("ETNAHTA" | "SEGOL_ACCENT" | "SHALSHELET" | "ZAQEF_QATAN" | "ZAQEF_GADOL" | "TIPEHA" | "REVIA" | "ZARQA" | "PASHTA" | "YETIV" | "TEVIR" | "GERESH" | "GERESH_MUQDAM" | "GERSHAYIM" | "QARNEY_PARA" | "TELISHA_GEDOLA" | "PAZER" | "ATNAH_HAFUKH" | "MUNAH" | "MAHAPAKH" | "MERKHA" | "MERKHA_KEFULA" | "DARGA" | "QADMA" | "TELISHA_QETANA" | "YERAH_BEN_YOMO" | "OLE" | "ILUY" | "DEHI" | "ZINOR")[]

Defined in: cluster.ts:687

Gets all the names of the taamim characters in the cluster

("ETNAHTA" | "SEGOL_ACCENT" | "SHALSHELET" | "ZAQEF_QATAN" | "ZAQEF_GADOL" | "TIPEHA" | "REVIA" | "ZARQA" | "PASHTA" | "YETIV" | "TEVIR" | "GERESH" | "GERESH_MUQDAM" | "GERSHAYIM" | "QARNEY_PARA" | "TELISHA_GEDOLA" | "PAZER" | "ATNAH_HAFUKH" | "MUNAH" | "MAHAPAKH" | "MERKHA" | "MERKHA_KEFULA" | "DARGA" | "QADMA" | "TELISHA_QETANA" | "YERAH_BEN_YOMO" | "OLE" | "ILUY" | "DEHI" | "ZINOR")[]

an array of names of taamim characters in the cluster

const text = new Text("אֱלֹהֶ֑֔יךָ");
text.clusters[2].taam;
// ['ETNAHTA', 'ZAQEF_QATAN' ]

get text(): string

Defined in: cluster.ts:725

Gets text of the cluster

const text = new Text("הֲבָרֹות");
const clusters = text.clusters.map((cluster) => cluster.text);
// [
// "הֲ",
// "בָ",
// "רֹ",
// "ו",
// "ת"
// ]

The text has been normalized and sequenced — see original for text passed in the constructor.

string

the text of the cluster that has been built up from the .text of its constituent Chars


get vowelNames(): ("HATAF_SEGOL" | "HATAF_PATAH" | "HATAF_QAMATS" | "HIRIQ" | "TSERE" | "SEGOL" | "PATAH" | "QAMATS" | "HOLAM" | "HOLAM_HASER" | "QUBUTS" | "QAMATS_QATAN")[]

Defined in: cluster.ts:746

Gets all the names of the vowel characters in the cluster

const text = new Text("הַֽ֭יְחָבְרְךָ");
text.clusters[0].vowelNames;
// ['PATAH']

It is exceedingly rare to find more than one vowel character in a cluster. According to Syllabification, a sheva is a vowel and serves as the nucleus of a syllable. Because Cluster is concerned with orthography, a sheva is not a vowel character

("HATAF_SEGOL" | "HATAF_PATAH" | "HATAF_QAMATS" | "HIRIQ" | "TSERE" | "SEGOL" | "PATAH" | "QAMATS" | "HOLAM" | "HOLAM_HASER" | "QUBUTS" | "QAMATS_QATAN")[]

an array of names of vowel characters in the cluster


get vowels(): ("ֱ" | "ֲ" | "ֳ" | "ִ" | "ֵ" | "ֶ" | "ַ" | "ָ" | "ֹ" | "ֺ" | "ֻ" | "ׇ")[]

Defined in: cluster.ts:781

Gets all the vowel characters in the cluster

const text = new Text("הַֽ֭יְחָבְרְךָ");
text.clusters[0].vowel;
// "\u{05B7}"
text.clusters[3].vowel;
// null

It is exceedingly rare to find more than one vowel character in a cluster. According to Syllabification, a sheva is a vowel and serves as the nucleus of a syllable. Because Cluster is concerned with orthography, a sheva is not a vowel character

("ֱ" | "ֲ" | "ֳ" | "ִ" | "ֵ" | "ֶ" | "ַ" | "ָ" | "ֹ" | "ֺ" | "ֻ" | "ׇ")[]

an array of vowel characters in the cluster

hasConsonantName(name): boolean

Defined in: cluster.ts:177

Checks if the cluster contains the consonant character of the name passed in

Parameter Type
name "ALEF" | "BET" | "GIMEL" | "DALET" | "HE" | "VAV" | "ZAYIN" | "HET" | "TET" | "YOD" | "FINAL_KAF" | "KAF" | "LAMED" | "FINAL_MEM" | "MEM" | "FINAL_NUN" | "NUN" | "SAMEKH" | "AYIN" | "FINAL_PE" | "PE" | "FINAL_TSADI" | "TSADI" | "QOF" | "RESH" | "SHIN" | "TAV"

boolean

a boolean indicating if the cluster contains the consonant character of the name passed in

const text = new Text("הֲבָרֹות");
text.clusters[0].hasConsonantName("HE");
// true
text.clusters[0].hasConsonantName("BET");
// false

hasTaamName(name): boolean

Defined in: cluster.ts:405

Checks if the cluster contains a taamim character

Parameter Type
name "ETNAHTA" | "SEGOL_ACCENT" | "SHALSHELET" | "ZAQEF_QATAN" | "ZAQEF_GADOL" | "TIPEHA" | "REVIA" | "ZARQA" | "PASHTA" | "YETIV" | "TEVIR" | "GERESH" | "GERESH_MUQDAM" | "GERSHAYIM" | "QARNEY_PARA" | "TELISHA_GEDOLA" | "PAZER" | "ATNAH_HAFUKH" | "MUNAH" | "MAHAPAKH" | "MERKHA" | "MERKHA_KEFULA" | "DARGA" | "QADMA" | "TELISHA_QETANA" | "YERAH_BEN_YOMO" | "OLE" | "ILUY" | "DEHI" | "ZINOR"

boolean

a boolean indicating if the cluster contains a taamim character

const text = new Text("הָאָ֖רֶץ");
text.clusters[0].hasTaamName("TIPEHA");
// true

Note: it only checks according to the character name, not its semantic meaning. E.g. “כֵֽן׃” would be true when checking for "METEG", not silluq


hasVowelName(name): boolean

Defined in: cluster.ts:474

Checks if the cluster contains the vowel character of the name passed in

Parameter Type
name "HATAF_SEGOL" | "HATAF_PATAH" | "HATAF_QAMATS" | "HIRIQ" | "TSERE" | "SEGOL" | "PATAH" | "QAMATS" | "HOLAM" | "HOLAM_HASER" | "QUBUTS" | "QAMATS_QATAN"

boolean

a boolean indicating if the cluster contains the vowel character of the name passed in

const text = new Text("הַיְחָבְרְךָ");
text.clusters[0].hasVowelName("PATAH");
// true
text.clusters[0].hasVowelName("HIRIQ");
// false

According to Syllabification, a sheva is a vowel and serves as the nucleus of a syllable. Because Cluster is concerned with orthography, a sheva is not a vowel character.