Versions in this module Expand all Collapse all v1 v1.2.0 Nov 19, 2026 Changes in this version + func DiffMatchPatch(refText string, asrText string) []diffmatchpatch.Diff + func DiffPrettyHtml(diffs []diffmatchpatch.Diff) string + func ErrorCount(diffs []CDiff) int + func IsHyphen(ch rune) bool + func IsLikeApostrophe(ch rune) bool + func IsMatch(diffs []diffmatchpatch.Diff) bool + func ReadableDiff(diffs []Diff) string + type CDiff struct + Char rune + Replace rune + Type Operation + func CharDiff(refText string, asrText string) []CDiff + func CharLevenshtein(refText string, asrText string) []CDiff + func Diff2CDiff(diffs []Diff) []CDiff + type Counts struct + Deletions int + Hits int + Insertions int + RefLen int + Substitutions int + func Count(diffs []CDiff) Counts + func CountDiff(diffs []Diff) Counts + func CountWords(diffs []Diff) Counts + func (c *Counts) Add(cnt Counts) + func (c *Counts) ErrorCount() int + func (c *Counts) ErrorRate() float64 + type Diff struct + Replace string + Text string + Type Operation + func Convert2Diff(diffs []diffmatchpatch.Diff) []Diff + func DiffConvert(refText string, asrText string) []Diff + func DiffReplace(refText string, asrText string) []Diff + func WordLevenshtein(refText string, asrText string) []Diff + type Operation int + const OpDelete + const OpEqual + const OpInsert + const OpReplace + func (op Operation) String() string