Text
Defined in: text.ts:369
Processes and analyzes Hebrew text with niqqud, offering syllabification and breakdown into linguistic components (words, syllables, clusters, chars).
Extends
Section titled “Extends”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new Text(
text,options?):Text
Defined in: text.ts:398
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
Overrides
Section titled “Overrides”Properties
Section titled “Properties”children
Section titled “children”Defined in: node.ts:21
Collection of child nodes.
Inherited from
Section titled “Inherited from”next:
Node<Text,null,null> |null=null
Defined in: node.ts:11
Next sibling in the sequence.
Inherited from
Section titled “Inherited from”parent
Section titled “parent”parent:
Node<null,any,any> |null=null
Defined in: node.ts:18
Reference to the parent container.
Inherited from
Section titled “Inherited from”prev:
Node<Text,null,null> |null=null
Defined in: node.ts:13
Previous sibling in the sequence.
Inherited from
Section titled “Inherited from”value:
Text|null=null
Defined in: node.ts:15
Node data.
Inherited from
Section titled “Inherited from”Accessors
Section titled “Accessors”Get Signature
Section titled “Get Signature”get chars():
Char[]
Defined in: text.ts:622
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:640
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:652
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
siblings
Section titled “siblings”Get Signature
Section titled “Get Signature”get siblings():
Node<Self,Child,any>[]
Defined in: node.ts:45
Retrieves all subsequent nodes in the current sibling chain.
Returns
Section titled “Returns”Node<Self, Child, any>[]
Set Signature
Section titled “Set Signature”set siblings(
arr):void
Defined in: node.ts:29
Connects an array of nodes as a doubly-linked sibling chain starting after this node.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
arr |
Node<Self, Child, any>[] |
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”syllables
Section titled “syllables”Get Signature
Section titled “Get Signature”get syllables():
Syllable[]
Defined in: text.ts:671
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:688
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:704
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