wordstats

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type WordStats

type WordStats struct {
	Checked   chan string
	Corrected chan [2]string
	// contains filtered or unexported fields
}

WordStats stores counters for words checked and words corrected

func RunStats added in v0.4.7

func RunStats() *WordStats

OpenWordStats creates a new wordStats struct

func (*WordStats) CalcAccuracy

func (w *WordStats) CalcAccuracy() float64

CalcAccuracy returns the "accuracy" for the current session accuracy is measured as how close to not correcting any words

func (*WordStats) CloseWordStats

func (w *WordStats) CloseWordStats()

CloseWordStats closes the stats database cleanly

func (*WordStats) GetCheckedTotal

func (w *WordStats) GetCheckedTotal() uint64

GetCheckedTotal fetches the total number of checked words from the database

func (*WordStats) GetCorrectedTotal

func (w *WordStats) GetCorrectedTotal() uint64

GetCorrectedTotal fetches the total number of corrected words from the database

func (*WordStats) GetStats

func (w *WordStats) GetStats() string

GetStats returns top-level statistics about corrections as a formatted string

func (*WordStats) ShowLog

func (w *WordStats) ShowLog()

ShowLog prints out the full log of corrections history

func (*WordStats) ShowStats

func (w *WordStats) ShowStats()

ShowStats logs top-level statistics about corrections

Jump to

Keyboard shortcuts

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