chen459664 commited on
Commit
9397c2d
·
verified ·
1 Parent(s): 8908a59

Add files using upload-large-folder tool

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. lm-evaluation-harness/lm_eval/tasks/afrobench/masakhanews/prompt_3/masakhanews_tir.yaml +8 -0
  2. lm-evaluation-harness/lm_eval/tasks/afrobench/masakhanews/prompt_3/utils.py +1 -0
  3. lm-evaluation-harness/lm_eval/tasks/afrobench/masakhanews/prompt_4/masakhanews_orm.yaml +7 -0
  4. lm-evaluation-harness/lm_eval/tasks/afrobench/masakhanews/prompt_4/masakhanews_sna.yaml +7 -0
  5. lm-evaluation-harness/lm_eval/tasks/afrobench/masakhanews/prompt_4/masakhanews_som.yaml +7 -0
  6. lm-evaluation-harness/lm_eval/tasks/afrobench/masakhanews/prompt_4/masakhanews_swa.yaml +7 -0
  7. lm-evaluation-harness/lm_eval/tasks/afrobench/masakhanews/prompt_4/masakhanews_tir.yaml +7 -0
  8. lm-evaluation-harness/lm_eval/tasks/afrobench/masakhanews/prompt_4/masakhanews_xho.yaml +7 -0
  9. lm-evaluation-harness/lm_eval/tasks/afrobench/masakhanews/prompt_4/masakhanews_yor.yaml +7 -0
  10. lm-evaluation-harness/lm_eval/tasks/afrobench/masakhanews/prompt_4/utils.py +1 -0
  11. lm-evaluation-harness/lm_eval/tasks/afrobench/masakhanews/prompt_5/masakhanews_amh.yaml +18 -0
  12. lm-evaluation-harness/lm_eval/tasks/afrobench/masakhanews/prompt_5/masakhanews_eng.yaml +18 -0
  13. lm-evaluation-harness/lm_eval/tasks/afrobench/masakhanews/prompt_5/masakhanews_ibo.yaml +18 -0
  14. lm-evaluation-harness/lm_eval/tasks/afrobench/masakhanews/prompt_5/masakhanews_lug.yaml +18 -0
  15. lm-evaluation-harness/lm_eval/tasks/afrobench/masakhanews/prompt_5/masakhanews_orm.yaml +18 -0
  16. lm-evaluation-harness/lm_eval/tasks/afrobench/masakhanews/prompt_5/masakhanews_pcm.yaml +18 -0
  17. lm-evaluation-harness/lm_eval/tasks/afrobench/masakhanews/prompt_5/masakhanews_run.yaml +18 -0
  18. lm-evaluation-harness/lm_eval/tasks/afrobench/masakhanews/prompt_5/masakhanews_sna.yaml +18 -0
  19. lm-evaluation-harness/lm_eval/tasks/afrobench/masakhanews/prompt_5/masakhanews_som.yaml +18 -0
  20. lm-evaluation-harness/lm_eval/tasks/afrobench/masakhanews/prompt_5/masakhanews_swa.yaml +18 -0
  21. lm-evaluation-harness/lm_eval/tasks/afrobench/masakhanews/prompt_5/masakhanews_tir.yaml +18 -0
  22. lm-evaluation-harness/lm_eval/tasks/afrobench/masakhanews/prompt_5/masakhanews_xho.yaml +18 -0
  23. lm-evaluation-harness/lm_eval/tasks/afrobench/masakhanews/prompt_5/masakhanews_yor.yaml +18 -0
  24. lm-evaluation-harness/lm_eval/tasks/afrobench/masakhanews/prompt_5/utils.py +1 -0
  25. lm-evaluation-harness/lm_eval/tasks/afrobench/masakhapos/README.md +75 -0
  26. lm-evaluation-harness/lm_eval/tasks/afrobench/masakhapos/gen_utils.py +151 -0
  27. lm-evaluation-harness/lm_eval/tasks/afrobench/masakhapos/prompt_1/masakhapos_bbj.yaml +13 -0
  28. lm-evaluation-harness/lm_eval/tasks/afrobench/masakhapos/prompt_1/masakhapos_ewe.yaml +13 -0
  29. lm-evaluation-harness/lm_eval/tasks/afrobench/masakhapos/prompt_1/masakhapos_fon.yaml +13 -0
  30. lm-evaluation-harness/lm_eval/tasks/afrobench/masakhapos/prompt_1/masakhapos_hau.yaml +13 -0
  31. lm-evaluation-harness/lm_eval/tasks/afrobench/masakhapos/prompt_1/masakhapos_ibo.yaml +13 -0
  32. lm-evaluation-harness/lm_eval/tasks/afrobench/masakhapos/prompt_1/masakhapos_kin.yaml +13 -0
  33. lm-evaluation-harness/lm_eval/tasks/afrobench/masakhapos/prompt_1/masakhapos_lug.yaml +13 -0
  34. lm-evaluation-harness/lm_eval/tasks/afrobench/masakhapos/prompt_1/masakhapos_luo.yaml +13 -0
  35. lm-evaluation-harness/lm_eval/tasks/afrobench/masakhapos/prompt_1/masakhapos_mos.yaml +13 -0
  36. lm-evaluation-harness/lm_eval/tasks/afrobench/masakhapos/prompt_1/masakhapos_nya.yaml +13 -0
  37. lm-evaluation-harness/lm_eval/tasks/afrobench/masakhapos/prompt_1/masakhapos_pcm.yaml +13 -0
  38. lm-evaluation-harness/lm_eval/tasks/afrobench/masakhapos/prompt_1/masakhapos_sna.yaml +13 -0
  39. lm-evaluation-harness/lm_eval/tasks/afrobench/masakhapos/prompt_1/masakhapos_swa.yaml +13 -0
  40. lm-evaluation-harness/lm_eval/tasks/afrobench/masakhapos/prompt_1/masakhapos_tsn.yaml +13 -0
  41. lm-evaluation-harness/lm_eval/tasks/afrobench/masakhapos/prompt_1/masakhapos_twi.yaml +13 -0
  42. lm-evaluation-harness/lm_eval/tasks/afrobench/masakhapos/prompt_1/masakhapos_wol.yaml +13 -0
  43. lm-evaluation-harness/lm_eval/tasks/afrobench/masakhapos/prompt_1/masakhapos_xho.yaml +13 -0
  44. lm-evaluation-harness/lm_eval/tasks/afrobench/masakhapos/prompt_1/masakhapos_yaml +32 -0
  45. lm-evaluation-harness/lm_eval/tasks/afrobench/masakhapos/prompt_1/masakhapos_yor.yaml +13 -0
  46. lm-evaluation-harness/lm_eval/tasks/afrobench/masakhapos/prompt_1/masakhapos_zul.yaml +13 -0
  47. lm-evaluation-harness/lm_eval/tasks/afrobench/masakhapos/prompt_1/utils.py +55 -0
  48. lm-evaluation-harness/lm_eval/tasks/afrobench/masakhapos/prompt_2/masakhapos_bam.yaml +14 -0
  49. lm-evaluation-harness/lm_eval/tasks/afrobench/masakhapos/prompt_2/masakhapos_bbj.yaml +14 -0
  50. lm-evaluation-harness/lm_eval/tasks/afrobench/masakhapos/prompt_2/masakhapos_ewe.yaml +14 -0
