Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
LatinIME
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
keyboard
LatinIME
Commits
14a84667
Commit
14a84667
authored
1 year ago
by
Aleksandras Kostarevas
Browse files
Options
Downloads
Patches
Plain Diff
Fix input connection termination crash case
parent
88403fad
No related branches found
No related tags found
2 merge requests
!7
Merge model-metadata to master
,
!4
Merge lm-2-finetuning-whisperggml into lm-2-finetuning
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
java/src/org/futo/inputmethod/latin/xlm/LanguageModelFacilitator.kt
+22
-12
22 additions, 12 deletions
...rg/futo/inputmethod/latin/xlm/LanguageModelFacilitator.kt
with
22 additions
and
12 deletions
java/src/org/futo/inputmethod/latin/xlm/LanguageModelFacilitator.kt
+
22
−
12
View file @
14a84667
...
...
@@ -177,19 +177,29 @@ public class LanguageModelFacilitator(
return
}
val
wordComposer
=
inputLogic
.
mWordComposer
val
ngramContext
=
inputLogic
.
getNgramContextFromNthPreviousWordForSuggestion
(
settingsValues
.
mSpacingAndPunctuations
,
2
)
val
values
=
PredictionInputValues
(
wordComposer
.
getComposedDataSnapshot
(),
ngramContext
,
inputStyle
,
++
currentSequenceId
)
if
(!
inputLogic
.
mConnection
.
isConnected
)
return
try
{
val
wordComposer
=
inputLogic
.
mWordComposer
val
ngramContext
=
inputLogic
.
getNgramContextFromNthPreviousWordForSuggestion
(
settingsValues
.
mSpacingAndPunctuations
,
2
)
val
values
=
PredictionInputValues
(
wordComposer
.
composedDataSnapshot
,
ngramContext
,
inputStyle
,
++
currentSequenceId
)
lifecycleScope
.
launch
{
println
(
"LatinIME: Emitting values"
)
sharedFlow
.
emit
(
values
)
lifecycleScope
.
launch
{
println
(
"LatinIME: Emitting values"
)
sharedFlow
.
emit
(
values
)
}
}
catch
(
e
:
Exception
)
{
println
(
"Failed to get context, composed data snapshot, etc: $e"
)
e
.
printStackTrace
()
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment