Code Monkey home page Code Monkey logo

Comments (7)

karlkleinpaste avatar karlkleinpaste commented on September 14, 2024 1

I intend to babble at sword-devel first, sometime today.

from xiphos.

karlkleinpaste avatar karlkleinpaste commented on September 14, 2024

Now that's darn peculiar.

Once upon a nightmare, when I added the search button to the dict pane (#891), this was part of the new code:

	/* heb numbers use a pointless leading 0, grk does not. */
        if (hebrew) --start;

So this was actually deliberate. Backing up start was specifically to include a leading zero. In fact, a crash case later made me update slightly:

	if (hebrew && (start > key))
		--start;

It is a certainty that this worked as expected at the time. I can only guess that some underlying Sword update has altered the behavior.

The workaround for the moment is to open the sidebar search where you will find the constructed search case, remove the leading zero, and re-run the search. I will have to experiment to find out whether avoiding the leading zero is a general solution.

from xiphos.

karlkleinpaste avatar karlkleinpaste commented on September 14, 2024

Oh, I should have explained: Early in Sword, an otherwise useless leading zero was how Heb vs Grk Strong's refs were distinguished, and thus the KJV module is, or was, encoded. So it was quite relevant in that regard. Over time, in many contexts the discriminant changed to use a leading H or G.

from xiphos.

LAfricain avatar LAfricain commented on September 14, 2024

thank you Karl for the work around. I hope you will have some time to solve this.

from xiphos.

karlkleinpaste avatar karlkleinpaste commented on September 14, 2024

This got really ugly in a hurry.

The problem is the fundamental indecision between two competing, mutually-exclusive ideas of what a Strong's number ontologically is. Either
[a] a Strong's number is a number, stored for convenience as a fixed string of characters
or
[b] a Strong's number is a fixed string of characters where every character matters

The reason it doesn't work in some Bibles is because those Bibles do not encode the critical leading zero at the beginning. Consider Gen.1.1 first word in 5 Bibles:

KJV works:

<w savlm="strong:H07225">In the beginning</w>

ESV works:

In the <w savlm="strong:H07225">beginning</w>

NASB fails:

<w savlm="strong:H7225">In the beginning</w>

OSHB fails:

<w savlm="strong:H7225">בראשׁית</w>

hboWLC fails:

<w savlm="strong:H7225">בראשׁית</w>

Working vs. failing is distinguished by whether the module has encoded a leading zero in Strong's refs. That is, failing is because the Strong's number is just a number, using exactly as many digits as it needs in common writing; working is because the Strong's number is a string encoding which has been peculiarly zero-prefixed. The key to construct the search, taken from the dictionary pane, is always exactly 5 digits, zero-filled, and that is what is inserted, without the leading zeroes, into the search string, except that in the Hebrew case, one leading zero is left. That string is then what is searched in lemmas of the module.

Modules which uses numbers as numbers-merely-written-as-strings thus fail because there is never a match with a leading zero.

I have no idea at this moment how to resolve this conflict in the code. There is no indication in e.g. the module's configuration as to whether Hebrew Strong's numbers are zero-prefixed. What if not all Strong's refs in a module are zero-prefixed? Then some refs would be found and some not. Also I am not aware that we can claim the markup is wrong in being not-zero-prefixed, that is, there is no standard to which we can refer to say that unprefixed Hebrew Strong's numbers are incorrect refs.

This is madness.

from xiphos.

LAfricain avatar LAfricain commented on September 14, 2024

Maybe we need to open an issue on the openscripture github?

from xiphos.

LAfricain avatar LAfricain commented on September 14, 2024

The OSHB was updated in the repo. I close for now this issue.

from xiphos.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.