OLD | NEW |
1 PredictionService interface provides only one function GetPredictionList | 1 PredictionService interface provides only one function GetPredictionList |
2 which takes infos about previous words and current word (format details in | 2 which takes infos about previous words and current word (format details in |
3 mojo/services/prediction/public/interfaces/prediction.mojom). | 3 mojo/services/prediction/interfaces/prediction.mojom). |
4 Connect to "mojo:prediction_service" to use the service. | 4 Connect to "mojo:prediction_service" to use the service. |
5 | 5 |
6 Description of each class: | 6 Description of each class: |
7 res/main_en.dict.sha1 is the sha1 of main_en.dict (from Android | 7 res/main_en.dict.sha1 is the sha1 of main_en.dict (from Android |
8 packages/inputmethods/LatinIME/java/res/raw/main_en.dict). | 8 packages/inputmethods/LatinIME/java/res/raw/main_en.dict). |
9 main_en.dict is the binary form of English dictionary | 9 main_en.dict is the binary form of English dictionary |
10 packages/inputmethods/LatinIME/dictionaries/en_wordlist.combined.gz | 10 packages/inputmethods/LatinIME/dictionaries/en_wordlist.combined.gz |
11 of the form | 11 of the form |
12 packages/inputmethods/LatinIME/java/src/com/android/inputmethod | 12 packages/inputmethods/LatinIME/java/src/com/android/inputmethod |
13 /latin/makedict/FormatSpec.java. | 13 /latin/makedict/FormatSpec.java. |
14 | 14 |
15 DictionaryService creates a latinime::DictionaryStructureWithBufferPolicy | 15 DictionaryService creates a latinime::DictionaryStructureWithBufferPolicy |
16 from our dictionary file and prepares parameters (current word processed by | 16 from our dictionary file and prepares parameters (current word processed by |
17 InputInfo) for getSuggestions if current word is not empty or getPredictions if | 17 InputInfo) for getSuggestions if current word is not empty or getPredictions if |
18 current word is empty (currently not working due to lack of ngram binary | 18 current word is empty (currently not working due to lack of ngram binary |
19 dictionary) from latinime::DictionaryStructureWithBufferPolicy. After it | 19 dictionary) from latinime::DictionaryStructureWithBufferPolicy. After it |
20 processes the prediction words array, it returns that to PredictionServiceImpl | 20 processes the prediction words array, it returns that to PredictionServiceImpl |
21 which then returns back to the client. | 21 which then returns back to the client. |
22 | 22 |
23 ProximityInfoFactory, TouchPositionCorrection and KeySet provide proximity | 23 ProximityInfoFactory, TouchPositionCorrection and KeySet provide proximity |
24 info of the keys. TouchPositionCorrection and KeySet are hardcoded English | 24 info of the keys. TouchPositionCorrection and KeySet are hardcoded English |
25 QWERTY keyboard values because PredictionService can't get these keyboard | 25 QWERTY keyboard values because PredictionService can't get these keyboard |
26 values from anywhere for now. | 26 values from anywhere for now. |
27 | 27 |
28 TODO: | 28 TODO: |
29 Add a bigram/ngram binary dictionary. Shouldn't need to change any other code | 29 Add a bigram/ngram binary dictionary. Shouldn't need to change any other code |
30 if the dictionary is of the same format as main_en.dict. If not, might need to | 30 if the dictionary is of the same format as main_en.dict. If not, might need to |
31 update third_party/android_prediction to the latest version. | 31 update third_party/android_prediction to the latest version. |
32 | 32 |
OLD | NEW |