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
3d97b95b
Commit
3d97b95b
authored
11 years ago
by
Satoshi Kataoka
Browse files
Options
Downloads
Patches
Plain Diff
Implement KIND_OOV_CORRECTION
Bug: 9127749 Change-Id: I96db15a3138e6b522c4c6ad16cc7faad577d3772
parent
a2d8d30f
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
java/src/com/android/inputmethod/latin/LatinIME.java
+5
-3
5 additions, 3 deletions
java/src/com/android/inputmethod/latin/LatinIME.java
java/src/com/android/inputmethod/latin/SuggestedWords.java
+4
-1
4 additions, 1 deletion
java/src/com/android/inputmethod/latin/SuggestedWords.java
with
9 additions
and
4 deletions
java/src/com/android/inputmethod/latin/LatinIME.java
+
5
−
3
View file @
3d97b95b
...
@@ -2369,9 +2369,11 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
...
@@ -2369,9 +2369,11 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
// Please note that if mSuggest is null, it means that everything is off: suggestion
// Please note that if mSuggest is null, it means that everything is off: suggestion
// and correction, so we shouldn't try to show the hint
// and correction, so we shouldn't try to show the hint
final
boolean
showingAddToDictionaryHint
=
final
boolean
showingAddToDictionaryHint
=
SuggestedWordInfo
.
KIND_TYPED
==
suggestionInfo
.
mKind
&&
mSuggest
!=
null
(
SuggestedWordInfo
.
KIND_TYPED
==
suggestionInfo
.
mKind
// If the suggestion is not in the dictionary, the hint should be shown.
||
SuggestedWordInfo
.
KIND_OOV_CORRECTION
==
suggestionInfo
.
mKind
)
&&
!
AutoCorrection
.
isValidWord
(
mSuggest
,
suggestion
,
true
);
&&
mSuggest
!=
null
// If the suggestion is not in the dictionary, the hint should be shown.
&&
!
AutoCorrection
.
isValidWord
(
mSuggest
,
suggestion
,
true
);
if
(
mSettings
.
isInternal
())
{
if
(
mSettings
.
isInternal
())
{
Stats
.
onSeparator
((
char
)
Constants
.
CODE_SPACE
,
Stats
.
onSeparator
((
char
)
Constants
.
CODE_SPACE
,
...
...
This diff is collapsed.
Click to expand it.
java/src/com/android/inputmethod/latin/SuggestedWords.java
+
4
−
1
View file @
3d97b95b
...
@@ -132,7 +132,10 @@ public final class SuggestedWords {
...
@@ -132,7 +132,10 @@ public final class SuggestedWords {
public
static
final
int
KIND_APP_DEFINED
=
6
;
// Suggested by the application
public
static
final
int
KIND_APP_DEFINED
=
6
;
// Suggested by the application
public
static
final
int
KIND_SHORTCUT
=
7
;
// A shortcut
public
static
final
int
KIND_SHORTCUT
=
7
;
// A shortcut
public
static
final
int
KIND_PREDICTION
=
8
;
// A prediction (== a suggestion with no input)
public
static
final
int
KIND_PREDICTION
=
8
;
// A prediction (== a suggestion with no input)
public
static
final
int
KIND_RESUMED
=
9
;
// A resumed suggestion (comes from a span)
// KIND_RESUMED: A resumed suggestion (comes from a span, currently this type is used only
// in java for re-correction)
public
static
final
int
KIND_RESUMED
=
9
;
public
static
final
int
KIND_OOV_CORRECTION
=
10
;
// Most probable string correction
public
static
final
int
KIND_MASK_FLAGS
=
0xFFFFFF00
;
// Mask to get the flags
public
static
final
int
KIND_MASK_FLAGS
=
0xFFFFFF00
;
// Mask to get the flags
public
static
final
int
KIND_FLAG_POSSIBLY_OFFENSIVE
=
0x80000000
;
public
static
final
int
KIND_FLAG_POSSIBLY_OFFENSIVE
=
0x80000000
;
...
...
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