Re: Python script for checking pairwise characters (PROFF-OF-CONCEPT)

Matěj Cepl <[email protected]>
Newsgroups gmane.comp.literature.sword.devel
Message-ID <[email protected]>
On Mon Dec 18, 2023 at 2:38 PM CET, Kristof Szabo wrote:
> I wrote some time back https://github.com/krisek/sword-test, with quite a
> few test cases, which, I think, covers your use case as well.

Couple of differences on the first look:

1. Functionally, I prefer my script which stops when the first
   unpaired character is found, thus allowing fixing the problem.
2. I use SAX API (xml.sax from the standard library) and it seems
   to me like better suited for the Bible processing than the
   traditional DOM (or LXML) interface. It nicely hides away all
   hard work going on in the background and let me work only on
   what’s relevant to my task. See
   https://gitlab.com/crosswire-bible-society/CzeCSP/-/blob/master/CEPtoOSIS.py
   for an example of much more complicated processing (and also,
   it is ten-fold or something like that faster than processing
   with Java and Saxon/XSLT).

> > Temporarily the script is in its own repo
> > (https://gitlab.com/mcepl/bible-freq-counter) and attached to
> > this message, but I would like to submit it to sword-utils. How
> > to do it?

Just an update … I have moved the script to
https://git.crosswire.org/mcepl/bible-freq-counter.

Best,

Matěj

-- 
http://matej.ceplovi.cz/blog/, @mcepl-ZvyNPa7Jd/[email protected]
GPG Finger: 3C76 A027 CA45 AD70 98B5  BC1D 7920 5802 880B C9D8
 
Nemo plus iuris ad alium transfere potest quam ipse habet.

_______________________________________________
sword-devel mailing list: [email protected]
http://crosswire.org/mailman/listinfo/sword-devel
Instructions to unsubscribe/change your settings at above page
signature.asc (application/pgp-signature, 216 B)
-----BEGIN PGP SIGNATURE-----

iGwEABECACwWIQSJ70vGKIq/QxurJcPgn+8l2WSErAUCZYBbGA4cbWNlcGxAY2Vw
bC5ldQAKCRDgn+8l2WSErHL5AJ9u49h2oAG2TMaixF3cisQi76zkdACeKAwk6Zxw
nUc40MbJaGY13wBPf5Y=
=IFQJ
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.