Skip to content

Text

Defined in: text.ts:368

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:397

Text requires an input string, and has optional arguments for syllabification, which can be read about in the Syllabification page

ParameterTypeDescription
textstringinput string
optionsSylOptssyllabification options

Text

get chars(): Char[]

Defined in: text.ts:620

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:638

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:650

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

Defined in: text.ts:669

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:686

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:702

Gets all the Words in the Text

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

Word[]

a one dimensional array of Words