Dialogue Parser
This skill parses raw dialogue script text files into a structured JSON graph.
Parsing Rules
- Section headers:
[NodeName]on their own line - Speaker lines:
Speaker: text -> Target(target optional) - Choice lines:
N. [OptionalTag] Choice text -> Target - Node type is "choice" if section has numbered choices, else "line"
Output Schema
{"nodes": [{"id": str, "text": str, "speaker": str, "type": str}], "edges": [{"from": str, "to": str, "text": str}]}
Key Functions
parse_dialogue_text(script_text)- Parse raw text into intermediate sectionsbuild_json_graph(sections)- Convert sections to graph schemavalidate_graph(graph)- Validate reachability and edge targetsparse_script(script_text)- End-to-end: parse, build, validate