コード例 #1
0
def main():
  options = ParseOption()
  with open(options.input, 'r') as input_stream:
    zero_query_dict = ReadZeroQueryNumberData(input_stream)
  util.WriteZeroQueryData(zero_query_dict,
                          options.output_token_array,
                          options.output_string_array)
コード例 #2
0
ファイル: gen_zero_query_data.py プロジェクト: jhorology/mozc
def main():
    options = ParseOptions()
    with OpenFile(options.input_rule) as input_stream:
        zero_query_rule_dict = ReadZeroQueryRuleData(input_stream)
    with OpenFile(options.input_symbol) as input_stream:
        zero_query_symbol_dict = ReadSymbolTsv(input_stream)
    with OpenFile(options.input_emoji) as input_stream:
        zero_query_emoji_dict = ReadEmojiTsv(input_stream)
    with OpenFile(options.input_emoticon) as input_stream:
        zero_query_emoticon_dict = ReadEmoticonTsv(input_stream)

    merged_zero_query_dict = MergeZeroQueryData(zero_query_rule_dict,
                                                zero_query_symbol_dict,
                                                zero_query_emoji_dict,
                                                zero_query_emoticon_dict)

    util.WriteZeroQueryData(merged_zero_query_dict, options.output_token_array,
                            options.output_string_array)