将成绩单拆分为不同演讲者的成绩单
Split transcript into transcripts for different speakers
我有不同演讲者的成绩单,例如 (new.txt):
spk_0: Default transcript, containing many sentences. Such as this.
spk_1: Blablabla
spk_2: Blablablaba fjdslf
我想从这个只包含演讲者所说的文字的文字记录中创建不同的字符串,例如:
new_spk_0 = "Default transcript, containing many sentences. Such as this."
new_spk_1 = "Blablabla"
我该怎么做?
使用以下提供的方法修复了它:Reading only the words of a specific speaker and adding those words to a list
此处句子开头的正则表达式匹配用于指示不同说话者的流行程度,随后在字典中分成多个 key-value 对。
我有不同演讲者的成绩单,例如 (new.txt):
spk_0: Default transcript, containing many sentences. Such as this.
spk_1: Blablabla
spk_2: Blablablaba fjdslf
我想从这个只包含演讲者所说的文字的文字记录中创建不同的字符串,例如:
new_spk_0 = "Default transcript, containing many sentences. Such as this."
new_spk_1 = "Blablabla"
我该怎么做?
使用以下提供的方法修复了它:Reading only the words of a specific speaker and adding those words to a list
此处句子开头的正则表达式匹配用于指示不同说话者的流行程度,随后在字典中分成多个 key-value 对。