Skip to main content

Class: InterlinearService

Defined in: Services/InterlinearService.ts:19

Service for formatting and processing interlinear data

Constructors

Constructor

new InterlinearService(): InterlinearService

Returns

InterlinearService

Methods

createStrongsTooltip()

static createStrongsTooltip(word): string

Defined in: Services/InterlinearService.ts:153

Create tooltip text for a Strong's number

Parameters

word

InterlinearWord

Returns

string


detectLanguage()

static detectLanguage(strongsNumber?): "Greek" | "Hebrew" | "Aramaic"

Defined in: Services/InterlinearService.ts:38

Detect language from Strong's number prefix

Parameters

strongsNumber?

string

Returns

"Greek" | "Hebrew" | "Aramaic"


formatForDisplay()

static formatForDisplay(words): FormattedInterlinearWord[]

Defined in: Services/InterlinearService.ts:23

Format interlinear words for display

Parameters

words

InterlinearWord[]

Returns

FormattedInterlinearWord[]


formatStrongsNumber()

static formatStrongsNumber(strongsNumber): string

Defined in: Services/InterlinearService.ts:95

Format Strong's number for display (remove prefix, pad with zeros)

Parameters

strongsNumber

string

Returns

string


getPartOfSpeechColor()

static getPartOfSpeechColor(morphCode?): string

Defined in: Services/InterlinearService.ts:75

Get color coding for part of speech

Parameters

morphCode?

string

Returns

string


getStatistics()

static getStatistics(words): object

Defined in: Services/InterlinearService.ts:136

Get interlinear statistics for a verse

Parameters

words

InterlinearWord[]

Returns

object

totalWords

totalWords: number

withGloss

withGloss: number

withMorphology

withMorphology: number

withStrongs

withStrongs: number


groupByPosition()

static groupByPosition(words): Map<number, InterlinearWord[]>

Defined in: Services/InterlinearService.ts:112

Group interlinear words by English word position Useful for inline display

Parameters

words

InterlinearWord[]

Returns

Map<number, InterlinearWord[]>


hasInterlinearData()

static hasInterlinearData(words): boolean

Defined in: Services/InterlinearService.ts:129

Check if a verse has interlinear data

Parameters

words

InterlinearWord[]

Returns

boolean


parseMorphology()

static parseMorphology(morphCode?): string

Defined in: Services/InterlinearService.ts:55

Parse morphology code into readable form

Parameters

morphCode?

string

Returns

string