lm-evaluation-harness/lm_eval/tasks/afrobench/masakhanews/prompt_3/masakhanews_tir.yaml ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ # Generated by utils.py
2
+ dataset_name: tir
3
+ doc_to_text: "You are an assistant able to classify topics in texts. \n\nGiven the\
4
+ \ categories technology, religion, politics, sports, health, entertainment, or business;\
5
+ \ what is the topic of the Tigrinya statement below? Return only the category. \n\
6
+ \ntext: {{headline_text}} \\category:\n\n"
7
+ include: masakhanews
8
+ task: masakhanews_tir_prompt_3
lm-evaluation-harness/lm_eval/tasks/afrobench/masakhanews/prompt_3/utils.py ADDED
@@ -0,0 +1 @@
 
 
1
+ from lm_eval.utils import weighted_f1_score
lm-evaluation-harness/lm_eval/tasks/afrobench/masakhanews/prompt_4/masakhanews_orm.yaml ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ # Generated by utils.py
2
+ dataset_name: orm
3
+ doc_to_text: "Label the following text as technology, religion, politics, sports,\
4
+ \ health, entertainment, or geography. Provide only the category as your response.\
5
+ \ \n\ntext: {{headline_text}} \\category: \n\n"
6
+ include: masakhanews
7
+ task: masakhanews_orm_prompt_4
lm-evaluation-harness/lm_eval/tasks/afrobench/masakhanews/prompt_4/masakhanews_sna.yaml ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ # Generated by utils.py
2
+ dataset_name: sna
3
+ doc_to_text: "Label the following text as technology, religion, politics, sports,\
4
+ \ health, entertainment, or geography. Provide only the category as your response.\
5
+ \ \n\ntext: {{headline_text}} \\category: \n\n"
6
+ include: masakhanews
7
+ task: masakhanews_sna_prompt_4
lm-evaluation-harness/lm_eval/tasks/afrobench/masakhanews/prompt_4/masakhanews_som.yaml ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ # Generated by utils.py
2
+ dataset_name: som
3
+ doc_to_text: "Label the following text as technology, religion, politics, sports,\
4
+ \ health, entertainment, or geography. Provide only the category as your response.\
5
+ \ \n\ntext: {{headline_text}} \\category: \n\n"
6
+ include: masakhanews
7
+ task: masakhanews_som_prompt_4
lm-evaluation-harness/lm_eval/tasks/afrobench/masakhanews/prompt_4/masakhanews_swa.yaml ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ # Generated by utils.py
2
+ dataset_name: swa
3
+ doc_to_text: "Label the following text as technology, religion, politics, sports,\
4
+ \ health, entertainment, or geography. Provide only the category as your response.\
5
+ \ \n\ntext: {{headline_text}} \\category: \n\n"
6
+ include: masakhanews
7
+ task: masakhanews_swa_prompt_4
lm-evaluation-harness/lm_eval/tasks/afrobench/masakhanews/prompt_4/masakhanews_tir.yaml ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ # Generated by utils.py
2
+ dataset_name: tir
3
+ doc_to_text: "Label the following text as technology, religion, politics, sports,\
4
+ \ health, entertainment, or geography. Provide only the category as your response.\
5
+ \ \n\ntext: {{headline_text}} \\category: \n\n"
6
+ include: masakhanews
7
+ task: masakhanews_tir_prompt_4
lm-evaluation-harness/lm_eval/tasks/afrobench/masakhanews/prompt_4/masakhanews_xho.yaml ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ # Generated by utils.py
2
+ dataset_name: xho
3
+ doc_to_text: "Label the following text as technology, religion, politics, sports,\
4
+ \ health, entertainment, or geography. Provide only the category as your response.\
5
+ \ \n\ntext: {{headline_text}} \\category: \n\n"
6
+ include: masakhanews
7
+ task: masakhanews_xho_prompt_4
lm-evaluation-harness/lm_eval/tasks/afrobench/masakhanews/prompt_4/masakhanews_yor.yaml ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ # Generated by utils.py
2
+ dataset_name: yor
3
+ doc_to_text: "Label the following text as technology, religion, politics, sports,\
4
+ \ health, entertainment, or geography. Provide only the category as your response.\
5
+ \ \n\ntext: {{headline_text}} \\category: \n\n"
6
+ include: masakhanews
7
+ task: masakhanews_yor_prompt_4
lm-evaluation-harness/lm_eval/tasks/afrobench/masakhanews/prompt_4/utils.py ADDED
@@ -0,0 +1 @@
 
 
1
+ from lm_eval.utils import weighted_f1_score
lm-evaluation-harness/lm_eval/tasks/afrobench/masakhanews/prompt_5/masakhanews_amh.yaml ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Generated by utils.py
2
+ dataset_name: amh
3
+ doc_to_text: "You are tasked with performing topic classification on the following\
4
+ \ Amharic text. For each input, classify the topic as technology, business, politics,\
5
+ \ sports, health, entertainment, or religion. Use the following guidelines: \n\n\
6
+ \ technology: The text discusses scientific discoveries, technological advancements,\
7
+ \ or related topics. \npolitics: The text covers political events, policies, or\
8
+ \ related topics. \nsports: The text talks about sports events, athletes, or related\
9
+ \ topics. \nhealth: The text addresses health issues, medical advancements, or related\
10
+ \ topics. \nentertainment: The text pertains to movies, music, celebrities, or related\
11
+ \ topics. \nreligion: The text talks about relgions, religious institutions and\
12
+ \ beliefs or related topics. \n\nbusiness: The text covers economy, business, or\
13
+ \ related topics. \n\nIf the text contains multiple topics, choose the dominant\
14
+ \ topic. For ambiguous or unclear topics, select the category that best reflects\
15
+ \ the overall content. Please provide a single classification for each input.\n\n\
16
+ text: {{headline_text}} \\category: \n\n"
17
+ include: masakhanews
18
+ task: masakhanews_amh_prompt_5
lm-evaluation-harness/lm_eval/tasks/afrobench/masakhanews/prompt_5/masakhanews_eng.yaml ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Generated by utils.py
2
+ dataset_name: eng
3
+ doc_to_text: "You are tasked with performing topic classification on the following\
4
+ \ English text. For each input, classify the topic as technology, business, politics,\
5
+ \ sports, health, entertainment, or religion. Use the following guidelines: \n\n\
6
+ \ technology: The text discusses scientific discoveries, technological advancements,\
7
+ \ or related topics. \npolitics: The text covers political events, policies, or\
8
+ \ related topics. \nsports: The text talks about sports events, athletes, or related\
9
+ \ topics. \nhealth: The text addresses health issues, medical advancements, or related\
10
+ \ topics. \nentertainment: The text pertains to movies, music, celebrities, or related\
11
+ \ topics. \nreligion: The text talks about relgions, religious institutions and\
12
+ \ beliefs or related topics. \n\nbusiness: The text covers economy, business, or\
13
+ \ related topics. \n\nIf the text contains multiple topics, choose the dominant\
14
+ \ topic. For ambiguous or unclear topics, select the category that best reflects\
15
+ \ the overall content. Please provide a single classification for each input.\n\n\
16
+ text: {{headline_text}} \\category: \n\n"
17
+ include: masakhanews
18
+ task: masakhanews_eng_prompt_5
lm-evaluation-harness/lm_eval/tasks/afrobench/masakhanews/prompt_5/masakhanews_ibo.yaml ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Generated by utils.py
2
+ dataset_name: ibo
3
+ doc_to_text: "You are tasked with performing topic classification on the following\
4
+ \ Igbo text. For each input, classify the topic as technology, business, politics,\
5
+ \ sports, health, entertainment, or religion. Use the following guidelines: \n\n\
6
+ \ technology: The text discusses scientific discoveries, technological advancements,\
7
+ \ or related topics. \npolitics: The text covers political events, policies, or\
8
+ \ related topics. \nsports: The text talks about sports events, athletes, or related\
9
+ \ topics. \nhealth: The text addresses health issues, medical advancements, or related\
10
+ \ topics. \nentertainment: The text pertains to movies, music, celebrities, or related\
11
+ \ topics. \nreligion: The text talks about relgions, religious institutions and\
12
+ \ beliefs or related topics. \n\nbusiness: The text covers economy, business, or\
13
+ \ related topics. \n\nIf the text contains multiple topics, choose the dominant\
14
+ \ topic. For ambiguous or unclear topics, select the category that best reflects\
15
+ \ the overall content. Please provide a single classification for each input.\n\n\
16
+ text: {{headline_text}} \\category: \n\n"
17
+ include: masakhanews
18
+ task: masakhanews_ibo_prompt_5
lm-evaluation-harness/lm_eval/tasks/afrobench/masakhanews/prompt_5/masakhanews_lug.yaml ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Generated by utils.py
2
+ dataset_name: lug
3
+ doc_to_text: "You are tasked with performing topic classification on the following\
4
+ \ Luganda text. For each input, classify the topic as technology, business, politics,\
5
+ \ sports, health, entertainment, or religion. Use the following guidelines: \n\n\
6
+ \ technology: The text discusses scientific discoveries, technological advancements,\
7
+ \ or related topics. \npolitics: The text covers political events, policies, or\
8
+ \ related topics. \nsports: The text talks about sports events, athletes, or related\
9
+ \ topics. \nhealth: The text addresses health issues, medical advancements, or related\
10
+ \ topics. \nentertainment: The text pertains to movies, music, celebrities, or related\
11
+ \ topics. \nreligion: The text talks about relgions, religious institutions and\
12
+ \ beliefs or related topics. \n\nbusiness: The text covers economy, business, or\
13
+ \ related topics. \n\nIf the text contains multiple topics, choose the dominant\
14
+ \ topic. For ambiguous or unclear topics, select the category that best reflects\
15
+ \ the overall content. Please provide a single classification for each input.\n\n\
16
+ text: {{headline_text}} \\category: \n\n"
17
+ include: masakhanews
18
+ task: masakhanews_lug_prompt_5
lm-evaluation-harness/lm_eval/tasks/afrobench/masakhanews/prompt_5/masakhanews_orm.yaml ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Generated by utils.py
2
+ dataset_name: orm
3
+ doc_to_text: "You are tasked with performing topic classification on the following\
4
+ \ Afaan Oromoo text. For each input, classify the topic as technology, business,\
5
+ \ politics, sports, health, entertainment, or religion. Use the following guidelines:\
6
+ \ \n\n technology: The text discusses scientific discoveries, technological advancements,\
7
+ \ or related topics. \npolitics: The text covers political events, policies, or\
8
+ \ related topics. \nsports: The text talks about sports events, athletes, or related\
9
+ \ topics. \nhealth: The text addresses health issues, medical advancements, or related\
10
+ \ topics. \nentertainment: The text pertains to movies, music, celebrities, or related\
11
+ \ topics. \nreligion: The text talks about relgions, religious institutions and\
12
+ \ beliefs or related topics. \n\nbusiness: The text covers economy, business, or\
13
+ \ related topics. \n\nIf the text contains multiple topics, choose the dominant\
14
+ \ topic. For ambiguous or unclear topics, select the category that best reflects\
15
+ \ the overall content. Please provide a single classification for each input.\n\n\
16
+ text: {{headline_text}} \\category: \n\n"
17
+ include: masakhanews
18
+ task: masakhanews_orm_prompt_5
lm-evaluation-harness/lm_eval/tasks/afrobench/masakhanews/prompt_5/masakhanews_pcm.yaml ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Generated by utils.py
2
+ dataset_name: pcm
3
+ doc_to_text: "You are tasked with performing topic classification on the following\
4
+ \ Nigerian Pidgin text. For each input, classify the topic as technology, business,\
5
+ \ politics, sports, health, entertainment, or religion. Use the following guidelines:\
6
+ \ \n\n technology: The text discusses scientific discoveries, technological advancements,\
7
+ \ or related topics. \npolitics: The text covers political events, policies, or\
8
+ \ related topics. \nsports: The text talks about sports events, athletes, or related\
9
+ \ topics. \nhealth: The text addresses health issues, medical advancements, or related\
10
+ \ topics. \nentertainment: The text pertains to movies, music, celebrities, or related\
11
+ \ topics. \nreligion: The text talks about relgions, religious institutions and\
12
+ \ beliefs or related topics. \n\nbusiness: The text covers economy, business, or\
13
+ \ related topics. \n\nIf the text contains multiple topics, choose the dominant\
14
+ \ topic. For ambiguous or unclear topics, select the category that best reflects\
15
+ \ the overall content. Please provide a single classification for each input.\n\n\
16
+ text: {{headline_text}} \\category: \n\n"
17
+ include: masakhanews
18
+ task: masakhanews_pcm_prompt_5
lm-evaluation-harness/lm_eval/tasks/afrobench/masakhanews/prompt_5/masakhanews_run.yaml ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Generated by utils.py
2
+ dataset_name: run
3
+ doc_to_text: "You are tasked with performing topic classification on the following\
4
+ \ Kirundi text. For each input, classify the topic as technology, business, politics,\
5
+ \ sports, health, entertainment, or religion. Use the following guidelines: \n\n\
6
+ \ technology: The text discusses scientific discoveries, technological advancements,\
7
+ \ or related topics. \npolitics: The text covers political events, policies, or\
8
+ \ related topics. \nsports: The text talks about sports events, athletes, or related\
9
+ \ topics. \nhealth: The text addresses health issues, medical advancements, or related\
10
+ \ topics. \nentertainment: The text pertains to movies, music, celebrities, or related\
11
+ \ topics. \nreligion: The text talks about relgions, religious institutions and\
12
+ \ beliefs or related topics. \n\nbusiness: The text covers economy, business, or\
13
+ \ related topics. \n\nIf the text contains multiple topics, choose the dominant\
14
+ \ topic. For ambiguous or unclear topics, select the category that best reflects\
15
+ \ the overall content. Please provide a single classification for each input.\n\n\
16
+ text: {{headline_text}} \\category: \n\n"
17
+ include: masakhanews
18
+ task: masakhanews_run_prompt_5
lm-evaluation-harness/lm_eval/tasks/afrobench/masakhanews/prompt_5/masakhanews_sna.yaml ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Generated by utils.py
2
+ dataset_name: sna
3
+ doc_to_text: "You are tasked with performing topic classification on the following\
4
+ \ Shona text. For each input, classify the topic as technology, business, politics,\
5
+ \ sports, health, entertainment, or religion. Use the following guidelines: \n\n\
6
+ \ technology: The text discusses scientific discoveries, technological advancements,\
7
+ \ or related topics. \npolitics: The text covers political events, policies, or\
8
+ \ related topics. \nsports: The text talks about sports events, athletes, or related\
9
+ \ topics. \nhealth: The text addresses health issues, medical advancements, or related\
10
+ \ topics. \nentertainment: The text pertains to movies, music, celebrities, or related\
11
+ \ topics. \nreligion: The text talks about relgions, religious institutions and\
12
+ \ beliefs or related topics. \n\nbusiness: The text covers economy, business, or\
13
+ \ related topics. \n\nIf the text contains multiple topics, choose the dominant\
14
+ \ topic. For ambiguous or unclear topics, select the category that best reflects\
15
+ \ the overall content. Please provide a single classification for each input.\n\n\
16
+ text: {{headline_text}} \\category: \n\n"
17
+ include: masakhanews
18
+ task: masakhanews_sna_prompt_5
lm-evaluation-harness/lm_eval/tasks/afrobench/masakhanews/prompt_5/masakhanews_som.yaml ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Generated by utils.py
2
+ dataset_name: som
3
+ doc_to_text: "You are tasked with performing topic classification on the following\
4
+ \ Somali text. For each input, classify the topic as technology, business, politics,\
5
+ \ sports, health, entertainment, or religion. Use the following guidelines: \n\n\
6
+ \ technology: The text discusses scientific discoveries, technological advancements,\
7
+ \ or related topics. \npolitics: The text covers political events, policies, or\
8
+ \ related topics. \nsports: The text talks about sports events, athletes, or related\
9
+ \ topics. \nhealth: The text addresses health issues, medical advancements, or related\
10
+ \ topics. \nentertainment: The text pertains to movies, music, celebrities, or related\
11
+ \ topics. \nreligion: The text talks about relgions, religious institutions and\
12
+ \ beliefs or related topics. \n\nbusiness: The text covers economy, business, or\
13
+ \ related topics. \n\nIf the text contains multiple topics, choose the dominant\
14
+ \ topic. For ambiguous or unclear topics, select the category that best reflects\
15
+ \ the overall content. Please provide a single classification for each input.\n\n\
16
+ text: {{headline_text}} \\category: \n\n"
17
+ include: masakhanews
18
+ task: masakhanews_som_prompt_5
lm-evaluation-harness/lm_eval/tasks/afrobench/masakhanews/prompt_5/masakhanews_swa.yaml ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Generated by utils.py
2
+ dataset_name: swa
3
+ doc_to_text: "You are tasked with performing topic classification on the following\
4
+ \ Swahili text. For each input, classify the topic as technology, business, politics,\
5
+ \ sports, health, entertainment, or religion. Use the following guidelines: \n\n\
6
+ \ technology: The text discusses scientific discoveries, technological advancements,\
7
+ \ or related topics. \npolitics: The text covers political events, policies, or\
8
+ \ related topics. \nsports: The text talks about sports events, athletes, or related\
9
+ \ topics. \nhealth: The text addresses health issues, medical advancements, or related\
10
+ \ topics. \nentertainment: The text pertains to movies, music, celebrities, or related\
11
+ \ topics. \nreligion: The text talks about relgions, religious institutions and\
12
+ \ beliefs or related topics. \n\nbusiness: The text covers economy, business, or\
13
+ \ related topics. \n\nIf the text contains multiple topics, choose the dominant\
14
+ \ topic. For ambiguous or unclear topics, select the category that best reflects\
15
+ \ the overall content. Please provide a single classification for each input.\n\n\
16
+ text: {{headline_text}} \\category: \n\n"
17
+ include: masakhanews
18
+ task: masakhanews_swa_prompt_5
lm-evaluation-harness/lm_eval/tasks/afrobench/masakhanews/prompt_5/masakhanews_tir.yaml ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Generated by utils.py
2
+ dataset_name: tir
3
+ doc_to_text: "You are tasked with performing topic classification on the following\
4
+ \ Tigrinya text. For each input, classify the topic as technology, business, politics,\
5
+ \ sports, health, entertainment, or religion. Use the following guidelines: \n\n\
6
+ \ technology: The text discusses scientific discoveries, technological advancements,\
7
+ \ or related topics. \npolitics: The text covers political events, policies, or\
8
+ \ related topics. \nsports: The text talks about sports events, athletes, or related\
9
+ \ topics. \nhealth: The text addresses health issues, medical advancements, or related\
10
+ \ topics. \nentertainment: The text pertains to movies, music, celebrities, or related\
11
+ \ topics. \nreligion: The text talks about relgions, religious institutions and\
12
+ \ beliefs or related topics. \n\nbusiness: The text covers economy, business, or\
13
+ \ related topics. \n\nIf the text contains multiple topics, choose the dominant\
14
+ \ topic. For ambiguous or unclear topics, select the category that best reflects\
15
+ \ the overall content. Please provide a single classification for each input.\n\n\
16
+ text: {{headline_text}} \\category: \n\n"
17
+ include: masakhanews
18
+ task: masakhanews_tir_prompt_5
lm-evaluation-harness/lm_eval/tasks/afrobench/masakhanews/prompt_5/masakhanews_xho.yaml ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Generated by utils.py
2
+ dataset_name: xho
3
+ doc_to_text: "You are tasked with performing topic classification on the following\
4
+ \ Xhosa text. For each input, classify the topic as technology, business, politics,\
5
+ \ sports, health, entertainment, or religion. Use the following guidelines: \n\n\
6
+ \ technology: The text discusses scientific discoveries, technological advancements,\
7
+ \ or related topics. \npolitics: The text covers political events, policies, or\
8
+ \ related topics. \nsports: The text talks about sports events, athletes, or related\
9
+ \ topics. \nhealth: The text addresses health issues, medical advancements, or related\
10
+ \ topics. \nentertainment: The text pertains to movies, music, celebrities, or related\
11
+ \ topics. \nreligion: The text talks about relgions, religious institutions and\
12
+ \ beliefs or related topics. \n\nbusiness: The text covers economy, business, or\
13
+ \ related topics. \n\nIf the text contains multiple topics, choose the dominant\
14
+ \ topic. For ambiguous or unclear topics, select the category that best reflects\
15
+ \ the overall content. Please provide a single classification for each input.\n\n\
16
+ text: {{headline_text}} \\category: \n\n"
17
+ include: masakhanews
18
+ task: masakhanews_xho_prompt_5
lm-evaluation-harness/lm_eval/tasks/afrobench/masakhanews/prompt_5/masakhanews_yor.yaml ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Generated by utils.py
2
+ dataset_name: yor
3
+ doc_to_text: "You are tasked with performing topic classification on the following\
4
+ \ Yoruba text. For each input, classify the topic as technology, business, politics,\
5
+ \ sports, health, entertainment, or religion. Use the following guidelines: \n\n\
6
+ \ technology: The text discusses scientific discoveries, technological advancements,\
7
+ \ or related topics. \npolitics: The text covers political events, policies, or\
8
+ \ related topics. \nsports: The text talks about sports events, athletes, or related\
9
+ \ topics. \nhealth: The text addresses health issues, medical advancements, or related\
10
+ \ topics. \nentertainment: The text pertains to movies, music, celebrities, or related\
11
+ \ topics. \nreligion: The text talks about relgions, religious institutions and\
12
+ \ beliefs or related topics. \n\nbusiness: The text covers economy, business, or\
13
+ \ related topics. \n\nIf the text contains multiple topics, choose the dominant\
14
+ \ topic. For ambiguous or unclear topics, select the category that best reflects\
15
+ \ the overall content. Please provide a single classification for each input.\n\n\
16
+ text: {{headline_text}} \\category: \n\n"
17
+ include: masakhanews
18
+ task: masakhanews_yor_prompt_5
lm-evaluation-harness/lm_eval/tasks/afrobench/masakhanews/prompt_5/utils.py ADDED
@@ -0,0 +1 @@
 
 
1
+ from lm_eval.utils import weighted_f1_score
lm-evaluation-harness/lm_eval/tasks/afrobench/masakhapos/README.md ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #
2
+
3
+ ## Paper
4
+ Title: `MasakhaPOS: Part-of-Speech Tagging for Typologically Diverse African languages`
5
+
6
+ Paper Link: https://aclanthology.org/2023.acl-long.609/
7
+
8
+ ## Abstract
9
+ >In this paper, we present AfricaPOS, the largest part-of-speech (POS) dataset for 20 typologically diverse African languages. We discuss the challenges in annotating POS for these languages using the universal dependencies (UD) guidelines. We conducted extensive POS baseline experiments using both conditional random field and several multilingual pre-trained language models. We applied various cross-lingual transfer models trained with data available in the UD. Evaluating on the AfricaPOS dataset, we show that choosing the best transfer language(s) in both single-source and multi-source setups greatly improves the POS tagging performance of the target languages, in particular when combined with parameter-fine-tuning methods. Crucially, transferring knowledge from a language that matches the language family and morphosyntactic properties seems to be more effective for POS tagging in unseen languages.
10
+
11
+ HomePage: https://github.com/masakhane-io/masakhane-pos
12
+
13
+ ### Citation
14
+
15
+ ```
16
+ @inproceedings{dione-etal-2023-masakhapos,
17
+ title = "{M}asakha{POS}: Part-of-Speech Tagging for Typologically Diverse {A}frican languages",
18
+ author = "Dione, Cheikh M. Bamba and
19
+ Adelani, David Ifeoluwa and
20
+ Nabende, Peter and
21
+ Alabi, Jesujoba and
22
+ Sindane, Thapelo and
23
+ Buzaaba, Happy and
24
+ Muhammad, Shamsuddeen Hassan and
25
+ Emezue, Chris Chinenye and
26
+ Ogayo, Perez and
27
+ Aremu, Anuoluwapo and
28
+ Gitau, Catherine and
29
+ Mbaye, Derguene and
30
+ Mukiibi, Jonathan and
31
+ Sibanda, Blessing and
32
+ Dossou, Bonaventure F. P. and
33
+ Bukula, Andiswa and
34
+ Mabuya, Rooweither and
35
+ Tapo, Allahsera Auguste and
36
+ Munkoh-Buabeng, Edwin and
37
+ Memdjokam Koagne, Victoire and
38
+ Ouoba Kabore, Fatoumata and
39
+ Taylor, Amelia and
40
+ Kalipe, Godson and
41
+ Macucwa, Tebogo and
42
+ Marivate, Vukosi and
43
+ Gwadabe, Tajuddeen and
44
+ Elvis, Mboning Tchiaze and
45
+ Onyenwe, Ikechukwu and
46
+ Atindogbe, Gratien and
47
+ Adelani, Tolulope and
48
+ Akinade, Idris and
49
+ Samuel, Olanrewaju and
50
+ Nahimana, Marien and
51
+ Musabeyezu, Th{\'e}og{\`e}ne and
52
+ Niyomutabazi, Emile and
53
+ Chimhenga, Ester and
54
+ Gotosa, Kudzai and
55
+ Mizha, Patrick and
56
+ Agbolo, Apelete and
57
+ Traore, Seydou and
58
+ Uchechukwu, Chinedu and
59
+ Yusuf, Aliyu and
60
+ Abdullahi, Muhammad and
61
+ Klakow, Dietrich",
62
+ editor = "Rogers, Anna and
63
+ Boyd-Graber, Jordan and
64
+ Okazaki, Naoaki",
65
+ booktitle = "Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)",
66
+ month = jul,
67
+ year = "2023",
68
+ address = "Toronto, Canada",
69
+ publisher = "Association for Computational Linguistics",
70
+ url = "https://aclanthology.org/2023.acl-long.609/",
71
+ doi = "10.18653/v1/2023.acl-long.609",
72
+ pages = "10883--10900",
73
+ abstract = "In this paper, we present AfricaPOS, the largest part-of-speech (POS) dataset for 20 typologically diverse African languages. We discuss the challenges in annotating POS for these languages using the universal dependencies (UD) guidelines. We conducted extensive POS baseline experiments using both conditional random field and several multilingual pre-trained language models. We applied various cross-lingual transfer models trained with data available in the UD. Evaluating on the AfricaPOS dataset, we show that choosing the best transfer language(s) in both single-source and multi-source setups greatly improves the POS tagging performance of the target languages, in particular when combined with parameter-fine-tuning methods. Crucially, transferring knowledge from a language that matches the language family and morphosyntactic properties seems to be more effective for POS tagging in unseen languages."
74
+ }
75
+ ```
lm-evaluation-harness/lm_eval/tasks/afrobench/masakhapos/gen_utils.py ADDED
@@ -0,0 +1,151 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import argparse
2
+ import os
3
+
4
+ import yaml
5
+
6
+
7
+ class FunctionTag:
8
+ def __init__(self, value):
9
+ self.value = value
10
+
11
+
12
+ def prompt_func(mode, lang):
13
+ prompt_map = {
14
+ "prompt_1": "Please provide the POS tags for each word in the input sentence. The input will be a list of "
15
+ "words in the sentence. The output format should be a list of tuples, where each tuple consists of "
16
+ "a word from the input text and its corresponding POS tag label from the tag label set: ['ADJ', "
17
+ "'ADP', 'ADV', 'AUX', 'CCONJ, 'DET', 'INTJ', 'NOUN', 'NUM', 'PART', 'PRON', 'PROPN', 'PUNCT', "
18
+ "'SCONJ', 'SYM', 'VERB', 'X']. \nYour response should include only a list of tuples, in the order "
19
+ "that the words appear in the input sentence, including punctuations, with each tuple containing the corresponding POS tag "
20
+ "label for a word. \n\nSentence: {{tokens}} \nOutput: ",
21
+ "prompt_2": f"You are an expert in tagging words and sentences in {lang} with the right POS tag. "
22
+ f"\n\nPlease provide the POS tags for each word in the {lang} sentence. The input is a list of words in"
23
+ " the sentence. POS tag label set: ['ADJ', 'ADP', 'ADV', 'AUX', 'CCONJ, 'DET', 'INTJ', 'NOUN', "
24
+ "'NUM', 'PART', 'PRON', 'PROPN', 'PUNCT', 'SCONJ', 'SYM', 'VERB', 'X']. The output format should "
25
+ "be a list of tuples, where each tuple consists of a word from the input text and its corresponding"
26
+ " POS tag label from the POS tag label set provided\nYour response should include only a list of "
27
+ "tuples, in the order that the words appear in the input sentence, including punctuations, with each tuple containing the "
28
+ "corresponding POS tag label for a word. \n\nSentence: {{tokens}} \nOutput: ",
29
+ "prompt_3": f"Acting as a {lang} linguist and without making any corrections or changes to the text, perform a part of "
30
+ "speech (POS) analysis of the sentences using the following POS tag label annotation ['ADJ', "
31
+ "'ADP', 'ADV', 'AUX', 'CCONJ, 'DET', 'INTJ', 'NOUN', 'NUM', 'PART', 'PRON', 'PROPN', 'PUNCT', "
32
+ "'SCONJ', 'SYM', 'VERB', 'X']. The input will be a list of words in the sentence. The output format should "
33
+ "be a list of tuples, where each tuple consists of a word from the input text and its corresponding"
34
+ " POS tag label from the POS tag label set provided\nYour response should include only a list of "
35
+ "tuples, in the order that the words appear in the input sentence, including punctuations, with each tuple containing the "
36
+ "corresponding POS tag label for a word. \n\nSentence: {{tokens}} \nOutput: ",
37
+ "prompt_4": "Annotate each word in the provided sentence with the appropriate POS tag. The annotation "
38
+ "list is given as: ['ADJ', 'ADP', 'ADV', 'AUX', 'CCONJ, 'DET', 'INTJ', 'NOUN', 'NUM', 'PART', "
39
+ "'PRON', 'PROPN', 'PUNCT', 'SCONJ', 'SYM', 'VERB', 'X']. The input sentence will be a list of words"
40
+ " in the sentence. The output format should "
41
+ "be a list of tuples, where each tuple consists of a word from the input text and its corresponding"
42
+ " POS tag label from the POS tag label set provided\nYour response should include only a list of "
43
+ "tuples, in the order that the words appear in the input sentence, including punctuations, with each tuple containing the "
44
+ "corresponding POS tag label for a word. \n\nSentence: {{tokens}} \nOutput: ",
45
+ "prompt_5": "Given the following sentence, identify the part of speech (POS) for each word. Use the following "
46
+ "POS tag set: \nNOUN: Noun (person, place, thing), \nVERB: Verb (action, state), "
47
+ "\nADJ: Adjective (describes a noun), \nADV: Adverb (modifies a verb, adjective, or adverb), "
48
+ "\nPRON: Pronoun (replaces a noun), \nDET: Determiner (introduces a noun), "
49
+ "\nADP: Adposition (preposition or postposition), \nCCONJ: Conjunction (connects words, phrases, clauses)"
50
+ "\nPUNCT: Punctuation, \nPROPN: Proper Noun, \nAUX: Auxiliary verb (helper verb), "
51
+ "\nSCONJ: Subordinating conjunction \nPART: Particle, \nSYM: Symbol, \nINTJ: Interjection, "
52
+ "\nNUM: Numeral, \nX: others. The output format should "
53
+ "be a list of tuples, where each tuple consists of a word from the input text and its corresponding"
54
+ " POS tag label key only from the POS tag set provided\nYour response should include only a list of "
55
+ "tuples, in the order that the words appear in the input sentence, including punctuations, with each tuple containing the "
56
+ "corresponding POS tag label for a word. \n\nSentence: {{tokens}} \nOutput: ",
57
+ }
58
+ return prompt_map[mode]
59
+
60
+
61
+ def gen_lang_yamls(output_dir: str, overwrite: bool, mode: str) -> None:
62
+ """
63
+ Generate a yaml file for each language.
64
+
65
+ :param output_dir: The directory to output the files to.
66
+ :param overwrite: Whether to overwrite files if they already exist.
67
+ """
68
+ err = []
69
+ languages = {
70
+ "bam": "Bambara",
71
+ "bbj": "Ghomala",
72
+ "ewe": "Ewe",
73
+ "fon": "Fon",
74
+ "hau": "Hausa",
75
+ "ibo": "Igbo",
76
+ "kin": "Kinyarwanda",
77
+ "lug": "Luganda",
78
+ "luo": "Dholuo",
79
+ "mos": "Mossi",
80
+ "nya": "Chichewa",
81
+ "pcm": "Nigerian Pidgin",
82
+ "sna": "chiShona",
83
+ "swa": "Kiswahili",
84
+ "tsn": "Setswana",
85
+ "twi": "Twi",
86
+ "wol": "Wolof",
87
+ "xho": "isiXhosa",
88
+ "yor": "Yoruba",
89
+ "zul": "isiZulu",
90
+ }
91
+
92
+ for lang in languages.keys():
93
+ try:
94
+ file_name = f"masakhapos_{lang}.yaml"
95
+ task_name = f"masakhapos_{lang}_{mode}"
96
+ yaml_template = "masakhapos_yaml"
97
+ yaml_details = {
98
+ "include": yaml_template,
99
+ "task": task_name,
100
+ "dataset_name": lang,
101
+ "doc_to_text": prompt_func(mode, languages[lang]),
102
+ }
103
+ os.makedirs(f"{output_dir}/{mode}", exist_ok=True)
104
+ with open(
105
+ f"{output_dir}/{mode}/{file_name}",
106
+ "w" if overwrite else "x",
107
+ encoding="utf8",
108
+ ) as f:
109
+ f.write("# Generated by utils.py\n")
110
+ yaml.dump(
111
+ yaml_details,
112
+ f,
113
+ allow_unicode=True,
114
+ )
115
+ except FileExistsError:
116
+ err.append(file_name)
117
+
118
+ if len(err) > 0:
119
+ raise FileExistsError(
120
+ "Files were not created because they already exist (use --overwrite flag):"
121
+ f" {', '.join(err)}"
122
+ )
123
+
124
+
125
+ def main() -> None:
126
+ """Parse CLI args and generate language-specific yaml files."""
127
+ parser = argparse.ArgumentParser()
128
+ parser.add_argument(
129
+ "--overwrite",
130
+ default=True,
131
+ action="store_true",
132
+ help="Overwrite files if they already exist",
133
+ )
134
+ parser.add_argument(
135
+ "--output-dir",
136
+ default="./",
137
+ help="Directory to write yaml files to",
138
+ )
139
+ parser.add_argument(
140
+ "--mode",
141
+ default="prompt_1",
142
+ choices=["prompt_1", "prompt_2", "prompt_3", "prompt_4", "prompt_5"],
143
+ help="Prompt number",
144
+ )
145
+ args = parser.parse_args()
146
+
147
+ gen_lang_yamls(output_dir=args.output_dir, overwrite=args.overwrite, mode=args.mode)
148
+
149
+
150
+ if __name__ == "__main__":
151
+ main()
lm-evaluation-harness/lm_eval/tasks/afrobench/masakhapos/prompt_1/masakhapos_bbj.yaml ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Generated by utils.py
2
+ dataset_name: bbj
3
+ doc_to_text: "Please provide the POS tags for each word in the input sentence. The\
4
+ \ input will be a list of words in the sentence. The output format should be a list\
5
+ \ of tuples, where each tuple consists of a word from the input text and its corresponding\
6
+ \ POS tag label from the tag label set: ['ADJ', 'ADP', 'ADV', 'AUX', 'CCONJ, 'DET',\
7
+ \ 'INTJ', 'NOUN', 'NUM', 'PART', 'PRON', 'PROPN', 'PUNCT', 'SCONJ', 'SYM', 'VERB',\
8
+ \ 'X']. \nYour response should include only a list of tuples, in the order that\
9
+ \ the words appear in the input sentence, including punctuations, with each tuple\
10
+ \ containing the corresponding POS tag label for a word. \n\nSentence: {{tokens}}\
11
+ \ \nOutput: "
12
+ include: masakhapos_yaml
13
+ task: masakhapos_bbj_prompt_1
lm-evaluation-harness/lm_eval/tasks/afrobench/masakhapos/prompt_1/masakhapos_ewe.yaml ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Generated by utils.py
2
+ dataset_name: ewe
3
+ doc_to_text: "Please provide the POS tags for each word in the input sentence. The\
4
+ \ input will be a list of words in the sentence. The output format should be a list\
5
+ \ of tuples, where each tuple consists of a word from the input text and its corresponding\
6
+ \ POS tag label from the tag label set: ['ADJ', 'ADP', 'ADV', 'AUX', 'CCONJ, 'DET',\
7
+ \ 'INTJ', 'NOUN', 'NUM', 'PART', 'PRON', 'PROPN', 'PUNCT', 'SCONJ', 'SYM', 'VERB',\
8
+ \ 'X']. \nYour response should include only a list of tuples, in the order that\
9
+ \ the words appear in the input sentence, including punctuations, with each tuple\
10
+ \ containing the corresponding POS tag label for a word. \n\nSentence: {{tokens}}\
11
+ \ \nOutput: "
12
+ include: masakhapos_yaml
13
+ task: masakhapos_ewe_prompt_1
lm-evaluation-harness/lm_eval/tasks/afrobench/masakhapos/prompt_1/masakhapos_fon.yaml ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Generated by utils.py
2
+ dataset_name: fon
3
+ doc_to_text: "Please provide the POS tags for each word in the input sentence. The\
4
+ \ input will be a list of words in the sentence. The output format should be a list\
5
+ \ of tuples, where each tuple consists of a word from the input text and its corresponding\
6
+ \ POS tag label from the tag label set: ['ADJ', 'ADP', 'ADV', 'AUX', 'CCONJ, 'DET',\
7
+ \ 'INTJ', 'NOUN', 'NUM', 'PART', 'PRON', 'PROPN', 'PUNCT', 'SCONJ', 'SYM', 'VERB',\
8
+ \ 'X']. \nYour response should include only a list of tuples, in the order that\
9
+ \ the words appear in the input sentence, including punctuations, with each tuple\
10
+ \ containing the corresponding POS tag label for a word. \n\nSentence: {{tokens}}\
11
+ \ \nOutput: "
12
+ include: masakhapos_yaml
13
+ task: masakhapos_fon_prompt_1
lm-evaluation-harness/lm_eval/tasks/afrobench/masakhapos/prompt_1/masakhapos_hau.yaml ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Generated by utils.py
2
+ dataset_name: hau
3
+ doc_to_text: "Please provide the POS tags for each word in the input sentence. The\
4
+ \ input will be a list of words in the sentence. The output format should be a list\
5
+ \ of tuples, where each tuple consists of a word from the input text and its corresponding\
6
+ \ POS tag label from the tag label set: ['ADJ', 'ADP', 'ADV', 'AUX', 'CCONJ, 'DET',\
7
+ \ 'INTJ', 'NOUN', 'NUM', 'PART', 'PRON', 'PROPN', 'PUNCT', 'SCONJ', 'SYM', 'VERB',\
8
+ \ 'X']. \nYour response should include only a list of tuples, in the order that\
9
+ \ the words appear in the input sentence, including punctuations, with each tuple\
10
+ \ containing the corresponding POS tag label for a word. \n\nSentence: {{tokens}}\
11
+ \ \nOutput: "
12
+ include: masakhapos_yaml
13
+ task: masakhapos_hau_prompt_1
lm-evaluation-harness/lm_eval/tasks/afrobench/masakhapos/prompt_1/masakhapos_ibo.yaml ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Generated by utils.py
2
+ dataset_name: ibo
3
+ doc_to_text: "Please provide the POS tags for each word in the input sentence. The\
4
+ \ input will be a list of words in the sentence. The output format should be a list\
5
+ \ of tuples, where each tuple consists of a word from the input text and its corresponding\
6
+ \ POS tag label from the tag label set: ['ADJ', 'ADP', 'ADV', 'AUX', 'CCONJ, 'DET',\
7
+ \ 'INTJ', 'NOUN', 'NUM', 'PART', 'PRON', 'PROPN', 'PUNCT', 'SCONJ', 'SYM', 'VERB',\
8
+ \ 'X']. \nYour response should include only a list of tuples, in the order that\
9
+ \ the words appear in the input sentence, including punctuations, with each tuple\
10
+ \ containing the corresponding POS tag label for a word. \n\nSentence: {{tokens}}\
11
+ \ \nOutput: "
12
+ include: masakhapos_yaml
13
+ task: masakhapos_ibo_prompt_1
lm-evaluation-harness/lm_eval/tasks/afrobench/masakhapos/prompt_1/masakhapos_kin.yaml ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Generated by utils.py
2
+ dataset_name: kin
3
+ doc_to_text: "Please provide the POS tags for each word in the input sentence. The\
4
+ \ input will be a list of words in the sentence. The output format should be a list\
5
+ \ of tuples, where each tuple consists of a word from the input text and its corresponding\
6
+ \ POS tag label from the tag label set: ['ADJ', 'ADP', 'ADV', 'AUX', 'CCONJ, 'DET',\
7
+ \ 'INTJ', 'NOUN', 'NUM', 'PART', 'PRON', 'PROPN', 'PUNCT', 'SCONJ', 'SYM', 'VERB',\
8
+ \ 'X']. \nYour response should include only a list of tuples, in the order that\
9
+ \ the words appear in the input sentence, including punctuations, with each tuple\
10
+ \ containing the corresponding POS tag label for a word. \n\nSentence: {{tokens}}\
11
+ \ \nOutput: "
12
+ include: masakhapos_yaml
13
+ task: masakhapos_kin_prompt_1
lm-evaluation-harness/lm_eval/tasks/afrobench/masakhapos/prompt_1/masakhapos_lug.yaml ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Generated by utils.py
2
+ dataset_name: lug
3
+ doc_to_text: "Please provide the POS tags for each word in the input sentence. The\
4
+ \ input will be a list of words in the sentence. The output format should be a list\
5
+ \ of tuples, where each tuple consists of a word from the input text and its corresponding\
6
+ \ POS tag label from the tag label set: ['ADJ', 'ADP', 'ADV', 'AUX', 'CCONJ, 'DET',\
7
+ \ 'INTJ', 'NOUN', 'NUM', 'PART', 'PRON', 'PROPN', 'PUNCT', 'SCONJ', 'SYM', 'VERB',\
8
+ \ 'X']. \nYour response should include only a list of tuples, in the order that\
9
+ \ the words appear in the input sentence, including punctuations, with each tuple\
10
+ \ containing the corresponding POS tag label for a word. \n\nSentence: {{tokens}}\
11
+ \ \nOutput: "
12
+ include: masakhapos_yaml
13
+ task: masakhapos_lug_prompt_1
lm-evaluation-harness/lm_eval/tasks/afrobench/masakhapos/prompt_1/masakhapos_luo.yaml ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Generated by utils.py
2
+ dataset_name: luo
3
+ doc_to_text: "Please provide the POS tags for each word in the input sentence. The\
4
+ \ input will be a list of words in the sentence. The output format should be a list\
5
+ \ of tuples, where each tuple consists of a word from the input text and its corresponding\
6
+ \ POS tag label from the tag label set: ['ADJ', 'ADP', 'ADV', 'AUX', 'CCONJ, 'DET',\
7
+ \ 'INTJ', 'NOUN', 'NUM', 'PART', 'PRON', 'PROPN', 'PUNCT', 'SCONJ', 'SYM', 'VERB',\
8
+ \ 'X']. \nYour response should include only a list of tuples, in the order that\
9
+ \ the words appear in the input sentence, including punctuations, with each tuple\
10
+ \ containing the corresponding POS tag label for a word. \n\nSentence: {{tokens}}\
11
+ \ \nOutput: "
12
+ include: masakhapos_yaml
13
+ task: masakhapos_luo_prompt_1
lm-evaluation-harness/lm_eval/tasks/afrobench/masakhapos/prompt_1/masakhapos_mos.yaml ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Generated by utils.py
2
+ dataset_name: mos
3
+ doc_to_text: "Please provide the POS tags for each word in the input sentence. The\
4
+ \ input will be a list of words in the sentence. The output format should be a list\
5
+ \ of tuples, where each tuple consists of a word from the input text and its corresponding\
6
+ \ POS tag label from the tag label set: ['ADJ', 'ADP', 'ADV', 'AUX', 'CCONJ, 'DET',\
7
+ \ 'INTJ', 'NOUN', 'NUM', 'PART', 'PRON', 'PROPN', 'PUNCT', 'SCONJ', 'SYM', 'VERB',\
8
+ \ 'X']. \nYour response should include only a list of tuples, in the order that\
9
+ \ the words appear in the input sentence, including punctuations, with each tuple\
10
+ \ containing the corresponding POS tag label for a word. \n\nSentence: {{tokens}}\
11
+ \ \nOutput: "
12
+ include: masakhapos_yaml
13
+ task: masakhapos_mos_prompt_1
lm-evaluation-harness/lm_eval/tasks/afrobench/masakhapos/prompt_1/masakhapos_nya.yaml ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Generated by utils.py
2
+ dataset_name: nya
3
+ doc_to_text: "Please provide the POS tags for each word in the input sentence. The\
4
+ \ input will be a list of words in the sentence. The output format should be a list\
5
+ \ of tuples, where each tuple consists of a word from the input text and its corresponding\
6
+ \ POS tag label from the tag label set: ['ADJ', 'ADP', 'ADV', 'AUX', 'CCONJ, 'DET',\
7
+ \ 'INTJ', 'NOUN', 'NUM', 'PART', 'PRON', 'PROPN', 'PUNCT', 'SCONJ', 'SYM', 'VERB',\
8
+ \ 'X']. \nYour response should include only a list of tuples, in the order that\
9
+ \ the words appear in the input sentence, including punctuations, with each tuple\
10
+ \ containing the corresponding POS tag label for a word. \n\nSentence: {{tokens}}\
11
+ \ \nOutput: "
12
+ include: masakhapos_yaml
13
+ task: masakhapos_nya_prompt_1
lm-evaluation-harness/lm_eval/tasks/afrobench/masakhapos/prompt_1/masakhapos_pcm.yaml ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Generated by utils.py
2
+ dataset_name: pcm
3
+ doc_to_text: "Please provide the POS tags for each word in the input sentence. The\
4
+ \ input will be a list of words in the sentence. The output format should be a list\
5
+ \ of tuples, where each tuple consists of a word from the input text and its corresponding\
6
+ \ POS tag label from the tag label set: ['ADJ', 'ADP', 'ADV', 'AUX', 'CCONJ, 'DET',\
7
+ \ 'INTJ', 'NOUN', 'NUM', 'PART', 'PRON', 'PROPN', 'PUNCT', 'SCONJ', 'SYM', 'VERB',\
8
+ \ 'X']. \nYour response should include only a list of tuples, in the order that\
9
+ \ the words appear in the input sentence, including punctuations, with each tuple\
10
+ \ containing the corresponding POS tag label for a word. \n\nSentence: {{tokens}}\
11
+ \ \nOutput: "
12
+ include: masakhapos_yaml
13
+ task: masakhapos_pcm_prompt_1
lm-evaluation-harness/lm_eval/tasks/afrobench/masakhapos/prompt_1/masakhapos_sna.yaml ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Generated by utils.py
2
+ dataset_name: sna
3
+ doc_to_text: "Please provide the POS tags for each word in the input sentence. The\
4
+ \ input will be a list of words in the sentence. The output format should be a list\
5
+ \ of tuples, where each tuple consists of a word from the input text and its corresponding\
6
+ \ POS tag label from the tag label set: ['ADJ', 'ADP', 'ADV', 'AUX', 'CCONJ, 'DET',\
7
+ \ 'INTJ', 'NOUN', 'NUM', 'PART', 'PRON', 'PROPN', 'PUNCT', 'SCONJ', 'SYM', 'VERB',\
8
+ \ 'X']. \nYour response should include only a list of tuples, in the order that\
9
+ \ the words appear in the input sentence, including punctuations, with each tuple\
10
+ \ containing the corresponding POS tag label for a word. \n\nSentence: {{tokens}}\
11
+ \ \nOutput: "
12
+ include: masakhapos_yaml
13
+ task: masakhapos_sna_prompt_1
lm-evaluation-harness/lm_eval/tasks/afrobench/masakhapos/prompt_1/masakhapos_swa.yaml ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Generated by utils.py
2
+ dataset_name: swa
3
+ doc_to_text: "Please provide the POS tags for each word in the input sentence. The\
4
+ \ input will be a list of words in the sentence. The output format should be a list\
5
+ \ of tuples, where each tuple consists of a word from the input text and its corresponding\
6
+ \ POS tag label from the tag label set: ['ADJ', 'ADP', 'ADV', 'AUX', 'CCONJ, 'DET',\
7
+ \ 'INTJ', 'NOUN', 'NUM', 'PART', 'PRON', 'PROPN', 'PUNCT', 'SCONJ', 'SYM', 'VERB',\
8
+ \ 'X']. \nYour response should include only a list of tuples, in the order that\
9
+ \ the words appear in the input sentence, including punctuations, with each tuple\
10
+ \ containing the corresponding POS tag label for a word. \n\nSentence: {{tokens}}\
11
+ \ \nOutput: "
12
+ include: masakhapos_yaml
13
+ task: masakhapos_swa_prompt_1
lm-evaluation-harness/lm_eval/tasks/afrobench/masakhapos/prompt_1/masakhapos_tsn.yaml ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Generated by utils.py
2
+ dataset_name: tsn
3
+ doc_to_text: "Please provide the POS tags for each word in the input sentence. The\
4
+ \ input will be a list of words in the sentence. The output format should be a list\
5
+ \ of tuples, where each tuple consists of a word from the input text and its corresponding\
6
+ \ POS tag label from the tag label set: ['ADJ', 'ADP', 'ADV', 'AUX', 'CCONJ, 'DET',\
7
+ \ 'INTJ', 'NOUN', 'NUM', 'PART', 'PRON', 'PROPN', 'PUNCT', 'SCONJ', 'SYM', 'VERB',\
8
+ \ 'X']. \nYour response should include only a list of tuples, in the order that\
9
+ \ the words appear in the input sentence, including punctuations, with each tuple\
10
+ \ containing the corresponding POS tag label for a word. \n\nSentence: {{tokens}}\
11
+ \ \nOutput: "
12
+ include: masakhapos_yaml
13
+ task: masakhapos_tsn_prompt_1
lm-evaluation-harness/lm_eval/tasks/afrobench/masakhapos/prompt_1/masakhapos_twi.yaml ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Generated by utils.py
2
+ dataset_name: twi
3
+ doc_to_text: "Please provide the POS tags for each word in the input sentence. The\
4
+ \ input will be a list of words in the sentence. The output format should be a list\
5
+ \ of tuples, where each tuple consists of a word from the input text and its corresponding\
6
+ \ POS tag label from the tag label set: ['ADJ', 'ADP', 'ADV', 'AUX', 'CCONJ, 'DET',\
7
+ \ 'INTJ', 'NOUN', 'NUM', 'PART', 'PRON', 'PROPN', 'PUNCT', 'SCONJ', 'SYM', 'VERB',\
8
+ \ 'X']. \nYour response should include only a list of tuples, in the order that\
9
+ \ the words appear in the input sentence, including punctuations, with each tuple\
10
+ \ containing the corresponding POS tag label for a word. \n\nSentence: {{tokens}}\
11
+ \ \nOutput: "
12
+ include: masakhapos_yaml
13
+ task: masakhapos_twi_prompt_1
lm-evaluation-harness/lm_eval/tasks/afrobench/masakhapos/prompt_1/masakhapos_wol.yaml ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Generated by utils.py
2
+ dataset_name: wol
3
+ doc_to_text: "Please provide the POS tags for each word in the input sentence. The\
4
+ \ input will be a list of words in the sentence. The output format should be a list\
5
+ \ of tuples, where each tuple consists of a word from the input text and its corresponding\
6
+ \ POS tag label from the tag label set: ['ADJ', 'ADP', 'ADV', 'AUX', 'CCONJ, 'DET',\
7
+ \ 'INTJ', 'NOUN', 'NUM', 'PART', 'PRON', 'PROPN', 'PUNCT', 'SCONJ', 'SYM', 'VERB',\
8
+ \ 'X']. \nYour response should include only a list of tuples, in the order that\
9
+ \ the words appear in the input sentence, including punctuations, with each tuple\
10
+ \ containing the corresponding POS tag label for a word. \n\nSentence: {{tokens}}\
11
+ \ \nOutput: "
12
+ include: masakhapos_yaml
13
+ task: masakhapos_wol_prompt_1
lm-evaluation-harness/lm_eval/tasks/afrobench/masakhapos/prompt_1/masakhapos_xho.yaml ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Generated by utils.py
2
+ dataset_name: xho
3
+ doc_to_text: "Please provide the POS tags for each word in the input sentence. The\
4
+ \ input will be a list of words in the sentence. The output format should be a list\
5
+ \ of tuples, where each tuple consists of a word from the input text and its corresponding\
6
+ \ POS tag label from the tag label set: ['ADJ', 'ADP', 'ADV', 'AUX', 'CCONJ, 'DET',\
7
+ \ 'INTJ', 'NOUN', 'NUM', 'PART', 'PRON', 'PROPN', 'PUNCT', 'SCONJ', 'SYM', 'VERB',\
8
+ \ 'X']. \nYour response should include only a list of tuples, in the order that\
9
+ \ the words appear in the input sentence, including punctuations, with each tuple\
10
+ \ containing the corresponding POS tag label for a word. \n\nSentence: {{tokens}}\
11
+ \ \nOutput: "
12
+ include: masakhapos_yaml
13
+ task: masakhapos_xho_prompt_1
lm-evaluation-harness/lm_eval/tasks/afrobench/masakhapos/prompt_1/masakhapos_yaml ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ tag:
2
+ - masakhapos_tasks
3
+ - masakhapos_prompt_1
4
+ dataset_path: masakhane/masakhapos
5
+ dataset_name: null
6
+ dataset_kwargs: {trust_remote_code: True}
7
+ output_type: generate_until
8
+ generation_kwargs:
9
+ do_sample: false
10
+ until:
11
+ - </s>
12
+ - <|im_end|>
13
+ validation_split: validation
14
+ test_split: test
15
+ fewshot_split: train
16
+ doc_to_target: !function utils.doc_to_target
17
+ should_decontaminate: true
18
+ doc_to_decontamination_query: "Sentence: {{token}}\nOutput:"
19
+ filter_list:
20
+ - filter:
21
+ - function: regex_pos
22
+ name: flexible-extract
23
+ metric_list:
24
+ - metric: acc
25
+ aggregation: !function utils.acc_score
26
+ higher_is_better: true
27
+ ignore_case: true
28
+ ignore_punctuation: true
29
+ regexes_to_ignore:
30
+ - ","
31
+ metadata:
32
+ version: 1.0
lm-evaluation-harness/lm_eval/tasks/afrobench/masakhapos/prompt_1/masakhapos_yor.yaml ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Generated by utils.py
2
+ dataset_name: yor
3
+ doc_to_text: "Please provide the POS tags for each word in the input sentence. The\
4
+ \ input will be a list of words in the sentence. The output format should be a list\
5
+ \ of tuples, where each tuple consists of a word from the input text and its corresponding\
6
+ \ POS tag label from the tag label set: ['ADJ', 'ADP', 'ADV', 'AUX', 'CCONJ, 'DET',\
7
+ \ 'INTJ', 'NOUN', 'NUM', 'PART', 'PRON', 'PROPN', 'PUNCT', 'SCONJ', 'SYM', 'VERB',\
8
+ \ 'X']. \nYour response should include only a list of tuples, in the order that\
9
+ \ the words appear in the input sentence, including punctuations, with each tuple\
10
+ \ containing the corresponding POS tag label for a word. \n\nSentence: {{tokens}}\
11
+ \ \nOutput: "
12
+ include: masakhapos_yaml
13
+ task: masakhapos_yor_prompt_1
lm-evaluation-harness/lm_eval/tasks/afrobench/masakhapos/prompt_1/masakhapos_zul.yaml ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Generated by utils.py
2
+ dataset_name: zul
3
+ doc_to_text: "Please provide the POS tags for each word in the input sentence. The\
4
+ \ input will be a list of words in the sentence. The output format should be a list\
5
+ \ of tuples, where each tuple consists of a word from the input text and its corresponding\
6
+ \ POS tag label from the tag label set: ['ADJ', 'ADP', 'ADV', 'AUX', 'CCONJ, 'DET',\
7
+ \ 'INTJ', 'NOUN', 'NUM', 'PART', 'PRON', 'PROPN', 'PUNCT', 'SCONJ', 'SYM', 'VERB',\
8
+ \ 'X']. \nYour response should include only a list of tuples, in the order that\
9
+ \ the words appear in the input sentence, including punctuations, with each tuple\
10
+ \ containing the corresponding POS tag label for a word. \n\nSentence: {{tokens}}\
11
+ \ \nOutput: "
12
+ include: masakhapos_yaml
13
+ task: masakhapos_zul_prompt_1
lm-evaluation-harness/lm_eval/tasks/afrobench/masakhapos/prompt_1/utils.py ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from itertools import chain
2
+
3
+ from sklearn.metrics import accuracy_score
4
+
5
+ from lm_eval.utils import weighted_f1_score
6
+
7
+
8
+ def doc_to_target(doc):
9
+ pos_tag_map = {
10
+ 0: "NOUN",
11
+ 1: "PUNCT",
12
+ 2: "ADP",
13
+ 3: "NUM",
14
+ 4: "SYM",
15
+ 5: "SCONJ",
16
+ 6: "ADJ",
17
+ 7: "PART",
18
+ 8: "DET",
19
+ 9: "CCONJ",
20
+ 10: "PROPN",
21
+ 11: "PRON",
22
+ 12: "X",
23
+ 13: "_",
24
+ 14: "ADV",
25
+ 15: "INTJ",
26
+ 16: "VERB",
27
+ 17: "AUX",
28
+ }
29
+ return [pos_tag_map[tag] for tag in doc["upos"]]
30
+
31
+
32
+ def acc_score(items):
33
+ unzipped_list = list(zip(*items))
34
+
35
+ golds, preds = unzipped_list[0], unzipped_list[1]
36
+
37
+ # Flatten preds' inner lists
38
+ flattened_preds = [list(chain.from_iterable(p)) for p in preds]
39
+
40
+ # Calculate the accuracy for each gold-pred pair
41
+ accuracy_scores = []
42
+ for gold, pred in zip(golds, flattened_preds):
43
+ # Ensure both lists are of the same length, otherwise truncate to match
44
+ min_length = min(len(gold), len(pred))
45
+ gold = gold[:min_length]
46
+ pred = pred[:min_length]
47
+
48
+ # Calculate accuracy for the current pair and add to the list
49
+ accuracy = accuracy_score(gold, pred)
50
+ accuracy_scores.append(accuracy)
51
+
52
+ mean_accuracy = (
53
+ sum(accuracy_scores) / len(accuracy_scores) if accuracy_scores else 0
54
+ )
55
+ return mean_accuracy
lm-evaluation-harness/lm_eval/tasks/afrobench/masakhapos/prompt_2/masakhapos_bam.yaml ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Generated by utils.py
2
+ dataset_name: bam
3
+ doc_to_text: "You are an expert in tagging words and sentences in Bambara with the\
4
+ \ right POS tag. \n\nPlease provide the POS tags for each word in the Bambara sentence.\
5
+ \ The input is a list of words in the sentence. POS tag label set: ['ADJ', 'ADP',\
6
+ \ 'ADV', 'AUX', 'CCONJ, 'DET', 'INTJ', 'NOUN', 'NUM', 'PART', 'PRON', 'PROPN', 'PUNCT',\
7
+ \ 'SCONJ', 'SYM', 'VERB', 'X']. The output format should be a list of tuples, where\
8
+ \ each tuple consists of a word from the input text and its corresponding POS tag\
9
+ \ label from the POS tag label set provided\nYour response should include only a\
10
+ \ list of tuples, in the order that the words appear in the input sentence, including\
11
+ \ punctuations, with each tuple containing the corresponding POS tag label for a\
12
+ \ word. \n\nSentence: {{tokens}} \nOutput: "
13
+ include: masakhapos_yaml
14
+ task: masakhapos_bam_prompt_2
lm-evaluation-harness/lm_eval/tasks/afrobench/masakhapos/prompt_2/masakhapos_bbj.yaml ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Generated by utils.py
2
+ dataset_name: bbj
3
+ doc_to_text: "You are an expert in tagging words and sentences in Ghomala with the\
4
+ \ right POS tag. \n\nPlease provide the POS tags for each word in the Ghomala sentence.\
5
+ \ The input is a list of words in the sentence. POS tag label set: ['ADJ', 'ADP',\
6
+ \ 'ADV', 'AUX', 'CCONJ, 'DET', 'INTJ', 'NOUN', 'NUM', 'PART', 'PRON', 'PROPN', 'PUNCT',\
7
+ \ 'SCONJ', 'SYM', 'VERB', 'X']. The output format should be a list of tuples, where\
8
+ \ each tuple consists of a word from the input text and its corresponding POS tag\
9
+ \ label from the POS tag label set provided\nYour response should include only a\
10
+ \ list of tuples, in the order that the words appear in the input sentence, including\
11
+ \ punctuations, with each tuple containing the corresponding POS tag label for a\
12
+ \ word. \n\nSentence: {{tokens}} \nOutput: "
13
+ include: masakhapos_yaml
14
+ task: masakhapos_bbj_prompt_2
lm-evaluation-harness/lm_eval/tasks/afrobench/masakhapos/prompt_2/masakhapos_ewe.yaml ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Generated by utils.py
2
+ dataset_name: ewe
3
+ doc_to_text: "You are an expert in tagging words and sentences in Ewe with the right\
4
+ \ POS tag. \n\nPlease provide the POS tags for each word in the Ewe sentence. The\
5
+ \ input is a list of words in the sentence. POS tag label set: ['ADJ', 'ADP', 'ADV',\
6
+ \ 'AUX', 'CCONJ, 'DET', 'INTJ', 'NOUN', 'NUM', 'PART', 'PRON', 'PROPN', 'PUNCT',\
7
+ \ 'SCONJ', 'SYM', 'VERB', 'X']. The output format should be a list of tuples, where\
8
+ \ each tuple consists of a word from the input text and its corresponding POS tag\
9
+ \ label from the POS tag label set provided\nYour response should include only a\
10
+ \ list of tuples, in the order that the words appear in the input sentence, including\
11
+ \ punctuations, with each tuple containing the corresponding POS tag label for a\
12
+ \ word. \n\nSentence: {{tokens}} \nOutput: "
13
+ include: masakhapos_yaml
14
+ task: masakhapos_ewe_prompt_2