遇见数据集

jondurbin/cinematika-v0.1

收藏
Hugging Face2024-04-11 更新2024-03-04 收录
官方服务:

资源简介:

Cinematika是一个包含211部电影剧本的数据集,这些剧本被转换为小说风格的多角色角色扮演(RP)数据。转换过程结合了手动正则表达式解析和基于上下文学习的LLM增强技术,使用了定制的mistral-7b模型进行微调。数据集包含多个Parquet文件,每个文件都有不同的用途,如存储单个场景、完整剧本、角色卡片等。此外,README还提供了角色卡片和场景的示例,以及如何贡献和资助项目的信息。

Cinematika is a dataset consisting of 211 movie scripts, which have been converted into novel-style multi-character role-playing (RP) data. The conversion process combines manual regular expression parsing and context-learning-based LLM enhancement techniques, using a fine-tuned custom Mistral-7B model. The dataset includes multiple Parquet files, each serving distinct purposes such as storing individual scenes, full scripts, character cards, and more. Additionally, the README provides examples of character cards and scenes, as well as information on how to contribute to and fund the project.

提供机构:
jondurbin
原始信息汇总

Cinematika 数据集

概述

Cinematika 是一个包含 211 部电影剧本转换为小说风格、多角色角色扮演(RP)数据的数据集。这些转换是通过手动正则表达式解析和使用自定义的 mistral-7b 微调模型进行上下文学习增强完成的。

数据文件

  • plain_scenes.parquet
    • 独立的 RP 化“场景”,基本上是使用 INT., EXT., FADE TO 等场景变化标识符将剧本分割成的小场景。小场景被合并。
  • plain_full_script.parquet
    • 完整的 RP 化剧本,即基本上是 " ".join(plain_scenes)
  • scene_by_scene.parquet
    • 独立的场景,前缀为角色卡片、“NPC”列表(NPC 是指在整个剧本中少于 15 行的角色)和场景概要。
  • full_script.parquet
    • 完整的剧本,随着剧本的进展引入角色卡片/NPC。
  • character_cards.parquet
    • 每个创建的角色卡片,仅适用于在剧本中超过 15 行的角色。
  • scene_enhancement.parquet
    • 用于将电影剧本片段转换为角色扮演格式的训练数据。
  • scene_summary.parquet
    • 用于将电影场景转换为摘要的训练数据。
  • rp_to_character_card.parquet
    • 用于将角色对话示例转换为角色卡片的训练数据。
  • character_card_reverse_prompt.parquet
    • 用于从角色卡片生成反向角色卡片提示的训练数据,即给定一个角色卡片,生成一个能产生该角色卡片的提示。
  • prompt_to_character_card.parquet
    • 用于从提示生成角色卡片的训练数据(与 character_card_reverse_prompt 相反)。

每个 parquet 文件包含多个字段,其中包括 movie_id: uuidtitle: str

示例角色卡片

name: Rorschach characteristics: Determination: Exhibits a relentless pursuit of the truth and justice, no matter the cost. Suitable for a character who is unwavering in their mission. Isolation: Lives a solitary life, disconnected from society. Fits a character who distrusts others and prefers to work alone. Observant: Highly perceptive, able to piece together clues and draw conclusions. Represents a character with keen investigative skills. Cynicism: Holds a deep-seated distrust of humanity and its institutions. Suitable for a character who is pessimistic about human nature. Vigilantism: Believes in taking justice into his own hands, often through violent means. Fits a character who operates outside the law to fight crime. Secrecy: Keeps his personal life and methods of operation secret. Suitable for a character who is enigmatic and elusive. Dedication: Committed to his cause, often to the point of obsession. Represents a character who is single-minded in their goals. Intimidation: Uses his intimidating presence and demeanor to control situations. Suitable for a character who is assertive and imposing. Paranoia: Suspects conspiracy and deception at every turn. Fits a character who is constantly on high alert for threats. Moral Compass: Has a rigid moral code, which he adheres to strictly. Suitable for a character who is principled and unyielding.

description: | Rorschach is a vigilante operating in the grim and gritty world of a decaying city. He is a man of average height with a muscular build, his face hidden behind a mask with a constantly changing inkblot pattern. His attire is a dark trench coat and gloves, paired with a plain white shirt and black pants, all chosen for their practicality and anonymity. His eyes, the only visible feature of his face, are sharp and calculating, always scanning for signs of deception or danger.

