Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Misnumbered nodes in 1 Chronicles 20 #125

Open
mr-martian opened this issue Aug 7, 2024 · 1 comment
Open

Misnumbered nodes in 1 Chronicles 20 #125

mr-martian opened this issue Aug 7, 2024 · 1 comment
Assignees

Comments

@mr-martian
Copy link

mr-martian commented Aug 7, 2024

There's a segment of 1 Chronicles numbered as if it's in Genesis.

<Node Cat="PP" Rule="Pp2PP" Head="0" nodeId="0101501400210021">
<Node Cat="pp" Rule="PpAdvp" Head="0" nodeId="0101501400210020">
<Node Cat="pp" Rule="P2PP" Head="0" nodeId="0101501400210011">
<Node n="o130200040021" Cat="prep" morphId="130200040021" Unicode="אַחֲרֵי" nodeId="0101501400210010" StrongNumberX="0310">
<m word="1CH 20:4!2" xml:id="o130200040021" lang="H" after=" " lemma="אַחַר" morph="D" pos="adverb" SDBH="000295003002000" LexDomain="003002005" oshb-strongs="310a" CoreDomain="">אַחֲרֵי</m>
</Node>
</Node>
<Node Cat="advp" Rule="Adv2Advp" Head="0" nodeId="0101501400310011">
<Node n="o130200040031" Cat="adv" morphId="130200040022" Unicode="כֵ֔ן" nodeId="0101501400310010" StrongNumberX="0310">
<m word="1CH 20:4!3" xml:id="o130200040031" lang="H" after="" lemma="כֵּן" morph="D" pos="adverb" oshb-strongs="3651c">כֵ֔ן</m>
</Node>
</Node>
</Node>
</Node>
</Node>

@mr-martian
Copy link
Author

Some more oddities:

import glob
from xml.etree import ElementTree as ET
import os

for fname in sorted(glob.glob('WLC/nodes/*.xml')):
    pieces = os.path.splitext(os.path.basename(fname))[0].split('-')
    if len(pieces) != 3: continue
    expected = pieces[0] + pieces[2]
    root = ET.parse(fname).getroot()
    for node in root.iter():
        nid = node.attrib.get('nodeId', node.attrib.get('{http://www.w3.org/XML/1998/namespace}id'))
        if nid and not (nid.startswith(expected) or nid.startswith('o'+expected)):
            print(fname, nid)
$ python3 validate_ids.py
WLC/nodes/13-1Ch-020.xml 0101501400210021
WLC/nodes/13-1Ch-020.xml 0101501400210020
WLC/nodes/13-1Ch-020.xml 0101501400210011
WLC/nodes/13-1Ch-020.xml 0101501400210010
WLC/nodes/13-1Ch-020.xml 0101501400310011
WLC/nodes/13-1Ch-020.xml 0101501400310010
WLC/nodes/14-2Ch-020.xml 0101501400210021
WLC/nodes/14-2Ch-020.xml 0101501400210020
WLC/nodes/14-2Ch-020.xml 0101501400210011
WLC/nodes/14-2Ch-020.xml 0101501400210010
WLC/nodes/14-2Ch-020.xml 0101501400310011
WLC/nodes/14-2Ch-020.xml 0101501400310010
WLC/nodes/14-2Ch-020.xml 0101501400120021
WLC/nodes/14-2Ch-020.xml 0101501400120020
WLC/nodes/14-2Ch-020.xml 0101501400120011
WLC/nodes/14-2Ch-020.xml 0101501400120010
WLC/nodes/14-2Ch-020.xml 0101501400210011
WLC/nodes/14-2Ch-020.xml 0101501400210010
WLC/nodes/14-2Ch-024.xml 0101501400210021
WLC/nodes/14-2Ch-024.xml 0101501400210020
WLC/nodes/14-2Ch-024.xml 0101501400210011
WLC/nodes/14-2Ch-024.xml 0101501400210010
WLC/nodes/14-2Ch-024.xml 0101501400310011
WLC/nodes/14-2Ch-024.xml 0101501400310010
WLC/nodes/15-Ezr-003.xml 0101501400120021
WLC/nodes/15-Ezr-003.xml 0101501400120020
WLC/nodes/15-Ezr-003.xml 0101501400120011
WLC/nodes/15-Ezr-003.xml 0101501400120010
WLC/nodes/15-Ezr-003.xml 0101501400210011
WLC/nodes/15-Ezr-003.xml 0101501400210010

@jonathanrobie jonathanrobie self-assigned this Oct 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants