| 5 | import argparse |
| 6 | |
| 7 | def modify_gt(gt): |
| 8 | match gt: |
| 9 | case "1. 钢琴\n2. 小提琴\n3. 吉他": |
| 10 | gt_list = ["钢琴", "小提琴", "吉他"] |
| 11 | case "1. 生机勃勃\n2. 春暖花开\n3. 万物复苏": |
| 12 | gt_list = ["生机勃勃", "春暖花开", "万物复苏"] |
| 13 | case "体型小巧,羽毛灰褐,\n喜欢在城市中觅食,叽叽喳喳很热闹。": |
| 14 | gt_list = ["体型小巧", "羽毛灰褐", "喜欢在城市中觅食", "叽叽喳喳很热闹"] |
| 15 | case "1. 韩信\n2. 岳飞\n3. 霍去病": |
| 16 | gt_list = ["韩信", "岳飞", "霍去病"] |
| 17 | case "蔚蓝无垠,波涛汹涌,生命的摇篮。": |
| 18 | gt_list = ["蔚蓝无垠", "波涛汹涌", "生命的摇篮"] |
| 19 | case "1. 苹果\n2. 香蕉\n3. 橙子": |
| 20 | gt_list = ["苹果", "香蕉", "橙子"] |
| 21 | case "蝉鸣阵阵,知了此起彼伏。\n树荫下,老人们悠闲地下着棋。\n孩童嬉戏,欢笑声传遍公园。": |
| 22 | gt_list = ["蝉鸣阵阵,知了此起彼伏", "树荫下,老人们悠闲地下着棋", "孩童嬉戏,欢笑声传遍公园"] |
| 23 | case "1. 微积分\n2. 线性代数\n3. 概率论": |
| 24 | gt_list = ["微积分", "线性代数", "概率论"] |
| 25 | case "红艳如火,娇嫩欲滴,\n花瓣层叠,芳香四溢。": |
| 26 | gt_list = ["红艳如火", "娇嫩欲滴", "花瓣层叠", "芳香四溢"] |
| 27 | case "在南极的冰山之巅,\n企鹅们舞动着短小的翅膀。\n身披黑白礼服,步伐蹒跚,\n在寒风中,它们笑对严霜。": |
| 28 | gt_list = ["在南极的冰山之巅", "企鹅们舞动着短小的翅膀", "身披黑白礼服", "步伐蹒跚", "在寒风中", "它们笑对严霜"] |
| 29 | case "On the peak of the Antarctic iceberg,\nPenguins dance with tiny wings.\nWearing black and white tuxedos, stumbling steps,\nThey smile at the severe frost in the cold wind.": |
| 30 | gt_list = ["On the peak of the Antarctic iceberg", "Penguins dance with tiny wings", "Wearing black and white tuxedos", "stumbling steps", "They smile at the severe frost in the cold wind"] |
| 31 | case "Red as fire, delicate and dripping,\nPetals layered, fragrance overflowing.": |
| 32 | gt_list = ["Red as fire", "delicate and dripping", "Petals layered", "fragrance overflowing"] |
| 33 | case "1. Calculus\n2. Linear Algebra\n3. Probability Theory": |
| 34 | gt_list = ["Calculus", "Linear Algebra", "Probability Theory"] |
| 35 | case "Cicadas chirping, the sounds rise and fall.\nUnder the shade, elders leisurely play chess.\nChildren play, laughter fills the park.": |
| 36 | gt_list = ["Cicadas chirping, the sounds rise and fall", "Under the shade, elders leisurely play chess", "Children play, laughter fills the park"] |
| 37 | case "1. Apple\n2. Banana\n3. Orange": |
| 38 | gt_list = ["Apple", "Banana", "Orange"] |
| 39 | case "Vast and blue, waves surging, cradle of life.": |
| 40 | gt_list = ["Vast and blue", "waves surging", "cradle of life"] |
| 41 | case "1. Han Xin\n2. Yue Fei\n3. Huo Qubing": |
| 42 | gt_list = ["Han Xin", "Yue Fei", "Huo Qubing"] |
| 43 | case "Small in size, gray-brown feathers,\nLikes to forage in the city, chirping lively.": |
| 44 | gt_list = ["Small in size", "gray-brown feathers", "Likes to forage in the city", "chirping lively"] |
| 45 | case "1. Piano\n2. Violin\n3. Guitar": |
| 46 | gt_list = ["Piano", "Violin", "Guitar"] |
| 47 | case "1. Vibrant\n2. Fresh\n3. Warm": |
| 48 | gt_list = ["Vibrant", "Fresh", "Warm"] |
| 49 | case _: |
| 50 | raise ValueError(f"GT not found: {gt}") |
| 51 | return gt_list |
| 52 | |
| 53 | |
| 54 | def score_response(response, gt_label, language): |