Documentation
¶
Index ¶
Constants ¶
const PStep = "recognition/post-correction"
const Version = "v0.0.34"
Version defines the version of apoco.
Variables ¶
This section is empty.
Functions ¶
func IDFromFilePath ¶
IDFromFilePath generates an id based on the file group and the file path.
Types ¶
type Config ¶ added in v0.0.29
type Config struct { Model string `json:"model,omitempty"` Ngrams string `json:"ngrams"` ProfilerBin string `json:"profilerBin"` ProfilerConfig string `json:"profilerConfig"` RRFeatures []string `json:"rrFeatures"` DMFeatures []string `json:"dmFeatures"` LearningRate float64 `json:"learningRate"` Ntrain int `json:"ntrain"` Nocr int `json:"nocr"` Cache bool `json:"cache"` Cautious bool `json:"cautious"` GT bool `json:"gt"` }
Config defines the command's configuration.
func ReadConfig ¶ added in v0.0.29
ReadConfig reads the config from a json or toml file. If the name is empty, an empty configuration file is returned. If name has the prefix '{' and the suffix '}' the name is interpreted as a json string and parsed accordingly (OCR-D compability).
type Stok ¶ added in v0.0.21
Stok represents a stats token. Stat tokens explain correction decisions of apoco.
func MakeStok ¶ added in v0.0.21
MakeStok creates a new stats token from a according formatted line.
func (Stok) Cause ¶ added in v0.0.27
Cause returns the cause of a correction error. There are 3 possibilities. Either the correction candidate was missing, the correct correction candidate was not selected by the reranker or the correct correction canidate would have been available but could not be selected because of the imposed limit of the number of correction candidates. If the limit smaller or equal to 0, no limit is imposed.
type StokType ¶ added in v0.0.27
type StokType int
StokType gives the type of stoks.
const ( SkippedShort StokType = iota // Skipped short token. SkippedShortErr // Error in short token. SkippedNoCand // Skipped no canidate token. SkippedNoCandErr // Error in skipped no candidate token. SkippedLex // Skipped lexical token. FalseFriend // Error in skipped lexical token (false friend). SuspiciousReplacedCorrect // Redundant correction. InfelicitousCorrection // Infelicitous correction. SuccessfulCorrection // Successful correction. DoNotCareCorrection // Do not care correction. SuspiciousNotReplacedCorrect // Accept OCR. DodgedBullet // Dogded bullet. MissedOpportunity // Missed opportunity. SuspiciousNotReplacedNotCorrectErr // Skipped do not care. )