import re import io import zipfile import json def parse_dialogue_tags(dialogue): """ Parses the dialogues with tags and returns clean dialogue and tags """ parts = re.split(r'()', dialogue) current_word_idx = 0 clean_text = "" tags = [] for part in parts: if part.startswith("