Text
Defined in: text.ts:367
Processes and analyzes Hebrew text with niqqud, offering syllabification and breakdown into linguistic components (words, syllables, clusters, chars).
Constructors
Constructor
new Text(
text
,options
):Text
Defined in: text.ts:396
Text
requires an input string,
and has optional arguments for syllabification,
which can be read about in the Syllabification page
Parameters
Parameter | Type | Description |
---|---|---|
text | string | input string |
options | SylOpts | syllabification options |
Returns
Text
Accessors
chars
Get Signature
get chars():
Char
[]
Defined in: text.ts:618
Gets all the Chars in the Text
Returns
Char
[]
a one dimensional array of Chars
const text: Text = new Text("יָד");text.chars;// [// Char { original: "י" },// Char { original: "ָ" },// Char { original: "ד" }// ]
clusters
Get Signature
get clusters():
Cluster
[]
Defined in: text.ts:636
Gets all the Clusters in the Text
Returns
Cluster
[]
a one dimensional array of Clusters
const text: Text = new Text("יָד");text.clusters;// [// Cluster { original: "יָ" },// Cluster { original: "ד" }// ]
original
Get Signature
get original():
string
Defined in: text.ts:648
The original string passed
Remarks
The original string passed to the constructor that has not been normalized or sequenced. See text
Returns
string
the original string passed
syllables
Get Signature
get syllables():
Syllable
[]
Defined in: text.ts:667
Gets all the Syllables in the Text
Returns
Syllable
[]
a one dimensional array of Syllables
const text: Text = new Text("הֲבָרֹות");text.syllables;// [// Syllable { original: "הֲ" },// Syllable { original: "בָ" },// Syllable { original: "רֹות" }// ]
text
Get Signature
get text():
string
Defined in: text.ts:684
Gets the text
Example
import { Text } from "havarotjs";const text = new Text("וַתָּשָׁב");text.text;// וַתָּשׇׁב
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
words
Get Signature
get words():
Word
[]
Defined in: text.ts:700
Gets all the Words in the Text
Example
const text = new Text("הֲבָרֹות");text.words;// [ Word { original: "הֲבָרֹות" } ]
Returns
Word
[]
a one dimensional array of Words