Skip to content

Text

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

Constructors

new Text()

new Text(text, options?): Text

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

Parameters

ParameterTypeDescription
textstringinput string
options?SylOptssyllabification options

Returns

Text

Defined in

node_modules/havarotjs/dist/types/text.d.ts:369

Accessors

chars

get chars(): Char[]

Gets all the Char | 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: "ד" }
// ]

Defined in

node_modules/havarotjs/dist/types/text.d.ts:385


clusters

get clusters(): Cluster[]

Gets all the Cluster | Clusters in the Text

Returns

Cluster[]

a one dimensional array of Clusters

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

Defined in

node_modules/havarotjs/dist/types/text.d.ts:400


original

get original(): string

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

Defined in

node_modules/havarotjs/dist/types/text.d.ts:409


syllables

get syllables(): Syllable[]

Gets all the Syllable | 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: "רֹות" }
// ]

Defined in

node_modules/havarotjs/dist/types/text.d.ts:425


text

get text(): string

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

Defined in

node_modules/havarotjs/dist/types/text.d.ts:439


words

get words(): Word[]

Gets all the Word | Words in the Text

Example

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

Returns

Word[]

a one dimensional array of Words

Defined in

node_modules/havarotjs/dist/types/text.d.ts:452