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

Side by Side Diff: third_party/prediction/suggest/policyimpl/dictionary/structure/v4/ver4_dict_constants.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, 4 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 /*
2 * Copyright (C) 2013, The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17 #ifndef LATINIME_VER4_DICT_CONSTANTS_H
18 #define LATINIME_VER4_DICT_CONSTANTS_H
19
20 #include "third_party/prediction/defines.h"
21
22 #include <cstddef>
23
24 namespace latinime {
25
26 // TODO: Create PtConstants under the pt_common and move some constant values
27 // there.
28 // Note that there are corresponding definitions in FormatSpec.java.
29 class Ver4DictConstants {
30 public:
31 static const char* const BODY_FILE_EXTENSION;
32 static const char* const HEADER_FILE_EXTENSION;
33 static const int MAX_DICTIONARY_SIZE;
34 static const int MAX_DICT_EXTENDED_REGION_SIZE;
35
36 static const size_t NUM_OF_CONTENT_BUFFERS_IN_BODY_FILE;
37 static const int TRIE_BUFFER_INDEX;
38 static const int TERMINAL_ADDRESS_LOOKUP_TABLE_BUFFER_INDEX;
39 static const int LANGUAGE_MODEL_BUFFER_INDEX;
40 static const int BIGRAM_BUFFERS_INDEX;
41 static const int SHORTCUT_BUFFERS_INDEX;
42
43 static const int NOT_A_TERMINAL_ID;
44 static const int PROBABILITY_SIZE;
45 static const int FLAGS_IN_PROBABILITY_FILE_SIZE;
46 static const int TERMINAL_ADDRESS_TABLE_ADDRESS_SIZE;
47 static const int NOT_A_TERMINAL_ADDRESS;
48 static const int TERMINAL_ID_FIELD_SIZE;
49 static const int TIME_STAMP_FIELD_SIZE;
50 static const int WORD_LEVEL_FIELD_SIZE;
51 static const int WORD_COUNT_FIELD_SIZE;
52
53 static const int BIGRAM_ADDRESS_TABLE_BLOCK_SIZE;
54 static const int BIGRAM_ADDRESS_TABLE_DATA_SIZE;
55 static const int SHORTCUT_ADDRESS_TABLE_BLOCK_SIZE;
56 static const int SHORTCUT_ADDRESS_TABLE_DATA_SIZE;
57
58 static const int BIGRAM_FLAGS_FIELD_SIZE;
59 static const int BIGRAM_TARGET_TERMINAL_ID_FIELD_SIZE;
60 static const int INVALID_BIGRAM_TARGET_TERMINAL_ID;
61 static const int BIGRAM_IS_LINK_MASK;
62 static const int BIGRAM_PROBABILITY_MASK;
63 // Used when bigram list has time stamp.
64 static const int BIGRAM_LARGE_PROBABILITY_FIELD_SIZE;
65
66 static const int SHORTCUT_FLAGS_FIELD_SIZE;
67 static const int SHORTCUT_PROBABILITY_MASK;
68 static const int SHORTCUT_HAS_NEXT_MASK;
69
70 private:
71 DISALLOW_IMPLICIT_CONSTRUCTORS(Ver4DictConstants);
72
73 static const size_t NUM_OF_BUFFERS_FOR_SINGLE_DICT_CONTENT;
74 static const size_t NUM_OF_BUFFERS_FOR_SPARSE_TABLE_DICT_CONTENT;
75 static const size_t NUM_OF_BUFFERS_FOR_LANGUAGE_MODEL_DICT_CONTENT;
76 };
77 } // namespace latinime
78 #endif /* LATINIME_VER4_DICT_CONSTANTS_H */
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698