First real commit. Setting up for full CI/CD and testing pipeline

This commit is contained in:
2026-11-04 22:30:59 +01:00
parent cbb843344e
commit e08c997914
26 changed files with 3561 additions and 198 deletions

20
internal/reader/orp.go Normal file
View File

@@ -0,0 +1,20 @@
package reader
// ORPIndex calculates the approximate optimal recognition
// point of a word.
//
// The returned value is a zero-based rune index.
func ORPIndex(runes []rune) int {
length := len(runes)
switch {
case length <= 1:
return 0
case length <= 5:
return 1
case length <= 9:
return 2
default:
return 3
}
}