Merge remaining diffs into OSS repository
BUG=
TEST=
REF_BUG=
REF_CL=99338107,138347841
REF_TIME=2016-11-06T19:14:36-08:00
REF_TIME_RAW=1478488476 -0800
Yohei Yukawa
7 years ago
41 | 41 | <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> |
42 | 42 | <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> |
43 | 43 | <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" /> |
44 | ||
45 | 44 | |
46 | 45 | <application android:icon="@drawable/application_icon" |
47 | 46 | android:label="@string/app_full_name" |
37 | 37 | # GYP's 'copies' rule cannot copy a whole directory recursively, so we use |
38 | 38 | # our own script to copy files. |
39 | 39 | 'copy_file': ['python', '../../build_tools/copy_file.py'], |
40 | 'shared_intermediate_mozc_dir': '<(SHARED_INTERMEDIATE_DIR)', | |
40 | 'shared_intermediate_mozc_dir': '<(SHARED_INTERMEDIATE_DIR)/', | |
41 | 41 | 'static_resources_dir': '<(abs_depth)/android/static_resources', |
42 | 42 | 'sdk_resources_dir': '<(shared_intermediate_mozc_dir)/android/resources', |
43 | 43 | }, |
+1
-1
47 | 47 | private boolean showInputMethodPicker = false; |
48 | 48 | |
49 | 49 | MozcMenuDialogListenerImpl( |
50 | InputMethodService inputMethodService, ViewEventListener eventListener) { | |
50 | InputMethodService inputMethodService, ViewEventListener eventListener) { | |
51 | 51 | this.inputMethodService = Preconditions.checkNotNull(inputMethodService); |
52 | 52 | this.eventListener = Preconditions.checkNotNull(eventListener); |
53 | 53 | } |
183 | 183 | <string name="pref_sound_feedback_volume_low_text">小さい</string> |
184 | 184 | <string name="pref_sound_feedback_volume_middle_text">標準</string> |
185 | 185 | <string name="pref_sound_feedback_volume_high_text">大きい</string> |
186 | ||
187 | 186 | |
188 | 187 | <string name="symbol_input_no_history">まだ履歴がありません。\n\n右にスライドして\n候補を選んでください。</string> |
189 | 188 | <string name="symbol_emoji_disabled_message">この入力先には、\n絵文字を入力できません。</string> |
54 | 54 | #define MOZC_OS_DEFINED |
55 | 55 | #endif // !OS_ANDROID && !OS_NACL |
56 | 56 | #endif // OS_LINUX |
57 | ||
57 | 58 | |
58 | 59 | #ifndef MOZC_OS_DEFINED |
59 | 60 | #error "OS_XXX (e.g., OS_WIN) must be defined." |
1171 | 1171 | elif IsMac(): |
1172 | 1172 | directory_names.extend(glob.glob(os.path.join(gyp_directory_name, |
1173 | 1173 | '*.xcodeproj'))) |
1174 | file_names.append('%s/mozc_version.txt' % SRC_DIR) | |
1175 | 1174 | |
1176 | 1175 | # mozc_version.txt does not always exist. |
1177 | 1176 | version_file = '%s/mozc_version.txt' % SRC_DIR |
37 | 37 | |
38 | 38 | #include <memory> |
39 | 39 | |
40 | #include "base/logging.h" | |
41 | 40 | #include "base/file_stream.h" |
42 | 41 | #include "base/flags.h" |
43 | 42 | #include "base/init_mozc.h" |
50 | 50 | |
51 | 51 | bool IsBoundary(const Node &lnode, const Node &rnode, |
52 | 52 | bool is_single_segment) const; |
53 | ||
54 | 53 | bool IsBoundary(uint16 rid, uint16 lid) const; |
55 | ||
56 | 54 | int32 GetPrefixPenalty(uint16 lid) const; |
57 | ||
58 | 55 | int32 GetSuffixPenalty(uint16 rid) const; |
59 | 56 | |
60 | 57 | private: |
65729 | 65729 | ふん 2028 2028 10 分 |
65730 | 65730 | はく 2028 2028 10 泊 |
65731 | 65731 | めが 2028 2028 10 M |
65732 | あなとゆきのじょおう 2007 2007 5000 アナと雪の女王 | |
65733 | ろっぽんぎひるず 2011 2011 8000 六本木ヒルズ |
29 | 29 | |
30 | 30 | MAJOR=2 |
31 | 31 | MINOR=19 |
32 | BUILD=2660 | |
32 | BUILD=2661 | |
33 | 33 | REVISION=102 |
34 | 34 | # This version represents the version of Mozc IME engine (converter, predictor, |
35 | 35 | # etc.). This version info is included both in the Mozc server and in the Mozc |
30 | 30 | |
31 | 31 | #include "base/embedded_file.h" |
32 | 32 | #include "base/logging.h" |
33 | #include "base/singleton.h" | |
34 | #include "converter/boundary_struct.h" | |
35 | 33 | |
36 | 34 | namespace mozc { |
37 | 35 | namespace chromeos { |
174 | 174 | '../config/config.gyp:config_handler', |
175 | 175 | '../protocol/protocol.gyp:config_proto', |
176 | 176 | '../protocol/protocol.gyp:user_dictionary_storage_proto', |
177 | '../protocol/protocol.gyp:user_dictionary_storage_proto', | |
178 | 177 | '../usage_stats/usage_stats_base.gyp:usage_stats', |
179 | 178 | 'gen_pos_map#host', |
180 | 179 | 'pos_matcher', |
90 | 90 | : value_trie_builder_(new LoudsTrieBuilder), |
91 | 91 | key_trie_builder_(new LoudsTrieBuilder), |
92 | 92 | token_array_builder_(new BitVectorBasedArrayBuilder), |
93 | codec_(SystemDictionaryCodecFactory::GetCodec()) {} | |
93 | codec_(SystemDictionaryCodecFactory::GetCodec()), | |
94 | file_codec_(DictionaryFileCodecFactory::GetCodec()) {} | |
94 | 95 | |
95 | 96 | // This class does not have the ownership of |codec|. |
96 | 97 | SystemDictionaryBuilder::SystemDictionaryBuilder( |
97 | const SystemDictionaryCodecInterface *codec) | |
98 | const SystemDictionaryCodecInterface *codec, | |
99 | const DictionaryFileCodecInterface *file_codec) | |
98 | 100 | : value_trie_builder_(new LoudsTrieBuilder), |
99 | 101 | key_trie_builder_(new LoudsTrieBuilder), |
100 | 102 | token_array_builder_(new BitVectorBasedArrayBuilder), |
101 | codec_(codec) {} | |
103 | codec_(codec), | |
104 | file_codec_(file_codec) {} | |
102 | 105 | |
103 | 106 | SystemDictionaryBuilder::~SystemDictionaryBuilder() {} |
104 | 107 | |
131 | 134 | ostream *output_stream) const { |
132 | 135 | // Memory images of each section |
133 | 136 | std::vector<DictionaryFileSection> sections; |
134 | DictionaryFileCodecInterface *file_codec = | |
135 | DictionaryFileCodecFactory::GetCodec(); | |
136 | 137 | DictionaryFileSection value_trie_section( |
137 | 138 | value_trie_builder_->image().data(), |
138 | 139 | value_trie_builder_->image().size(), |
139 | file_codec->GetSectionName(codec_->GetSectionNameForValue())); | |
140 | file_codec_->GetSectionName(codec_->GetSectionNameForValue())); | |
140 | 141 | sections.push_back(value_trie_section); |
141 | 142 | |
142 | 143 | DictionaryFileSection key_trie_section( |
143 | 144 | key_trie_builder_->image().data(), |
144 | 145 | key_trie_builder_->image().size(), |
145 | file_codec->GetSectionName(codec_->GetSectionNameForKey())); | |
146 | file_codec_->GetSectionName(codec_->GetSectionNameForKey())); | |
146 | 147 | sections.push_back(key_trie_section); |
147 | 148 | |
148 | 149 | DictionaryFileSection token_array_section( |
149 | 150 | token_array_builder_->image().data(), |
150 | 151 | token_array_builder_->image().size(), |
151 | file_codec->GetSectionName(codec_->GetSectionNameForTokens())); | |
152 | file_codec_->GetSectionName(codec_->GetSectionNameForTokens())); | |
152 | 153 | |
153 | 154 | sections.push_back(token_array_section); |
154 | 155 | uint32 frequent_pos_array[256] = {0}; |
159 | 160 | DictionaryFileSection frequent_pos_section( |
160 | 161 | reinterpret_cast<const char *>(frequent_pos_array), |
161 | 162 | sizeof frequent_pos_array, |
162 | file_codec->GetSectionName(codec_->GetSectionNameForPos())); | |
163 | file_codec_->GetSectionName(codec_->GetSectionNameForPos())); | |
163 | 164 | sections.push_back(frequent_pos_section); |
164 | 165 | |
165 | 166 | if (FLAGS_preserve_intermediate_dictionary && |
174 | 175 | } |
175 | 176 | |
176 | 177 | LOG(INFO) << "Start writing dictionary file."; |
177 | DictionaryFileCodecFactory::GetCodec()->WriteSections(sections, | |
178 | output_stream); | |
178 | file_codec_->WriteSections(sections, output_stream); | |
179 | 179 | LOG(INFO) << "Start writing dictionary file... done."; |
180 | 180 | } |
181 | 181 |
50 | 50 | namespace dictionary { |
51 | 51 | |
52 | 52 | class SystemDictionaryCodecInterface; |
53 | class DictionaryFileCodecInterface; | |
53 | 54 | struct Token; |
54 | 55 | |
55 | 56 | class SystemDictionaryBuilder { |
64 | 65 | }; |
65 | 66 | |
66 | 67 | SystemDictionaryBuilder(); |
67 | explicit SystemDictionaryBuilder(const SystemDictionaryCodecInterface *codec); | |
68 | SystemDictionaryBuilder(const SystemDictionaryCodecInterface *codec, | |
69 | const DictionaryFileCodecInterface *file_codec); | |
68 | 70 | virtual ~SystemDictionaryBuilder(); |
69 | 71 | void BuildFromTokens(const std::vector<Token *> &tokens); |
70 | 72 | |
103 | 105 | std::map<uint32, int> frequent_pos_; |
104 | 106 | |
105 | 107 | const SystemDictionaryCodecInterface *codec_; |
108 | const DictionaryFileCodecInterface *file_codec_; | |
106 | 109 | |
107 | 110 | DISALLOW_COPY_AND_ASSIGN(SystemDictionaryBuilder); |
108 | 111 | }; |
122 | 122 | }], |
123 | 123 | ['target_platform=="NaCl"', { |
124 | 124 | 'compiler_target': 'clang', |
125 | 'compiler_target_version_int': 304, # Clang 3.3 or higher | |
125 | 'compiler_target_version_int': 304, # Clang 3.4 or higher | |
126 | 126 | 'compiler_host': 'clang', |
127 | 127 | 'compiler_host_version_int': 304, # Clang 3.4 or higher |
128 | 128 | }], |
39 | 39 | # include <curl/curl.h> |
40 | 40 | #endif // defined(OS_WIN), defined(OS_ANDROID), defined(HAVE_CURL) |
41 | 41 | |
42 | ||
43 | 42 | #endif // GOOGLE_JAPANESE_INPUT_BUILD |
44 | 43 | |
45 | 44 | #include "base/compiler_specific.h" |
157 | 157 | return; |
158 | 158 | } |
159 | 159 | |
160 | // TODO(nona): Close unsued fd. | |
160 | // TODO(nona): Close unused fd. | |
161 | 161 | fcntl(pipefd_[0], F_SETFL, O_NONBLOCK); |
162 | 162 | fcntl(pipefd_[1], F_SETFL, O_NONBLOCK); |
163 | 163 | } |