0 votes
331 views

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:


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…

Paratext by (3.2k points) | 331 views

2 Answers

0 votes

If you figure this out, I’d really like to see it.
But it would make all our lives easier, if PT would allow \w \w* to span across verse number references, footnotes, and xrefs. It is tedious (and error prone) to start and stop the \w markings around things that have nothing to do with the actual words of Christ. (In fact, it’d be nice if the \w style went across paragraph marks too, and would only throw an error if the end of a chapter was reached without seeing a \w*.)

by (370 points)

I doubt if this will ever happen since \wj … \wj* is a character style and it would require redefining character style behavior. You could, however, consider creating a custom paragraph style in the custom.sty stylesheet (see Paratext Helps for more info on custom stylesheets).

Blessings,

Shegnada James

+1 vote

There are a series of tools at https://lingtran.net/Voice-Marking-Tools that can be used to help with this process.

by (9.8k points)

Related questions

0 votes
1 answer 203 views
Our project uses the \wj marker for Words of Jesus and displays the text using the default (defined by usfm.sty) ... Any suggestions of how to do this would be greatly appreciated.
mnjames 1.9k asked Nov 23, 2015
0 votes
0 answers 176 views
When I open a Text Collection, all of the Scripture text is black: image616 509 23.7 KB But when I click on one of ... YEAH!! It looks REALLY nice that way. Way to go developers!!
[Moderator]
james_post
2.1k
asked Mar 31, 2021
0 votes
4 answers 485 views
When exporting a portion of the Gospels from Paratext to PDF, Jesus words in red are not showing up in the file. It works when exporting it to RTF but not with PDF.
ace541611 123 asked Jul 7, 2021
0 votes
3 answers 508 views
After delving into the laborious, cluttersome demands of tagging the Words of Jesus with \wj \wj* to make a Paratext ... would be willing to share a copy with me. -Thanks!
anon150053 286 asked Oct 21, 2020
0 votes
1 answer 19 views
I see that there was a bug in v7 (at least) which prevented formatting quotes (italics) as words of Jesus (red). But I ... wrong? Is this a feature or a bug? Is there a workaround?
ASmith 169 asked Jul 10, 2025
Welcome to Support Bible, where you can ask questions and receive answers from other members of the community.
But if we walk in the light, as he is in the light, we have fellowship with one another, and the blood of Jesus, his Son, purifies us from all sin.
1 John 1:7
3,037 questions
5,995 answers
5,661 comments
2,022 users