鉴于各团队开始使用 Glyssen 对新约文本进行预处理,以识别文本中的每位说话者用于戏剧化录音,我想知道是否值得借助这项工作,在 Paratext 项目中自动标记耶稣的话 \wj … \wj*。
Glyssen 会生成一个包含所需数据的 Excel 文件,看起来像这样:
image.png 1171×522 59.8 KB
因此,生成一个脚本来查找文本中的这些位置并用 \wj … 标记 …\wj* 包裹它们应该相对容易。
我自己尝试了一些简单的操作,使用了几张生成的 CC 表,成功标记了 1901 处耶稣的话中的 88%。然而,这仍然留下了 200 多处需要我手动进入并修复的地方。对这个结果不满意,并希望将来通过自动化、完整且更可靠的方式为其他人节省时间,我考虑创建一个自定义脚本(Custom Script,使用 Python),以便直接在 Paratext 内部完成此任务。
使用 CC 方法时,大多数“失败”的情况是因为其他标记(如 \w angel|angels\w* 或 \f 脚注和 \x 交叉引用)嵌入在要搜索的文本中。我有一些想法,可以通过使用正则表达式(Regular Expressions)(以及搜索字符串的开头和结尾而不是整个字符串等)来绕过这些问题,但这超出了 CC 的范围,需要使用一些 Python 代码才能实现。
但是,在我尝试制作一个自定义脚本来完成此任务之前,我想知道是否有人已经做过类似的事情。我不想重新发明轮子!查看随 Paratext 附带的示例脚本,我看到最接近的是 DRM 编写的 TransferParallelPassageRefs.py。
是否有人有类似的东西,或者是否有其他人更擅长使用 ScriptureObjects 进行 Python 编程,能够比我做得更好?如果有帮助的话,我愿意编写伪代码。我也愿意学习并与其他人合作处理这个问题……
Given that teams are starting to use Glyssen to pre-process their NT texts to identify each speaker in the text for a dramatized recording, I wondered whether it would be worth piggy-backing on that work to AUTOMATICALLY mark up the Words of Jesus \wj … \wj* in the Paratext project.
Glyssen produces an Excel file with the needed data in it, which looks like this:
image.png 1171×522 59.8 KB
So it should be relatively easy to generate a script to find these places in the text and wrap them with the \wj … markup …\wj*
I tried something simple myself with a couple of generated CC tables, and managed to get 88% of the 1901 occurrences of the words of Jesus marked up successfully. However, this still leaves 200+ places where I would need to go in and fix it manually. Being unsatisfied with this result, and wanting to save others time in the future by making it automated, complete and more foolproof, I wondered about creating a Custom Script (in Python) that could do this task directly from within Paratext.
Most of the “failed” cases with the CC method are because of other markup like \w angel|angels\w* or \f footnotes and \x cross-references being embedded within the text being searched for. I’ve got some ideas about how to get around those using Regular Expressions (and searching for the start and end of strings rather than the whole string, etc.) but that is beyond CC and would need to use some Python code to make it possible.
BUT, before I attempt to make a Custom Script to do this, I’m wondering if anyone else has done something similar already. I don’t want to re-invent the wheel! Looking at the sample scripts shipped with Paratext, the closest thing I see is TransferParallelPassageRefs.py by DRM.
Does anyone else have something similar, or is anyone else more gifted at Python programming with ScriptureObjects who could pull this together better than I ever could? I’m willing to write the pseudo code if that’s helpful. And I’m willing to learn and work with someone else on this…
机器翻译自 English 显示原文