Text
Defined in: text.ts:368
Processes and analyzes Hebrew text with niqqud, offering syllabification and breakdown into linguistic components (words, syllables, clusters, chars).
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new Text(
text
,options
):Text
Defined in: text.ts:397
Text
requires an input string,
and has optional arguments for syllabification,
which can be read about in the Syllabification page
Parameters
Section titled “Parameters”Parameter | Type | Description |
---|---|---|
text | string | input string |
options | SylOpts | syllabification options |
Returns
Section titled “Returns”Text
Accessors
Section titled “Accessors”Get Signature
Section titled “Get Signature”get chars():
Char
[]
Defined in: text.ts:620
Gets all the Chars in the Text
Returns
Section titled “Returns”Char
[]
a one dimensional array of Chars
const text: Text = new Text("יָד");text.chars;// [// Char { original: "י" },// Char { original: "ָ" },// Char { original: "ד" }// ]
clusters
Section titled “clusters”Get Signature
Section titled “Get Signature”get clusters():
Cluster
[]
Defined in: text.ts:638
Gets all the Clusters in the Text
Returns
Section titled “Returns”Cluster
[]
a one dimensional array of Clusters
const text: Text = new Text("יָד");text.clusters;// [// Cluster { original: "יָ" },// Cluster { original: "ד" }// ]
original
Section titled “original”Get Signature
Section titled “Get Signature”get original():
string
Defined in: text.ts:650
The original string passed
Remarks
Section titled “Remarks”The original string passed to the constructor that has not been normalized or sequenced. See text
Returns
Section titled “Returns”string
the original string passed
syllables
Section titled “syllables”Get Signature
Section titled “Get Signature”get syllables():
Syllable
[]
Defined in: text.ts:669
Gets all the Syllables in the Text
Returns
Section titled “Returns”Syllable
[]
a one dimensional array of Syllables
const text: Text = new Text("הֲבָרֹות");text.syllables;// [// Syllable { original: "הֲ" },// Syllable { original: "בָ" },// Syllable { original: "רֹות" }// ]
Get Signature
Section titled “Get Signature”get text():
string
Defined in: text.ts:686
Gets the text
Example
Section titled “Example”import { Text } from "havarotjs";const text = new Text("וַתָּשָׁב");text.text;// וַתָּשׇׁב
Returns
Section titled “Returns”string
a string that has been decomposed, sequenced, qamets qatan patterns converted to the appropriate unicode character (U+05C7), and holem-waw sequences corrected
Get Signature
Section titled “Get Signature”get words():
Word
[]
Defined in: text.ts:702
Gets all the Words in the Text
Example
Section titled “Example”const text = new Text("הֲבָרֹות");text.words;// [ Word { original: "הֲבָרֹות" } ]
Returns
Section titled “Returns”Word
[]
a one dimensional array of Words