Étant donné que les équipes commencent à utiliser Glyssen pour pré-traiter leurs textes du NT afin d'identifier chaque locuteur dans le texte pour un enregistrement dramatisé, je me suis demandé s'il valait la peine de profiter de ce travail pour baliser AUTOMATIQUEMENT les Paroles de Jésus \wj … \wj* dans le projet Paratext.
Glyssen produit un fichier Excel contenant les données nécessaires, qui ressemble à ceci :

image.png1171×522 59.8 KB
Il devrait donc être relativement facile de générer un script pour trouver ces endroits dans le texte et les entourer avec le balisage \wj … \wj*
J'ai essayé quelque chose de simple moi-même avec quelques tables CC générées, et j'ai réussi à baliser avec succès 88 % des 1901 occurrences des paroles de Jésus. Cependant, cela laisse encore plus de 200 endroits où je devrais intervenir pour corriger manuellement. Insatisfait de ce résultat, et souhaitant faire gagner du temps aux autres à l'avenir en automatisant le processus pour le rendre complet et plus fiable, je me suis demandé s'il serait possible de créer un script personnalisé (en Python) capable d'effectuer cette tâche directement depuis Paratext.
La plupart des cas « échoués » avec la méthode CC sont dus à d'autres balisages comme \w angel|angels\w* ou \f notes de bas de page et \x références croisées qui sont intégrés dans le texte recherché. J'ai quelques idées sur la façon de contourner ces problèmes en utilisant des expressions régulières (et en recherchant le début et la fin des chaînes plutôt que la chaîne entière, etc.), mais cela dépasse les capacités de CC et nécessiterait l'utilisation de code Python pour être possible.
MAIS, avant de tenter de créer un script personnalisé pour cela, je me demande si quelqu'un d'autre a déjà fait quelque chose de similaire. Je ne veux pas réinventer la roue ! En examinant les scripts d'exemple fournis avec Paratext, la chose la plus proche que je vois est TransferParallelPassageRefs.py par DRM.
Quelqu'un d'autre a-t-il quelque chose de similaire, ou quelqu'un d'autre est-il plus doué en programmation Python avec ScriptureObjects et pourrait-il assembler cela mieux que je ne pourrais jamais le faire ? Je suis prêt à écrire le pseudo-code si cela est utile. Et je suis prêt à apprendre et à travailler avec quelqu'un d'autre sur ce sujet…
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.png1171×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…
Traduit automatiquement depuis English