Reddit Comments Dataset for Text Style Transfer Tasks
收藏Zenodo2023-06-17 更新2026-05-26 收录
下载链接:
https://zenodo.org/record/8051180
下载链接
链接失效反馈官方服务:
资源简介:
<strong>Reddit Comments Dataset for Text Style Transfer Tasks</strong> A dataset of Reddit comments prepared for Text Style Transfer Tasks. The dataset contains Reddit comments translated into a formal language. For the translation of Reddit comments into a formal language text-davinci-003 was used. To make text-davinci-003 translate the comments into a more formal version, the following prompt was used:<br> "Here is some text: {original_comment} Here is a rewrite of the text, which is more neutral: {"<br> This prompting technique was taken from A Recipe For Arbitrary Text Style Transfer with Large Language Models. The dataset contains comments from the following Subreddits: antiwork, atheism, Conservative, conspiracy, dankmemes, gaybros, leagueoflegends, lgbt, libertarian, linguistics, MensRights, news, offbeat, PoliticalCompassMemes, politics, teenagers, TrueReddit, TwoXChromosomes, wallstreetbets, worldnews. The quality of formal translations was assessed with BERTScore and chrF++: BERTScore: F1-Score: 0.89, Precision: 0.90, Recall: 0.88 chrF++: 37.16 The average perplexity of the generated formal texts was calculated using GPT-2 and is 123.77 <br> The dataset consists of 3 components. <strong>reddit_commments.csv</strong> This file contains a collection of randomly selected comments from 20 Subreddits. For each comment, the following information was collected:<br> - subreddit (name of the subreddit in which the comment was posted)<br> - id (ID of the comment)<br> - submission_id (ID of the submission to which the comment was posted)<br> - body (the comment itself)<br> - created_utc (timestamp in seconds)<br> - parent_id (The ID of the comment or submission to which the comment is a reply)<br> - permalink (The URL to the original comment)-<br> - token_size (How many tokens the comment will be split into by the standard GPT-2 tokenizer)<br> - perplexity (What perplexity does GPT-2 calculate for the comment) The comments were filtered. This file contains only comments that:<br> - have been split by GPT-2 Tokenizer into more than 10 tokens but less than 512 tokens.<br> - are not [removed] or [deleted]<br> - do not contain URLs This file was used as a source for the other two file types. <strong>Labeled Files</strong> (training_labeled.csv and eval_labeled.csv) These files contain the formal translations of the Reddit comments. The 150 comments with the highest calculated perplexity of GPT-2 from each Subreddit were translated into a formal version. This filter was used to translate as many comments as possible that have large stylistic salience. They are structured as follows:<br> - Subreddit (name of the subreddit where the comment was posted).<br> - Original Comment<br> - Formal Comment <strong>Labeled Files with Style Examples </strong>(training_labeled_with_style_samples.json and eval_labeled_with_style_samples.json) These files contain an original Reddit comment, three sample comments from the same subreddit, and the formal translation of the original Reddit comment. These files can be used to train models to perform style transfers based on given examples.<br> The task is to transform the formal translation of the Reddit comment, using the three given examples, into the style of the examples. An entry in this file is structured as follows: "data":[<br> {<br> "input_sentence":"The original Reddit comment",<br> "style_samples":[<br> "sample1",<br> "sample2",<br> "sample3"<br> ],<br> "results_sentence":"The formal translated input_sentence",<br> "subreddit":"The subreddit from which the comments originated"<br> },<br> "..."<br> ]
**面向文本风格迁移任务的Reddit评论数据集**
本数据集为面向文本风格迁移任务构建的Reddit评论数据集,收录了经规范化语言改写的Reddit评论。本次规范化改写使用了text-davinci-003模型,为使该模型将评论转换为更正式的文本,我们采用了如下提示词:
"Here is some text: {original_comment} Here is a rewrite of the text, which is more neutral: {"
该提示方法源自论文《基于大语言模型的任意文本风格迁移方法》(A Recipe For Arbitrary Text Style Transfer with Large Language Models)。
数据集收录了来自以下20个Reddit子版块的评论:antiwork、atheism、Conservative、conspiracy、dankmemes、gaybros、leagueoflegends、lgbt、libertarian、linguistics、MensRights、news、offbeat、PoliticalCompassMemes、politics、teenagers、TrueReddit、TwoXChromosomes、wallstreetbets、worldnews。
规范化翻译的质量通过BERTScore与chrF++两项指标进行评估:BERTScore的F1值为0.89、精确率为0.90、召回率为0.88;chrF++得分为37.16。生成的规范化文本的平均困惑度通过GPT-2模型计算得到,数值为123.77。
本数据集包含3个组成部分。
**reddit_comments.csv**
该文件收录了从20个Reddit子版块中随机选取的评论,每条评论包含如下信息:
- subreddit:评论所属的Reddit子版块名称
- id:评论的唯一标识符
- submission_id:该评论所属的投稿ID
- body:评论正文内容
- created_utc:以秒为单位的Unix时间戳
- parent_id:该评论所回复的评论或投稿的ID
- permalink:指向原评论的URL
- token_size:标准GPT-2分词器对该评论进行分词后的Token数量
- perplexity:GPT-2模型为该评论计算得到的困惑度
该文件中的评论经过筛选,仅保留满足以下条件的评论:
- 经GPT-2分词器分词后的Token数量介于10至512之间
- 未被标记为[removed]或[deleted]
- 不包含URL链接
该文件作为另外两类文件的数据源。
**带标注文件(training_labeled.csv 与 eval_labeled.csv)**
此类文件收录了Reddit评论的规范化翻译版本。我们从每个Reddit子版块中选取GPT-2困惑度最高的150条评论进行规范化改写,该筛选策略旨在保留尽可能多的具有显著风格特征的评论。文件结构如下:
- Subreddit:评论所属的Reddit子版块名称
- Original Comment:原始评论内容
- Formal Comment:规范化改写后的评论内容
**带风格示例的带标注文件(training_labeled_with_style_samples.json 与 eval_labeled_with_style_samples.json)**
此类文件收录了单条原始Reddit评论、3条来自同一子版块的风格示例评论,以及该原始评论的规范化翻译版本,可用于训练基于给定示例的文本风格迁移模型。
该数据集对应的任务为:基于提供的3条风格示例,将原始Reddit评论的规范化翻译版本转换为与示例风格一致的文本。
该文件中的单条数据条目结构如下:
"data":[
{
"input_sentence":"原始Reddit评论内容",
"style_samples":[
"示例评论1",
"示例评论2",
"示例评论3"
],
"results_sentence":"经规范化翻译后的输入文本",
"subreddit":"该评论所属的Reddit子版块名称"
},
"..."
]
提供机构:
Zenodo创建时间:
2023-06-17