Rorschach is a man of few words, but when he speaks, it is with a gravitas that demands attention. He is a master of deduction, using his keen observation skills to unravel the truth behind the facades of others. His methods are often violent and confrontational, as he believes that crime must be met with force to be truly defeated.

He lives a life of solitude, distrusting the very systems he seeks to protect and often finds himself at odds with the very people he is trying to save. His moral compass is unyielding, and he will not hesitate to take the law into his own hands if he believes the justice system has failed.

Rorschachs past is a mystery to most, but it is clear that he has experienced trauma and hardship that has shaped his worldview and his need for vigilantism. He is a vigilante in the truest sense, a man without fear who is willing to sacrifice everything for his belief in a world that is, in his eyes, spiraling into chaos.

example_dialogue: | Rorschach: "Rorschachs Journal, October 19th." I speak the words into the darkness, a record of my thoughts, "Someone tried to kill Adrian Veidt. Proves mask killer theory—the murderer is closing in. Pyramid Industries is the key." {{user}}: I watch him for a moment, trying to gauge his intentions. "What are you going to do about it?" Rorschach: "Im going to find out why and who is behind it. Im going to do what I always do—protect the innocent."

{{user}}: "You cant keep doing this, Rorschach. Youre putting yourself in danger." Rorschach: My eyes narrow, the inkblot pattern of my mask shifting subtly. "Ive been in danger my whole life. Its why I do this. Its why I have to do this."

{{user}}: "And what about the law? What if youre wrong about this Pyramid Industries thing?" Rorschach: I pull out a notepad, my pen scratching across the paper as I write. "The law often gets it wrong. Ive seen it. Im not about to wait around for societys slow, corrupt wheels to turn."

示例场景

[characters] name: Rorschach ...

name: Hollis Mason ...

NPCS:

  • News Vendor
  • Shopkeeper [/characters]

[scenario] Hollis Mason 反思他作为最初的 Nite Owl 的过去,回忆起蒙面英雄的早期日子和 Watchmen 的形成。 他讨论了超级英雄世界的荒谬性以及他与各种反派的遭遇。 Dan Dreiberg,第二任 Nite Owl,加入了对话,他们分享了一个友好的时刻,然后 Dan 离开。 Rorschach 的行动的消息提醒了蒙面英雄的遗产仍然存在。 [/scenario]

[setting] 夜晚的宁静,如果可以称之为宁静,笼罩着 Hollis Mason 的公寓。 空气中充满了回忆和另一个房间里老旧电视机的微弱嗡嗡声。

Hollis: 当我拿着第一代 Watchmen 的装框照片时,就像 Blake 壁橱里的那张一样,我不禁反思过去。 "他年轻而傲慢,但他缺乏经验,却以坚韧弥补。" 我的声音在房间的静谧中回荡,每一个字都是对曾经那个少年的见证。

...

