output

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2026 License: MIT Imports: 13 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Meta

type Meta struct {
	Index  int // Position of field in the struct
	Name   string
	Tag    string
	Dtype  string // Only used by json_writer to control double quotes
	CSVPos int    // Position of field in CSV output
	Cols   int
}

type Output

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

func NewOutput

func NewOutput(ctx context.Context, conn db.DBAdapter, reqName string, normalize bool, pad bool) Output

func (*Output) CSVStatus

func (o *Output) CSVStatus(status log.Status, debug bool) (string, *log.Status)

func (*Output) ConvertScriptsAny

func (o *Output) ConvertScriptsAny(structs []Script) []any

func (*Output) ConvertWordsAny

func (o *Output) ConvertWordsAny(structs []Word) []any

func (*Output) FindActiveCols

func (o *Output) FindActiveCols(structs []any, meta []Meta) []Meta

func (*Output) FindNumScriptMFCC

func (o *Output) FindNumScriptMFCC(structs []Script) int

func (*Output) FindNumWordEnc

func (o *Output) FindNumWordEnc(structs []Word, meta *[]Meta)

func (*Output) FindNumWordMFCC

func (o *Output) FindNumWordMFCC(structs []Word) int

func (*Output) FormatReference

func (o *Output) FormatReference(bookId string, chapterNum int, chapterEnd int, verseStr string, verseEnd string) string

func (*Output) JSONStatus

func (o *Output) JSONStatus(status log.Status, debug bool) (string, *log.Status)

func (*Output) LoadScriptStruct

func (o *Output) LoadScriptStruct(d db.DBAdapter) ([]Script, *log.Status)

func (*Output) LoadWordStruct

func (o *Output) LoadWordStruct(d db.DBAdapter) ([]Word, *log.Status)

func (*Output) NormalizeScriptMFCC

func (o *Output) NormalizeScriptMFCC(structs []Script, numMFCC int) []Script

func (*Output) NormalizeWordMFCC

func (o *Output) NormalizeWordMFCC(structs []Word, numMFCC int) []Word

func (*Output) PadScriptRows

func (o *Output) PadScriptRows(structs []Script, numMFCC int) []Script

func (*Output) PadWordRows

func (o *Output) PadWordRows(structs []Word, numMFCC int) []Word

func (*Output) PrepareScripts

func (o *Output) PrepareScripts() ([]any, []Meta)

func (*Output) PrepareWords

func (o *Output) PrepareWords() ([]any, []Meta)

func (*Output) ReflectStruct

func (o *Output) ReflectStruct(aStruct any) []Meta

func (*Output) SetCSVPos

func (o *Output) SetCSVPos(meta *[]Meta)

func (*Output) SetNumMFCC

func (o *Output) SetNumMFCC(meta *[]Meta, numMFCC int)

func (*Output) ToString

func (o *Output) ToString(value reflect.Value) string

ToString converts scalar values to string. It does not convert the following kind. reflect.Uintptr, reflect.Complex64, reflect.Complex128, reflect.Struct, reflect.Array, reflect.Slice, reflect.Chan, reflect.Func, reflect.Interface, reflect.Invalid

func (*Output) ToValue

func (o *Output) ToValue(value reflect.Value) any

func (*Output) WriteCSV

func (o *Output) WriteCSV(structs []any, meta []Meta) (string, *log.Status)

func (*Output) WriteJSON

func (o *Output) WriteJSON(structs []any, meta []Meta) (string, *log.Status)

type Script

type Script struct {
	ScriptId      int     `name:"script_id,int"`
	Reference     string  `name:"reference,string"`
	BookId        string  `name:"book_id,string"`
	ChapterNum    int     `name:"chapter_num,int"`
	ChapterEnd    int     `name:"chapter_end,int"`
	AudioFile     string  `name:"audio_file,string"`
	ScriptNum     string  `name:"script_num,string"`
	UsfmStyle     string  `name:"usfm_style,string"`
	Person        string  `name:"person,string"`
	Actor         string  `name:"actor,string"`
	VerseStr      string  `name:"verse_str,string"`
	VerseEnd      string  `name:"verse_end,string"`
	ScriptText    string  `name:"script_text,string"`
	ScriptBeginTS float64 `name:"script_begin_ts,float64"`
	ScriptEndTS   float64 `name:"script_end_ts,float64"`
	MFCCRows      int
	MFCCCols      int
	MFCC          [][]float64 `name:"mfcc,[][]float64"`
}

type Word

type Word struct {
	WordId      int       `name:"word_id,int"`
	ScriptId    int       `name:"script_id,int"`
	Reference   string    `name:"reference,string"`
	BookId      string    `name:"book_id,string"`
	ChapterNum  int       `name:"chapter_num,int"`
	ChapterEnd  int       `name:"chapter_end,int"`
	VerseStr    string    `name:"verse_str,string"`
	VerseEnd    string    `name:"verse_end,string"`
	VerseNum    int       `name:"verse_num,int"`
	UsfmStyle   string    `name:"usfm_style,string"`
	Person      string    `name:"person,string"`
	Actor       string    `name:"actor,string"`
	WordSeq     int       `name:"word_seq,int"`
	Word        string    `name:"word,string"`
	WordBeginTS float64   `name:"word_begin_ts,float64"`
	WordEndTS   float64   `name:"word_end_ts,float64"`
	WordEnc     []float64 `name:"word_enc,float64"`
	MFCCRows    int
	MFCCCols    int
	MFCC        [][]float64 `name:"mfcc,[][]float64"`
}

Jump to

Keyboard shortcuts

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