1
0
Fork 0

simpler and faster idiogram frequency updating

This commit is contained in:
sspanak 2025-04-12 21:00:54 +03:00 committed by Dimo Karaivanov
parent b08431ef1b
commit 6469444cc6

View file

@ -63,10 +63,13 @@ public class IdeogramPredictions extends WordPredictions {
} }
/**
* Here we don't need to generate a new digit sequence, because either the word was an exact search
* match (the digit sequence is the current one), or it was a fuzzy match (a longer sequence), that
* must not cause a frequency change, because it belongs to a different position group.
*/
public void onAcceptIdeogram(String word) throws InvalidLanguageCharactersException { public void onAcceptIdeogram(String word) throws InvalidLanguageCharactersException {
String transcription = getTranscription(word); super.onAccept(getTranscription(word) + word, digitSequence);
String sequence = language.getDigitSequenceForWord(transcription);
super.onAccept(transcription + word, sequence);
} }