【问题标题】:Split transcript into transcripts for different speakers将成绩单拆分为不同演讲者的成绩单
【发布时间】:2020-10-13 13:33:01
【问题描述】:

我有一个不同演讲者的成绩单,例如(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"

我该怎么做呢?

【问题讨论】:

  • 这是一个问题陈述。你试过什么?请用代码演示。

标签: python string transcription


【解决方案1】:

使用提供的方法修复它:Reading only the words of a specific speaker and adding those words to a list

这里的句子开头的正则表达式匹配用于指示不同说话者的流行程度,然后在字典中分成多个键值对。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2019-03-23
    • 1970-01-01
    • 1970-01-01
    • 2012-03-11
    • 2017-05-30
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多