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
d8afa2fb
Commit
d8afa2fb
authored
12 years ago
by
Jean Chalard
Browse files
Options
Downloads
Patches
Plain Diff
Remove the ultimate code duplication (A111)
Change-Id: I7c76613df8f148feb02765f187db3ca6dc577977
parent
3b57631b
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
+5
-14
5 additions, 14 deletions
java/src/com/android/inputmethod/latin/Suggest.java
with
5 additions
and
14 deletions
java/src/com/android/inputmethod/latin/Suggest.java
+
5
−
14
View file @
d8afa2fb
...
@@ -192,20 +192,11 @@ public class Suggest {
...
@@ -192,20 +192,11 @@ public class Suggest {
}
else
{
}
else
{
wordComposerForLookup
=
wordComposer
;
wordComposerForLookup
=
wordComposer
;
}
}
if
(
wordComposerForLookup
.
size
()
<=
1
)
{
// At first character typed, search only the bigrams
for
(
final
String
key
:
mDictionaries
.
keySet
())
{
for
(
final
String
key
:
mDictionaries
.
keySet
())
{
final
Dictionary
dictionary
=
mDictionaries
.
get
(
key
);
final
Dictionary
dictionary
=
mDictionaries
.
get
(
key
);
suggestionsSet
.
addAll
(
dictionary
.
getSuggestions
(
suggestionsSet
.
addAll
(
dictionary
.
getSuggestions
(
wordComposerForLookup
,
prevWordForBigram
,
proximityInfo
));
wordComposerForLookup
,
prevWordForBigram
,
proximityInfo
));
}
}
else
{
// At second character typed, search the unigrams (scores being affected by bigrams)
for
(
final
String
key
:
mDictionaries
.
keySet
())
{
final
Dictionary
dictionary
=
mDictionaries
.
get
(
key
);
suggestionsSet
.
addAll
(
dictionary
.
getSuggestions
(
wordComposerForLookup
,
prevWordForBigram
,
proximityInfo
));
}
}
}
// TODO: Change this scheme - a boolean is not enough. A whitelisted word may be "valid"
// TODO: Change this scheme - a boolean is not enough. A whitelisted word may be "valid"
...
...
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