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
4b202345
Commit
4b202345
authored
1 week ago
by
Aleksandras Kostarevas
Browse files
Options
Downloads
Patches
Plain Diff
Fix incorrect locale weighting
parent
e980343f
Branches
model-metadata
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
java/src/org/futo/inputmethod/latin/BinaryDictionary.java
+2
-1
2 additions, 1 deletion
java/src/org/futo/inputmethod/latin/BinaryDictionary.java
java/src/org/futo/inputmethod/latin/DictionaryFacilitatorImpl.java
+1
-1
1 addition, 1 deletion
...org/futo/inputmethod/latin/DictionaryFacilitatorImpl.java
with
3 additions
and
2 deletions
java/src/org/futo/inputmethod/latin/BinaryDictionary.java
+
2
−
1
View file @
4b202345
...
...
@@ -356,7 +356,8 @@ public final class BinaryDictionary extends Dictionary {
suggestions
.
add
(
new
SuggestedWordInfo
(
new
String
(
session
.
mOutputCodePoints
,
start
,
len
),
""
/* prevWordsContext */
,
(
int
)(
session
.
mOutputScores
[
j
]
*
weightForLocale
),
// TODO: 200.0f is an arbitrary number
(
int
)(
session
.
mOutputScores
[
j
]
-
(
200.0f
*
(
1.0f
-
weightForLocale
))),
session
.
mOutputTypes
[
j
],
this
/* sourceDict */
,
session
.
mSpaceIndices
[
j
]
/* indexOfTouchPointOfSecondWord */
,
...
...
This diff is collapsed.
Click to expand it.
java/src/org/futo/inputmethod/latin/DictionaryFacilitatorImpl.java
+
1
−
1
View file @
4b202345
...
...
@@ -138,7 +138,7 @@ public class DictionaryFacilitatorImpl implements DictionaryFacilitator {
// TODO: Run evaluation to determine a reasonable value for these constants. The current
// values are ad-hoc and chosen without any particular care or methodology.
public
static
final
float
WEIGHT_FOR_MOST_PROBABLE_LANGUAGE
=
1.0f
;
public
static
final
float
WEIGHT_FOR_GESTURING_IN_NOT_MOST_PROBABLE_LANGUAGE
=
0.
6
f
;
public
static
final
float
WEIGHT_FOR_GESTURING_IN_NOT_MOST_PROBABLE_LANGUAGE
=
0.
0
f
;
public
static
final
float
WEIGHT_FOR_TYPING_IN_NOT_MOST_PROBABLE_LANGUAGE
=
0.8f
;
/**
...
...
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