Syllable
Defined in: syllable.ts:35
A subunit of a Word consisting of consonants, vowels, and other linguistic and ortographic features.
Extends
Section titled “Extends”Node
<Syllable
>
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new Syllable(
clusters
,options
):Syllable
Defined in: syllable.ts:61
Creates a new Syllable
Parameters
Section titled “Parameters”Parameter | Type | Description |
---|---|---|
clusters | Cluster [] | an array of Cluster |
options | SyllableParams | optional parameters |
Returns
Section titled “Returns”Syllable
Example
Section titled “Example”new Syllable([new Cluster("אָ"), new Cluster("ב")]);
Remarks
Section titled “Remarks”See the Syllabification page for how a syllable is determined. Currently, the Divine Name (e.g. יהוה), non-Hebrew text, and Hebrew punctuation (e.g. passeq, nun hafucha) are treated as a single syllable because these do not follow the rules of Hebrew syllabification.
Overrides
Section titled “Overrides”Properties
Section titled “Properties”next:
null
|Node
<Syllable
>
Defined in: node.ts:9
Reference to the next node in the sequence.
Inherited from
Section titled “Inherited from”prev:
null
|Node
<Syllable
>
Defined in: node.ts:12
Reference to the previous node in the sequence.
Inherited from
Section titled “Inherited from”value:
null
|Syllable
Defined in: node.ts:15
The value stored in this node.
Inherited from
Section titled “Inherited from”Accessors
Section titled “Accessors”Get Signature
Section titled “Get Signature”get chars():
Char
[]
Defined in: syllable.ts:91
Gets all the Characters in the Syllable
Example
Section titled “Example”const text = new Text("וַיִּקְרָ֨א");text.syllables[2].chars;// [// Char { original: "ר" },// Char { original: "ָ" },// Char { original: "" }, i.e. \u{05A8} (does not print well)// Char { original: "א" }// ]
Returns
Section titled “Returns”Char
[]
a one dimensional array of characters
clusters
Section titled “clusters”Get Signature
Section titled “Get Signature”get clusters():
Cluster
[]
Defined in: syllable.ts:110
Gets all the Clusters in the Syllable
Example
Section titled “Example”const text = new Text("וַיִּקְרָ֨א");text.syllables[1].clusters;// [// Cluster { original: "יִּ" },// Cluster { original: "קְ" }// ]
Returns
Section titled “Returns”Cluster
[]
a one dimensional array of clusters
Get Signature
Section titled “Get Signature”get coda():
string
Defined in: syllable.ts:126
Gets the coda of the syllable - see structure
Example
Section titled “Example”const text = new Text("יָ֥ם");text.syllables[0].coda;// "ם"
Returns
Section titled “Returns”string
the coda of the syllable as a string, including any taamim and ignoring gemination of the following syllable - see codaWithGemination
codaWithGemination
Section titled “codaWithGemination”Get Signature
Section titled “Get Signature”get codaWithGemination():
string
Defined in: syllable.ts:144
Gets the coda of the syllable, including gemination of the following syllable - see structure
Example
Section titled “Example”const text = new Text("מַדּ֥וּעַ");text.syllables[0].codaWithGemination;// "דּ"text.syllables[0].coda // without gemination// ""
Returns
Section titled “Returns”string
the coda of the syllable as a string, including any taamim and including gemination of the following syllable - see structure
consonantNames
Section titled “consonantNames”Get Signature
Section titled “Get Signature”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: syllable.ts:186
Gets the names of the consonant characters of the syllable
Example
Section titled “Example”const text = new Text("רְ֭שָׁעִים");text.syllables[2].consonantNames;// ["AYIN", "YOD", "FINAL_MEM"]
Remarks
Section titled “Remarks”This returns a one dimensional array of consonant names, even if the characters are not phonemic consonants, meaning even the name of maters are returned. See the structure method if you need the consonants with phonemic value.
Returns
Section titled “Returns”("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"
)[]
a one dimensional array of consonant character names
consonants
Section titled “consonants”Get Signature
Section titled “Get Signature”get consonants(): (
"א"
|"ב"
|"ג"
|"ד"
|"ה"
|"ו"
|"ז"
|"ח"
|"ט"
|"י"
|"ך"
|"כ"
|"ל"
|"ם"
|"מ"
|"ן"
|"נ"
|"ס"
|"ע"
|"ף"
|"פ"
|"ץ"
|"צ"
|"ק"
|"ר"
|"ש"
|"ת"
)[]
Defined in: syllable.ts:166
Gets the consonant characters of the syllable
Example
Section titled “Example”const text = new Text("רְ֭שָׁעִים");text.syllables[2].consonants;// ["ע", "י", "ם"]
Remarks
Section titled “Remarks”This returns a one dimensional array of consonant characters, even if the characters are not phonemic consonants, meaning even maters are returned as consonant characters. See the structure method if you need the consonants with phonemic value.
Returns
Section titled “Returns”("א"
| "ב"
| "ג"
| "ד"
| "ה"
| "ו"
| "ז"
| "ח"
| "ט"
| "י"
| "ך"
| "כ"
| "ל"
| "ם"
| "מ"
| "ן"
| "נ"
| "ס"
| "ע"
| "ף"
| "פ"
| "ץ"
| "צ"
| "ק"
| "ר"
| "ש"
| "ת"
)[]
a one dimensional array of consonant characters
isAccented
Section titled “isAccented”Get Signature
Section titled “Get Signature”get isAccented():
boolean
Defined in: syllable.ts:290
Checks if the Syllable is accented
Example
Section titled “Example”const text = new Text("וַיִּקְרָ֨א"); // note the taam over the רtext.syllables[0].isAccented; // i.e. "וַ"// falsetext.syllables[2].isAccented; // i.e. "רָ֨א"// true
Remarks
Section titled “Remarks”An accented syllable receives stress, and is typically indicated by the presence of a taam character
Returns
Section titled “Returns”boolean
true if Syllable is accented
Set Signature
Section titled “Set Signature”set isAccented(
accented
):void
Defined in: syllable.ts:300
Sets whether the Syllable is accented
Parameters
Section titled “Parameters”Parameter | Type | Description |
---|---|---|
accented | boolean | a boolean indicating if the Syllable is accented |
Returns
Section titled “Returns”void
isClosed
Section titled “isClosed”Get Signature
Section titled “Get Signature”get isClosed():
boolean
Defined in: syllable.ts:321
Checks if the Syllable is closed
Example
Section titled “Example”const text = new Text("וַיִּקְרָ֨א");text.syllables[0].isClosed; // i.e. "וַ"// truetext.syllables[2].isClosed; // i.e. "רָ֨א"// false
Remarks
Section titled “Remarks”A closed syllable in Hebrew is a CVC or CVCC type, a mater letter does not close a syllable
Returns
Section titled “Returns”boolean
true if Syllable is closed
Set Signature
Section titled “Set Signature”set isClosed(
closed
):void
Defined in: syllable.ts:331
Sets whether the Syllable is closed
Parameters
Section titled “Parameters”Parameter | Type | Description |
---|---|---|
closed | boolean | a boolean for whether the Syllable is closed |
Returns
Section titled “Returns”void
isFinal
Section titled “isFinal”Get Signature
Section titled “Get Signature”get isFinal():
boolean
Defined in: syllable.ts:349
Checks if the Syllable is the final syllable in a Word
Example
Section titled “Example”const text = new Text("וַיִּקְרָ֨א");text.syllables[0].isFinal; // i.e. "וַ"// falsetext.syllables[2].isFinal; // i.e. "רָ֨א"// true
Returns
Section titled “Returns”boolean
true if Syllable is final
Set Signature
Section titled “Set Signature”set isFinal(
final
):void
Defined in: syllable.ts:358
Sets whether the Syllable is the final syllable in a Word
Parameters
Section titled “Parameters”Parameter | Type | Description |
---|---|---|
final | boolean | a boolean for whether the Syllable is the final Syallble |
Returns
Section titled “Returns”void
nucleus
Section titled “nucleus”Get Signature
Section titled “Get Signature”get nucleus():
string
Defined in: syllable.ts:376
Returns the nucleus of the syllable - see structure
Example
Section titled “Example”const text = new Text("יָ֥ם");text.syllables[0].nucleus;// "\u{05B8}\u{05A5}""
Remarks
Section titled “Remarks”The nucleus is the vowel of the syllable - present in every syllable and containing its vowel (with any materes lecticonis) or a shureq.
Returns
Section titled “Returns”string
the nucleus of the syllable as a string, including any taamim - see structure
Get Signature
Section titled “Get Signature”get onset():
string
Defined in: syllable.ts:394
Returns the onset of the syllable - see structure
Example
Section titled “Example”const text = new Text("יָ֥ם");text.syllables[0].onset;// "י"
Remarks
Section titled “Remarks”The onset is any initial consonant of the syllable - present in every syllable except those containing a except word-initial shureq or a furtive patah.
Returns
Section titled “Returns”string
the onset of the syllable as a string - see structure
siblings
Section titled “siblings”Get Signature
Section titled “Get Signature”get siblings():
Node
<T
>[]
Defined in: node.ts:63
Gets the siblings of this node.
Returns
Section titled “Returns”Node
<T
>[]
An array of Node
Set Signature
Section titled “Set Signature”set siblings(
arr
):void
Defined in: node.ts:47
Sets the siblings of this node. Establishes bidirectional links between adjacent nodes in the provided array.
Parameters
Section titled “Parameters”Parameter | Type | Description |
---|---|---|
arr | Node <T >[] | An array of Node |
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”taamim
Section titled “taamim”Get Signature
Section titled “Get Signature”get taamim(): (
"֑"
|"֒"
|"֓"
|"֔"
|"֕"
|"֖"
|"֗"
|"֘"
|"֙"
|"֚"
|"֛"
|"֜"
|"֝"
|"֞"
|"֟"
|"֠"
|"֡"
|"֢"
|"֣"
|"֤"
|"֥"
|"֦"
|"֧"
|"֨"
|"֩"
|"֪"
|"֫"
|"֬"
|"֭"
|"֮"
)[]
Defined in: syllable.ts:536
Gets all the taamim characters in the Syllable
Example
Section titled “Example”const text = new Text("הָאָ֖רֶץ");text.syllables[1].taamim;// ["\u{596}"]
Returns
Section titled “Returns”("֑"
| "֒"
| "֓"
| "֔"
| "֕"
| "֖"
| "֗"
| "֘"
| "֙"
| "֚"
| "֛"
| "֜"
| "֝"
| "֞"
| "֟"
| "֠"
| "֡"
| "֢"
| "֣"
| "֤"
| "֥"
| "֦"
| "֧"
| "֨"
| "֩"
| "֪"
| "֫"
| "֬"
| "֭"
| "֮"
)[]
a one dimensional array of taamim characters in the syllable
taamimNames
Section titled “taamimNames”Get Signature
Section titled “Get Signature”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: syllable.ts:552
Gets all the taamim names in the Syllable
Example
Section titled “Example”const text = new Text("הָאָ֖רֶץ");text.syllables[1].taamimNames;// ["TIPEHA"]
Returns
Section titled “Returns”("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"
)[]
a one dimensional array of taamim names in the syllable
Get Signature
Section titled “Get Signature”get text():
string
Defined in: syllable.ts:575
The text of the syllable
Example
Section titled “Example”const text = new Text("וַיִּקְרָ֨א");text.syllables.map((syl) => syl.text);// [// "וַ"// "יִּקְ"// "רָ֨א"// ]
Remarks
Section titled “Remarks”This returns a string that has been built up from the .text of its constituent Clusters.
Returns
Section titled “Returns”string
the sequenced and normalized text of the syllable
vowelNames
Section titled “vowelNames”Get Signature
Section titled “Get Signature”get vowelNames(): (
"HATAF_SEGOL"
|"HATAF_PATAH"
|"HATAF_QAMATS"
|"HIRIQ"
|"TSERE"
|"SEGOL"
|"PATAH"
|"QAMATS"
|"HOLAM"
|"HOLAM_HASER"
|"QUBUTS"
|"QAMATS_QATAN"
|"SHEVA"
|"SHUREQ"
)[]
Defined in: syllable.ts:598
Gets the names of the vowel characters in the syllable
Example
Section titled “Example”const text = new Text("מִתָּ֑͏ַ֜חַת");text.syllables[1].vowelNames;// ["QAMATS", "PATAH"]
Remarks
Section titled “Remarks”This returns an array of names of vowel characters in the syllable, but not for mater lectionis (e.g. a holam vav would return the HOLAM, not the vav).
The only exception is a shureq, which returns “SHUREQ” because there is no vowel character for a shureq.
It is very uncommon to have multiple vowel characters in a syllable.
According to Syllabification, a sheva is a vowel and serves as the nucleus of a syllable.
Unlike Cluster
, a Syllable
is concerned with linguistics, so a sheva is a vowel character.
Returns
Section titled “Returns”("HATAF_SEGOL"
| "HATAF_PATAH"
| "HATAF_QAMATS"
| "HIRIQ"
| "TSERE"
| "SEGOL"
| "PATAH"
| "QAMATS"
| "HOLAM"
| "HOLAM_HASER"
| "QUBUTS"
| "QAMATS_QATAN"
| "SHEVA"
| "SHUREQ"
)[]
an array of names of vowel characters in the syllable
vowels
Section titled “vowels”Get Signature
Section titled “Get Signature”get vowels(): (
"ֱ"
|"ֲ"
|"ֳ"
|"ִ"
|"ֵ"
|"ֶ"
|"ַ"
|"ָ"
|"ֹ"
|"ֺ"
|"ֻ"
|"ׇ"
|"ְ"
|"וּ"
)[]
Defined in: syllable.ts:634
Gets the vowel characters of the syllable
Example
Section titled “Example”const text = new Text("מִתָּ֑͏ַ֜חַת");text.syllables[1].vowels;// ["\u{05B8}", "\u{05B7}"]
Remarks
Section titled “Remarks”This returns a single vowel character, even for most mater lectionis (e.g. a holam vav would return the holam, not the vav).
The only exception is a shureq, which returns the vav and the dagesh because there is no vowel character for a shureq.
It is very uncommon to have multiple vowel characters in a syllable.
According to Syllabification, a sheva is a vowel and serves as the nucleus of a syllable.
Unlike Cluster
, a Syllable
is concerned with linguistics, so a sheva is a vowel character
Returns
Section titled “Returns”("ֱ"
| "ֲ"
| "ֳ"
| "ִ"
| "ֵ"
| "ֶ"
| "ַ"
| "ָ"
| "ֹ"
| "ֺ"
| "ֻ"
| "ׇ"
| "ְ"
| "וּ"
)[]
an array of vowel characters in the syllable
Get Signature
Section titled “Get Signature”get word():
null
|Word
Defined in: syllable.ts:673
Gets the Word to which the syllable belongs
Example
Section titled “Example”const text = new Text("הָאָ֖רֶץ");text.syllables[0].word;// Word {// text: "הָאָ֖רֶץ"// }
Returns
Section titled “Returns”null
| Word
the Word
to which the syllable belongs
Set Signature
Section titled “Set Signature”set word(
word
):void
Defined in: syllable.ts:682
Sets the Word to which the syllable belongs
Parameters
Section titled “Parameters”Parameter | Type | Description |
---|---|---|
word | null | Word | the Word to which the syllable belongs |
Returns
Section titled “Returns”void
Methods
Section titled “Methods”hasConsonantName()
Section titled “hasConsonantName()”hasConsonantName(
name
):boolean
Defined in: syllable.ts:207
Checks if the syllable contains the consonant character matching the name passed in
Parameters
Section titled “Parameters”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" |
Returns
Section titled “Returns”boolean
a boolean indicating if the syllable contains the consonant character matching the name passed in
Example
Section titled “Example”const text = new Text("רְ֭שָׁעִים");text.syllables[2].hasConsonantName("AYIN");// truetext.syllables[2].hasConsonantName("YOD");// false
Remarks
Section titled “Remarks”This checks if the syllable contains the given consonant name, even if the character is not a phonemic consonant.
hasTaamName()
Section titled “hasTaamName()”hasTaamName(
name
):boolean
Defined in: syllable.ts:266
Checks if the syllable contains the taamim character of the name passed in
Parameters
Section titled “Parameters”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" |
Returns
Section titled “Returns”boolean
a boolean indicating if the syllable contains the taamim character of the name passed in
Example
Section titled “Example”const text = new Text("הָאָ֖רֶץ");text.syllables[1].hasTaamName("TIPEHA");// true
Remarks
Section titled “Remarks”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()
Section titled “hasVowelName()”hasVowelName(
name
):boolean
Defined in: syllable.ts:242
Checks if the syllable contains the vowel character of the name passed in
Parameters
Section titled “Parameters”Parameter | Type |
---|---|
name | "HATAF_SEGOL" | "HATAF_PATAH" | "HATAF_QAMATS" | "HIRIQ" | "TSERE" | "SEGOL" | "PATAH" | "QAMATS" | "HOLAM" | "HOLAM_HASER" | "QUBUTS" | "QAMATS_QATAN" | "SHEVA" | "SHUREQ" |
Returns
Section titled “Returns”boolean
a boolean indicating if the syllable contains the vowel character of the name passed in
Example
Section titled “Example”const text = new Text("הַיְחָבְרְךָ");text.syllables[0].hasVowelName("PATAH");// true
// test for vocal shevatext.syllables[1].hasVowelName("SHEVA");// true
// test for silent shevatext.syllables[2].hasVowelName("SHEVA");// false
Remarks
Section titled “Remarks”This returns a boolean if the vowel character is present, even for most mater lectionis (e.g. in a holam vav construction, “HOLAM” would return true)
The only exception is a shureq, because there is no vowel character for a shureq.
According to Syllabification, a sheva is a vowel and serves as the nucleus of a syllable.
Unlike Cluster
, a Syllable
is concerned with linguistics, so a sheva is a vowel character.
It returns true
for “SHEVA” only when the sheva is the vowel (i.e. a vocal sheva or sheva na’).
structure()
Section titled “structure()”structure(
withGemination
): [string
,string
,string
]
Defined in: syllable.ts:421
Returns the structure of the syllable
Parameters
Section titled “Parameters”Parameter | Type | Default value | Description |
---|---|---|---|
withGemination | boolean | false | If this argument is true , include gemination of the next syllable’s onset in this syllable’s coda. |
Returns
Section titled “Returns”[string
, string
, string
]
the structure of the Syllable, i.e. the syllable’s onset, nucleus, and coda.
Example
Section titled “Example”const text = new Text("מַדּוּעַ");text.syllables.map(s => s.structure(true));// [// [ 'מ', 'ַ', 'דּ' ],// [ 'דּ', 'וּ', '' ], NOTE: the dalet is the onset, but rendering can sometimes causes the blank string to appear to be first// [ '', 'ַ', 'ע' ]// ]
Remarks
Section titled “Remarks”- The onset is any initial consonant of the syllable - present in every syllable except those containing a except word-initial shureq or a furtive patah.
- The nucleus is the vowel of the syllable - present in every syllable and containing its vowel (with any materes lecticonis) or a shureq.
- The coda is all final consonants of the syllable - not including any matres lecticonis, and including the onset of the subsequent syllable if the subsequent syllable is geminated and the
withGemination
argument istrue
.