diff

package
v0.0.0-...-087c9b4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 25, 2026 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Compare

type Compare struct {
	// contains filtered or unexported fields
}

func NewCompare

func NewCompare(ctx context.Context, user string, baseDSet string, db db.DBAdapter,
	lang string, testament request.Testament, settings request.CompareSettings) Compare

func (*Compare) CompareASR2

func (a *Compare) CompareASR2() ([]Pair, string, string, *log.Status)

func (*Compare) CompareChapters

func (c *Compare) CompareChapters() ([]Pair, string, *log.Status)

CompareChapters deprecated 3/6/2025. It was determined to not be necessary

func (*Compare) Process

func (c *Compare) Process() ([]Pair, string, string, *log.Status)

func (*Compare) SetIsLatin

func (c *Compare) SetIsLatin(records []db.Script)

type HTMLWriter

type HTMLWriter struct {
	// contains filtered or unexported fields
}

func NewHTMLWriter

func NewHTMLWriter(ctx context.Context, datasetName string) HTMLWriter

func (*HTMLWriter) WriteEnd

func (h *HTMLWriter) WriteEnd(filenameMap string)

func (*HTMLWriter) WriteHeading

func (h *HTMLWriter) WriteHeading(baseDataset string, languageISO string, model string) string

func (*HTMLWriter) WriteLine

func (h *HTMLWriter) WriteLine(verse Pair)

func (*HTMLWriter) WriteReport

func (h *HTMLWriter) WriteReport(baseDataset string, records []Pair, languageISO string, fileMap string,
	asr request.SpeechToText) (string, *log.Status)

type Pair

type Pair struct {
	Ref       generic.VerseRef      `json:"ref"`
	ScriptNum string                `json:"script_num"`
	AudioFile string                `json:"audio_file"`
	BeginTS   float64               `json:"begin_ts"`
	EndTS     float64               `json:"end_ts"`
	Base      PairText              `json:"base"`
	Comp      PairText              `json:"comp"`
	Diffs     []diffmatchpatch.Diff `json:"diffs"`
	HTML      string                `json:"html""`
}

func GordonFilter

func GordonFilter(ctx context.Context, pairs []Pair, user string, dbPath string, matchThreshold int) ([]Pair, *log.Status)

func NewPair

func NewPair(base *Verse, comp *Verse) Pair

func (*Pair) Deletes

func (p *Pair) Deletes() int

func (*Pair) ErrorPct

func (p *Pair) ErrorPct(inserts int, deletes int) float64

func (*Pair) Inserts

func (p *Pair) Inserts() int

func (*Pair) LargestLength

func (p *Pair) LargestLength() int

func (*Pair) ScriptId

func (p *Pair) ScriptId() int

func (*Pair) Text

func (p *Pair) Text(isLatin sql.NullBool) (string, string)

type PairText

type PairText struct {
	ScriptId int    `json:"script_id"`
	Text     string `json:"text"`
	Uroman   string `json:"uroman"`
}

type Verse

type Verse struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL