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)
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)