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
7c996475
Commit
7c996475
authored
12 years ago
by
Kurt Partridge
Committed by
Android (Google) Code Review
12 years ago
Browse files
Options
Downloads
Plain Diff
Merge "[TestPrep3] Add helper method to retrive dictionary"
parents
c8a1ec6e
19e05359
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/research/MainLogBuffer.java
+9
-7
9 additions, 7 deletions
java/src/com/android/inputmethod/research/MainLogBuffer.java
with
9 additions
and
7 deletions
java/src/com/android/inputmethod/research/MainLogBuffer.java
+
9
−
7
View file @
7c996475
...
@@ -93,6 +93,11 @@ public abstract class MainLogBuffer extends FixedLogBuffer {
...
@@ -93,6 +93,11 @@ public abstract class MainLogBuffer extends FixedLogBuffer {
mSuggest
=
suggest
;
mSuggest
=
suggest
;
}
}
private
Dictionary
getDictionary
()
{
if
(
mSuggest
==
null
||
!
mSuggest
.
hasMainDictionary
())
return
null
;
return
mSuggest
.
getMainDictionary
();
}
public
void
resetWordCounter
()
{
public
void
resetWordCounter
()
{
mNumWordsUntilSafeToSample
=
mNumWordsBetweenNGrams
;
mNumWordsUntilSafeToSample
=
mNumWordsBetweenNGrams
;
}
}
...
@@ -137,16 +142,13 @@ public abstract class MainLogBuffer extends FixedLogBuffer {
...
@@ -137,16 +142,13 @@ public abstract class MainLogBuffer extends FixedLogBuffer {
if
(
mNumWordsUntilSafeToSample
>
0
)
{
if
(
mNumWordsUntilSafeToSample
>
0
)
{
return
false
;
return
false
;
}
}
if
(
mSuggest
==
null
||
!
mSuggest
.
hasMainDictionary
())
{
// Main dictionary is unavailable. Since we cannot check it, we cannot tell if a
// word is out-of-vocabulary or not. Therefore, we must judge the entire buffer
// contents to potentially pose a privacy risk.
return
false
;
}
// Reload the dictionary in case it has changed (e.g., because the user has changed
// Reload the dictionary in case it has changed (e.g., because the user has changed
// languages).
// languages).
final
Dictionary
dictionary
=
mSuggest
.
getMain
Dictionary
();
final
Dictionary
dictionary
=
get
Dictionary
();
if
(
dictionary
==
null
)
{
if
(
dictionary
==
null
)
{
// Main dictionary is unavailable. Since we cannot check it, we cannot tell if a
// word is out-of-vocabulary or not. Therefore, we must judge the entire buffer
// contents to potentially pose a privacy risk.
return
false
;
return
false
;
}
}
...
...
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