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
e4e7e5fc
Commit
e4e7e5fc
authored
12 years ago
by
Jean Chalard
Browse files
Options
Downloads
Patches
Plain Diff
Cleanup (A103)
Change-Id: Ib5ebddfdb87ef71a2f8d859fb45d3ac78040e97a
parent
5e21ea1a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
java/src/com/android/inputmethod/latin/BinaryDictionary.java
+6
-11
6 additions, 11 deletions
java/src/com/android/inputmethod/latin/BinaryDictionary.java
with
6 additions
and
11 deletions
java/src/com/android/inputmethod/latin/BinaryDictionary.java
+
6
−
11
View file @
e4e7e5fc
...
...
@@ -116,7 +116,8 @@ public class BinaryDictionary extends Dictionary {
?
null
:
StringUtils
.
toCodePointArray
(
prevWord
.
toString
());
final
int
composerSize
=
composer
.
size
();
if
(
composerSize
<=
1
||
!
composer
.
isBatchMode
())
{
final
boolean
isGesture
=
composer
.
isBatchMode
();
if
(
composerSize
<=
1
||
!
isGesture
)
{
if
(
composerSize
>
MAX_WORD_LENGTH
-
1
)
return
null
;
for
(
int
i
=
0
;
i
<
composerSize
;
i
++)
{
mInputCodes
[
i
]
=
composer
.
getCodeAt
(
i
);
...
...
@@ -124,7 +125,7 @@ public class BinaryDictionary extends Dictionary {
}
final
int
count
;
if
(!
composer
.
isBatchMode
()
&&
composer
.
s
ize
()
<=
1
)
{
if
(!
isGesture
&&
composer
S
ize
<=
1
)
{
if
(
TextUtils
.
isEmpty
(
prevWord
))
return
null
;
int
tmpCount
=
getBigramsNative
(
mNativeDict
,
prevWordCodePointArray
,
prevWordCodePointArray
.
length
,
mInputCodes
,
composerSize
,
...
...
@@ -132,23 +133,17 @@ public class BinaryDictionary extends Dictionary {
count
=
Math
.
min
(
tmpCount
,
MAX_BIGRAMS
);
}
else
{
final
InputPointers
ips
=
composer
.
getInputPointers
();
final
boolean
isGesture
=
composer
.
isBatchMode
();
final
int
codesSize
;
if
(
isGesture
)
{
codesSize
=
ips
.
getPointerSize
();
}
else
{
codesSize
=
composer
.
size
();
}
final
int
codesSize
=
isGesture
?
ips
.
getPointerSize
()
:
composerSize
;
// proximityInfo and/or prevWordForBigrams may not be null.
count
=
getSuggestionsNative
(
mNativeDict
,
proximityInfo
.
getNativeProximityInfo
(),
ips
.
getXCoordinates
(),
ips
.
getYCoordinates
(),
ips
.
getTimes
(),
ips
.
getPointerIds
(),
mInputCodes
,
codesSize
,
0
/* unused */
,
isGesture
,
prevWordCodePointArray
,
mUseFullEditDistance
,
mOutputChars
,
mOutputScores
,
mSpaceIndices
);
}
final
ArrayList
<
SuggestedWordInfo
>
suggestions
=
new
ArrayList
<
SuggestedWordInfo
>();
for
(
int
j
=
0
;
j
<
count
;
++
j
)
{
if
(
composer
.
s
ize
()
>
0
&&
mOutputScores
[
j
]
<
1
)
break
;
if
(
composer
S
ize
>
0
&&
mOutputScores
[
j
]
<
1
)
break
;
final
int
start
=
j
*
MAX_WORD_LENGTH
;
int
len
=
0
;
while
(
len
<
MAX_WORD_LENGTH
&&
mOutputChars
[
start
+
len
]
!=
0
)
{
...
...
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