Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(639)

Side by Side Diff: services/prediction/dictionary_service.h

Issue 1247903003: Add spellcheck and word suggestion to the prediction service (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef SERVICES_PREDICTION_DICTIONARY_SERVICE_H_
6 #define SERVICES_PREDICTION_DICTIONARY_SERVICE_H_
7
8 #include "base/macros.h"
9 #include "mojo/services/prediction/public/interfaces/prediction.mojom.h"
10 #include "services/prediction/proximity_info_service.h"
11
12 namespace latinime {
13
14 class Dictionary;
15 class DicTraverseSession;
16 class PrevWordsInfo;
17 }
APW 2015/07/23 18:02:15 // namespace latinime
riajiang 2015/07/31 02:13:04 Done.
18
19 namespace prediction {
20
21 class DictionaryService {
22 public:
23 DictionaryService();
24 ~DictionaryService();
25
26 mojo::Array<mojo::String> GetDictionarySuggestion(
27 PredictionInfoPtr prediction_info,
28 ProximityInfoService* proximity_info);
29
30 private:
31 int max_suggestion_size;
APW 2015/07/23 18:02:15 private member variables must end in underscore.
riajiang 2015/07/31 02:13:04 Done. How about the sequence between static membe
32 latinime::Dictionary* default_dictionary;
33 latinime::DicTraverseSession* default_session;
34
35 void LoadDictionary();
36
37 latinime::Dictionary* const OpenDictionary(const std::string path,
38 const int start_offset,
39 const int size,
40 const bool is_updatable);
41
42 latinime::PrevWordsInfo* ProcessPrevWord(
43 mojo::Array<mojo::String>& prev_words,
44 mojo::Array<bool>& beginnings);
45
46 DISALLOW_COPY_AND_ASSIGN(DictionaryService);
47 };
48
49 } // namespace prediction
50
51 #endif // SERVICES_PREDICTION_DICTIONARY_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698