Skip to content

Text

Defined in: text.ts:369

Processes and analyzes Hebrew text with niqqud, offering syllabification and breakdown into linguistic components (words, syllables, clusters, chars).

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

Parameter Type Description
text string input string
options SylOpts syllabification options

Text

Node.constructor

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

Defined in: node.ts:21

Collection of child nodes.

Node.children


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

Defined in: node.ts:11

Next sibling in the sequence.

Node.next


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

Defined in: node.ts:18

Reference to the parent container.

Node.parent


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

Defined in: node.ts:13

Previous sibling in the sequence.

Node.prev


value: Text | null = null

Defined in: node.ts:15

Node data.

Node.value

get chars(): Char[]

Defined in: text.ts:622

Gets all the Chars in the Text

Char[]

a one dimensional array of Chars

const text: Text = new Text("יָד");
text.chars;
// [
// Char { original: "י" },
// Char { original: "ָ" },
// Char { original: "ד" }
// ]

get clusters(): Cluster[]

Defined in: text.ts:640

Gets all the Clusters in the Text

Cluster[]

a one dimensional array of Clusters

const text: Text = new Text("יָד");
text.clusters;
// [
// Cluster { original: "יָ" },
// Cluster { original: "ד" }
// ]

get original(): string

Defined in: text.ts:652

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 syllables(): Syllable[]

Defined in: text.ts:671

Gets all the Syllables in the Text

Syllable[]

a one dimensional array of Syllables

const text: Text = new Text("הֲבָרֹות");
text.syllables;
// [
// Syllable { original: "הֲ" },
// Syllable { original: "בָ" },
// Syllable { original: "רֹות" }
// ]

get text(): string

Defined in: text.ts:688

Gets the text

import { Text } from "havarotjs";
const text = new Text("וַתָּשָׁב");
text.text;
// וַתָּשׇׁב

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 words(): Word[]

Defined in: text.ts:704

Gets all the Words in the Text

const text = new Text("הֲבָרֹות");
text.words;
// [ Word { original: "הֲבָרֹות" } ]

Word[]

a one dimensional array of Words