Files
Speech/apps/api/internal/domain/pronunciation.go
T
Eugenius Naumenko 16cceae28a Muttersprache koppeln und russischen A1-Kurs ergänzen
GUI und neue Erklärungen verwenden gemeinsam native_language. Deutsch und
Russisch sind die beiden Muttersprachen; Englisch bleibt die Lernsprache.
Kompatibilitätsfelder werden atomar gekoppelt, widersprüchliche Eingaben
abgewiesen und bestehende Profile sowie eingefrorene Inhalte erhalten.

Ergänzt vollständige russische GUI-Kataloge und 840 geprüfte Aufgabenansichten
in sieben Modulen einschließlich A1-Test, mit getrennten Sprachrollen für
Ausgangs- und Lernmaterial. Äquivalente Ansichten teilen ihre Nachweisidentität.
Stabile API-Fehlercodes, neue deterministische Hilfen und Trainingsbegründungen
berücksichtigen die Muttersprache. Dokumentiert das Sprachmodell in AGENTS.md.

Validierung: Go-Race-Suite mit eigener lokaler PostgreSQL-Testdatenbank, go vet,
Web-Build, Offline-Bank-/Variantenaudit, Diff-Prüfung sowie lokale Browser-Smokes
für Sprachen, Kurs, Administration, Aussprache und Aufnahme. Keine Live-Anbieter,
Produktionsprofile, Deployment-Schritte oder historischen Neubewertungen.
2026-11-07 17:02:17 +00:00

75 lines
3.1 KiB
Go

package domain
import "time"
const PronunciationAlgorithm = "pronunciation-v1"
type PronunciationObservation struct {
AssessmentID string `json:"assessment_id"`
ExerciseID string `json:"exercise_id"`
Language string `json:"language"`
Locale string `json:"locale"`
Alphabet string `json:"alphabet"`
Kind string `json:"kind"`
Symbol string `json:"symbol"`
Word string `json:"word"`
WordIndex int `json:"word_index"`
PhonemeIndex int `json:"phoneme_index"`
Accuracy float64 `json:"accuracy"`
At time.Time `json:"at"`
}
type PronunciationExample struct {
Word string `json:"word"`
Mean float64 `json:"mean"`
Samples int `json:"samples"`
}
type PronunciationTarget struct {
Key string `json:"key"`
Kind string `json:"kind"`
Locale string `json:"locale"`
Alphabet string `json:"alphabet"`
Symbol string `json:"symbol"`
Mean float64 `json:"mean"`
WeakRate float64 `json:"weak_rate"`
Observations int `json:"observations"`
Samples int `json:"samples"`
Recordings int `json:"recordings"`
Tasks int `json:"tasks"`
Words int `json:"words"`
State string `json:"state"`
Trend string `json:"trend"`
LastSeen time.Time `json:"last_seen"`
NextReview *time.Time `json:"next_review,omitempty"`
ReviewDue bool `json:"review_due"`
Examples []PronunciationExample `json:"examples"`
Priority float64 `json:"priority"`
}
type PronunciationProfile struct {
Algorithm string `json:"algorithm"`
Language string `json:"language"`
AsOf time.Time `json:"as_of"`
WindowDays int `json:"window_days"`
ConfirmedRecordings int `json:"confirmed_recordings"`
UnverifiedHistory int `json:"unverified_history"`
Targets []PronunciationTarget `json:"targets"`
}
type PronunciationPlan struct {
NativeLanguage string `json:"native_language,omitempty"`
ID string `json:"id"`
Algorithm string `json:"algorithm"`
Language string `json:"language"`
Category string `json:"category"`
Mode string `json:"mode"`
Reason string `json:"reason"`
Target *PronunciationTarget `json:"target,omitempty"`
RequiredWords []string `json:"required_practice_words"`
KnownWords []string `json:"known_words"`
CandidateWord string `json:"candidate_word,omitempty"`
TransferStatus string `json:"transfer_status,omitempty"`
CreatedAt time.Time `json:"created_at"`
}