super_tweeteval / get_stats.py
asahi417's picture
add offload_folder
6d913b1
raw
history blame
735 Bytes
import pandas as pd
from datasets import load_dataset
table = []
task_description = {
'tweet_intimacy': "regression on a single text",
'tweet_ner7': "sequence labeling",
'tweet_qa': "generation",
'tweet_similarity': "regression on two texts",
'tweet_topic': "multi-label classification"
}
for task in ['tweet_intimacy', 'tweet_ner7', 'tweet_qa', 'tweet_similarity', 'tweet_topic']:
data = load_dataset("cardiffnlp/super_tweet_eval", task)
tmp_table = {"task": task, "description": task_description[task]}
tmp_table['number of instances'] = " / ".join([str(len(data[s])) for s in ['train', 'validation', 'test']])
table.append(tmp_table)
df = pd.DataFrame(table)
print(df.to_markdown(index=False))