def main(): options = ParseOptions() pos_database = pos_util.PosDataBase() pos_database.Parse(options.id_file, options.special_pos_file) inflection_map = pos_util.InflectionMap() inflection_map.Parse(options.cforms_file) user_pos = pos_util.UserPos(pos_database, inflection_map) user_pos.Parse(options.user_pos_file) with open(options.output, 'w') as stream: OutputUserPosDataHeader(user_pos.data, stream)
def main(): options = ParseOptions() pos_database = pos_util.PosDataBase() pos_database.Parse(options.id_file, options.special_pos_file) inflection_map = pos_util.InflectionMap() inflection_map.Parse(options.cforms_file) user_pos = pos_util.UserPos(pos_database, inflection_map) user_pos.Parse(options.user_pos_file) OutputUserPosData(user_pos.data, options.output_token_array, options.output_string_array) if options.output_pos_list: serialized_string_array_builder.SerializeToFile( [pos for (pos, _) in user_pos.data], options.output_pos_list)