搜集汇总
数据集介绍
jondurbin/cinematika-v0.1 数据集图片
构建方式
Cinematika数据集由211部电影剧本经精细加工转化而成,旨在构建多角色角色扮演(RP)格式的叙事数据。其构建融合了正则表达式解析与基于上下文的语言模型增强技术,具体采用定制的Mistral-7B微调模型进行剧本到小说风格及多角色对话的转换。数据集的生成流程包括将原始剧本依据场景标识(如INT.、EXT.、FADE TO等)切分为独立场景,合并短小场景后生成角色扮演化的场景文本,进而构建完整剧本、角色卡片、NPC列表及场景摘要等多层次结构。此外,还衍生出用于训练场景增强、摘要生成、角色卡片逆向生成等任务的辅助数据文件,所有数据均以Parquet格式存储,并包含电影ID与标题等元信息。
特点
该数据集的核心特色在于其多维度、结构化的角色扮演数据设计。它不仅提供了完整的剧本级和场景级角色扮演文本,还精心构建了角色卡片,详细刻画每个主要角色的性格特质、外貌描述及示例对话,使角色形象丰满且可交互。数据集引入了NPC(台词少于15句的角色)概念,并随剧情推进动态引入角色卡片,增强了叙事的真实感与复杂性。此外,它还包含了多种训练专用数据,如场景增强、摘要生成及角色卡片逆向生成等,为模型训练提供了丰富的监督信号。这种多层次、多任务的数据结构,使得Cinematika不仅适用于对话生成,还可用于角色理解、场景推理等高级自然语言处理任务。
使用方法
使用Cinematika数据集时,用户可直接加载Parquet文件中的各子集,根据任务需求选择合适的数据类型。对于角色扮演对话生成,可选用plain_scenes或scene_by_scene文件,其中后者已预置角色卡片与场景摘要,便于直接输入模型。若需训练模型理解完整剧本叙事,可使用full_script或plain_full_script。针对角色卡片生成或逆向推理任务,可调用character_cards、rp_to_character_card或prompt_to_character_card等专用数据。所有数据均通过movie_id与title字段关联,便于跨文件整合。用户还可参考示例代码,利用HuggingFace Datasets库加载Parquet文件,并结合自定义微调框架进行模型训练,以适配特定角色扮演或叙事理解场景。
背景与挑战
背景概述
在自然语言处理与角色扮演智能体研究领域,高质量的多角色对话数据集是推动模型理解复杂叙事结构与角色一致性的关键资源。由研究者Jon Durbin于近期创建的Cinematika-v0.1数据集,旨在将经典电影剧本转化为小说风格的多角色角色扮演数据,以弥合剧本结构化对话与开放式角色扮演之间的鸿沟。该数据集包含211部电影的脚本,通过手工正则解析与基于Mistral-7B微调模型的上下文学习增强生成,最终产出包括场景分割、角色卡片、摘要及多种训练数据格式的丰富资源。其核心研究问题聚焦于如何利用电影剧本这一高度结构化、人物关系密集的文本,自动构建具备角色深度与情节连贯性的交互式角色扮演语料,从而为对话系统、游戏NPC生成及叙事理解等领域提供高质量的训练基础。该数据集的发布为角色扮演数据自动构建开辟了新路径,其多模态转换思想对后续研究具有重要启发意义。
当前挑战
当前Cinematika-v0.1数据集面临多重挑战。首先,在领域问题层面,从剧本到角色扮演的转换需要精准捕捉角色性格、对话动机与场景氛围,避免生硬的文本拼接,这对模型理解叙事逻辑与角色一致性提出了极高要求。其次,构建过程中,手工正则解析难以覆盖所有剧本格式的变体,导致部分场景分割不准确或角色归属错误;LLM增强虽能提升流畅性,但可能引入幻觉或偏离原始剧本意图,尤其在处理多角色交叉对话时,上下文学习的效果受限于提示设计。此外,数据集的规模(211部电影)尚不足以覆盖多样的叙事风格与角色类型,后续扩展至2400部电影的计划面临计算成本与质量控制的双重压力。最后,角色卡片生成的自动化程度仍待提升,如何确保卡片描述与剧本中角色行为的高度一致,是当前亟待解决的难题。
常用场景
经典使用场景
Cinematika数据集的核心价值在于将经典电影剧本转化为长篇多角色扮演(RP)数据,为自然语言处理中的对话生成与角色建模提供了独特资源。通过将211部电影剧本解析为结构化场景,并辅以角色卡片、NPC列表及场景摘要,该数据集支持构建高度沉浸式的交互式叙事系统。研究者可基于其平铺场景(plain_scenes)与完整脚本(full_script)文件,训练语言模型理解复杂对话的上下文依赖与角色一致性,从而在生成式AI中复现电影级的情节连贯性与角色深度。
实际应用
在实际应用中,Cinematika可直接赋能交互式娱乐与教育领域。例如,游戏开发中可基于角色卡片与场景数据构建非玩家角色(NPC)的智能对话系统,使其行为与性格高度一致,提升玩家沉浸感。在虚拟伴侣或语言学习应用中,该数据集能训练模型动态扮演历史或虚构人物,进行自然且符合设定的多轮对话。此外,其角色卡片反向提示(character_card_reverse_prompt)子集可用于自动化角色生成工具,辅助编剧快速创建具有深度个性的虚拟角色。
衍生相关工作
Cinematika衍生了多项关键工作,包括基于其pipeline的扩展数据集(计划覆盖约2400部电影)以及配套的开源工具链(如bagel与airoboros项目)。这些工作进一步探索了剧本解析的自动化方法,例如利用微调后的Mistral-7B模型进行上下文学习增强。此外,场景摘要与角色卡片生成子集为少样本学习提供了基准,催生了如角色驱动故事生成与跨剧本角色迁移等研究方向。这些衍生工作不仅验证了结构化电影数据在NLP中的潜力,也为构建更通用的叙事智能系统奠定了基础。
以上内容由遇见数据集搜集并总结生成
二维码
社区交流群
二维码
科研交流群
商业服务