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
f08f3017
Commit
f08f3017
authored
13 years ago
by
Jean Chalard
Browse files
Options
Downloads
Patches
Plain Diff
Reduction, step 1
Change-Id: Ic3ed04300cfd4c0b69b93b27379aca4093b32f67
parent
de165aed
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
java/src/com/android/inputmethod/latin/Suggest.java
+7
-7
7 additions, 7 deletions
java/src/com/android/inputmethod/latin/Suggest.java
with
7 additions
and
7 deletions
java/src/com/android/inputmethod/latin/Suggest.java
+
7
−
7
View file @
f08f3017
...
...
@@ -266,13 +266,13 @@ public class Suggest implements Dictionary.WordCallback {
final
WordComposer
wordComposer
=
sEmptyWordComposer
;
LatinImeLogger
.
onStartSuggestion
(
prevWordForBigram
);
mIsFirstCharCapitalized
=
wordComposer
.
isFirstCharCapitalized
()
;
mIsAllUpperCase
=
wordComposer
.
isAllUpperCase
()
;
mTrailingSingleQuotesCount
=
wordComposer
.
trailingSingleQuotesCount
()
;
mIsFirstCharCapitalized
=
false
;
mIsAllUpperCase
=
false
;
mTrailingSingleQuotesCount
=
0
;
collectGarbage
(
mSuggestions
,
mPrefMaxSuggestions
);
Arrays
.
fill
(
mScores
,
0
);
final
String
typedWord
=
wordComposer
.
getTypedWord
()
;
final
String
typedWord
=
""
;
final
String
consideredWord
=
mTrailingSingleQuotesCount
>
0
?
typedWord
.
substring
(
0
,
typedWord
.
length
()
-
mTrailingSingleQuotesCount
)
:
typedWord
;
...
...
@@ -287,9 +287,9 @@ public class Suggest implements Dictionary.WordCallback {
// a boolean flag. Right now this is handled with a slight hack in
// WhitelistDictionary#shouldForciblyAutoCorrectFrom.
final
boolean
allowsToBeAutoCorrected
=
AutoCorrection
.
allowsToBeAutoCorrected
(
getUnigramDictionaries
(),
consideredWord
,
wordComposer
.
isFirstCharCapitalized
()
);
getUnigramDictionaries
(),
consideredWord
,
false
);
if
(
wordComposer
.
size
()
<=
1
&&
(
correctionMode
==
CORRECTION_FULL_BIGRAM
))
{
if
(
0
<=
1
&&
(
correctionMode
==
CORRECTION_FULL_BIGRAM
))
{
// At first character typed, search only the bigrams
Arrays
.
fill
(
mBigramScores
,
0
);
collectGarbage
(
mBigramSuggestions
,
PREF_MAX_BIGRAMS
);
...
...
@@ -327,7 +327,7 @@ public class Suggest implements Dictionary.WordCallback {
}
}
}
else
if
(
wordComposer
.
size
()
>
1
)
{
}
else
if
(
0
>
1
)
{
// At second character typed, search the unigrams (scores being affected by bigrams)
for
(
final
String
key
:
mUnigramDictionaries
.
keySet
())
{
// Skip UserUnigramDictionary and WhitelistDictionary to lookup
...
...
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