Codebase list mozc / d3b669a
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
18 changed file(s) with 24 addition(s) and 29 deletion(s). Raw diff Collapse all Expand all
4141 <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
4242 <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
4343 <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
44
4544
4645 <application android:icon="@drawable/application_icon"
4746 android:label="@string/app_full_name"
3737 # GYP's 'copies' rule cannot copy a whole directory recursively, so we use
3838 # our own script to copy files.
3939 'copy_file': ['python', '../../build_tools/copy_file.py'],
40 'shared_intermediate_mozc_dir': '<(SHARED_INTERMEDIATE_DIR)',
40 'shared_intermediate_mozc_dir': '<(SHARED_INTERMEDIATE_DIR)/',
4141 'static_resources_dir': '<(abs_depth)/android/static_resources',
4242 'sdk_resources_dir': '<(shared_intermediate_mozc_dir)/android/resources',
4343 },
4747 private boolean showInputMethodPicker = false;
4848
4949 MozcMenuDialogListenerImpl(
50 InputMethodService inputMethodService, ViewEventListener eventListener) {
50 InputMethodService inputMethodService, ViewEventListener eventListener) {
5151 this.inputMethodService = Preconditions.checkNotNull(inputMethodService);
5252 this.eventListener = Preconditions.checkNotNull(eventListener);
5353 }
183183 <string name="pref_sound_feedback_volume_low_text">小さい</string>
184184 <string name="pref_sound_feedback_volume_middle_text">標準</string>
185185 <string name="pref_sound_feedback_volume_high_text">大きい</string>
186
187186
188187 <string name="symbol_input_no_history">まだ履歴がありません。\n\n右にスライドして\n候補を選んでください。</string>
189188 <string name="symbol_emoji_disabled_message">この入力先には、\n絵文字を入力できません。</string>
5454 #define MOZC_OS_DEFINED
5555 #endif // !OS_ANDROID && !OS_NACL
5656 #endif // OS_LINUX
57
5758
5859 #ifndef MOZC_OS_DEFINED
5960 #error "OS_XXX (e.g., OS_WIN) must be defined."
11711171 elif IsMac():
11721172 directory_names.extend(glob.glob(os.path.join(gyp_directory_name,
11731173 '*.xcodeproj')))
1174 file_names.append('%s/mozc_version.txt' % SRC_DIR)
11751174
11761175 # mozc_version.txt does not always exist.
11771176 version_file = '%s/mozc_version.txt' % SRC_DIR
3737
3838 #include <memory>
3939
40 #include "base/logging.h"
4140 #include "base/file_stream.h"
4241 #include "base/flags.h"
4342 #include "base/init_mozc.h"
5050
5151 bool IsBoundary(const Node &lnode, const Node &rnode,
5252 bool is_single_segment) const;
53
5453 bool IsBoundary(uint16 rid, uint16 lid) const;
55
5654 int32 GetPrefixPenalty(uint16 lid) const;
57
5855 int32 GetSuffixPenalty(uint16 rid) const;
5956
6057 private:
6572965729 ふん 2028 2028 10 分
6573065730 はく 2028 2028 10 泊
6573165731 めが 2028 2028 10 M
65732 あなとゆきのじょおう 2007 2007 5000 アナと雪の女王
65733 ろっぽんぎひるず 2011 2011 8000 六本木ヒルズ
2929
3030 MAJOR=2
3131 MINOR=19
32 BUILD=2660
32 BUILD=2661
3333 REVISION=102
3434 # This version represents the version of Mozc IME engine (converter, predictor,
3535 # etc.). This version info is included both in the Mozc server and in the Mozc
3030
3131 #include "base/embedded_file.h"
3232 #include "base/logging.h"
33 #include "base/singleton.h"
34 #include "converter/boundary_struct.h"
3533
3634 namespace mozc {
3735 namespace chromeos {
174174 '../config/config.gyp:config_handler',
175175 '../protocol/protocol.gyp:config_proto',
176176 '../protocol/protocol.gyp:user_dictionary_storage_proto',
177 '../protocol/protocol.gyp:user_dictionary_storage_proto',
178177 '../usage_stats/usage_stats_base.gyp:usage_stats',
179178 'gen_pos_map#host',
180179 'pos_matcher',
9090 : value_trie_builder_(new LoudsTrieBuilder),
9191 key_trie_builder_(new LoudsTrieBuilder),
9292 token_array_builder_(new BitVectorBasedArrayBuilder),
93 codec_(SystemDictionaryCodecFactory::GetCodec()) {}
93 codec_(SystemDictionaryCodecFactory::GetCodec()),
94 file_codec_(DictionaryFileCodecFactory::GetCodec()) {}
9495
9596 // This class does not have the ownership of |codec|.
9697 SystemDictionaryBuilder::SystemDictionaryBuilder(
97 const SystemDictionaryCodecInterface *codec)
98 const SystemDictionaryCodecInterface *codec,
99 const DictionaryFileCodecInterface *file_codec)
98100 : value_trie_builder_(new LoudsTrieBuilder),
99101 key_trie_builder_(new LoudsTrieBuilder),
100102 token_array_builder_(new BitVectorBasedArrayBuilder),
101 codec_(codec) {}
103 codec_(codec),
104 file_codec_(file_codec) {}
102105
103106 SystemDictionaryBuilder::~SystemDictionaryBuilder() {}
104107
131134 ostream *output_stream) const {
132135 // Memory images of each section
133136 std::vector<DictionaryFileSection> sections;
134 DictionaryFileCodecInterface *file_codec =
135 DictionaryFileCodecFactory::GetCodec();
136137 DictionaryFileSection value_trie_section(
137138 value_trie_builder_->image().data(),
138139 value_trie_builder_->image().size(),
139 file_codec->GetSectionName(codec_->GetSectionNameForValue()));
140 file_codec_->GetSectionName(codec_->GetSectionNameForValue()));
140141 sections.push_back(value_trie_section);
141142
142143 DictionaryFileSection key_trie_section(
143144 key_trie_builder_->image().data(),
144145 key_trie_builder_->image().size(),
145 file_codec->GetSectionName(codec_->GetSectionNameForKey()));
146 file_codec_->GetSectionName(codec_->GetSectionNameForKey()));
146147 sections.push_back(key_trie_section);
147148
148149 DictionaryFileSection token_array_section(
149150 token_array_builder_->image().data(),
150151 token_array_builder_->image().size(),
151 file_codec->GetSectionName(codec_->GetSectionNameForTokens()));
152 file_codec_->GetSectionName(codec_->GetSectionNameForTokens()));
152153
153154 sections.push_back(token_array_section);
154155 uint32 frequent_pos_array[256] = {0};
159160 DictionaryFileSection frequent_pos_section(
160161 reinterpret_cast<const char *>(frequent_pos_array),
161162 sizeof frequent_pos_array,
162 file_codec->GetSectionName(codec_->GetSectionNameForPos()));
163 file_codec_->GetSectionName(codec_->GetSectionNameForPos()));
163164 sections.push_back(frequent_pos_section);
164165
165166 if (FLAGS_preserve_intermediate_dictionary &&
174175 }
175176
176177 LOG(INFO) << "Start writing dictionary file.";
177 DictionaryFileCodecFactory::GetCodec()->WriteSections(sections,
178 output_stream);
178 file_codec_->WriteSections(sections, output_stream);
179179 LOG(INFO) << "Start writing dictionary file... done.";
180180 }
181181
5050 namespace dictionary {
5151
5252 class SystemDictionaryCodecInterface;
53 class DictionaryFileCodecInterface;
5354 struct Token;
5455
5556 class SystemDictionaryBuilder {
6465 };
6566
6667 SystemDictionaryBuilder();
67 explicit SystemDictionaryBuilder(const SystemDictionaryCodecInterface *codec);
68 SystemDictionaryBuilder(const SystemDictionaryCodecInterface *codec,
69 const DictionaryFileCodecInterface *file_codec);
6870 virtual ~SystemDictionaryBuilder();
6971 void BuildFromTokens(const std::vector<Token *> &tokens);
7072
103105 std::map<uint32, int> frequent_pos_;
104106
105107 const SystemDictionaryCodecInterface *codec_;
108 const DictionaryFileCodecInterface *file_codec_;
106109
107110 DISALLOW_COPY_AND_ASSIGN(SystemDictionaryBuilder);
108111 };
122122 }],
123123 ['target_platform=="NaCl"', {
124124 '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
126126 'compiler_host': 'clang',
127127 'compiler_host_version_int': 304, # Clang 3.4 or higher
128128 }],
3939 # include <curl/curl.h>
4040 #endif // defined(OS_WIN), defined(OS_ANDROID), defined(HAVE_CURL)
4141
42
4342 #endif // GOOGLE_JAPANESE_INPUT_BUILD
4443
4544 #include "base/compiler_specific.h"
157157 return;
158158 }
159159
160 // TODO(nona): Close unsued fd.
160 // TODO(nona): Close unused fd.
161161 fcntl(pipefd_[0], F_SETFL, O_NONBLOCK);
162162 fcntl(pipefd_[1], F_SETFL, O_NONBLOCK);
163163 }
3535 #ifdef OS_NACL
3636 #include "base/pepper_file_system_mock.h"
3737 #include "base/pepper_file_util.h"
38 #include "base/public/nacl_mock_module.h"
38 #include "testing/base/public/nacl_mock_module.h"
3939 #endif // OS_NACL
4040
4141 int main(int argc, char **argv) {