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

Bug in parser? #148

Open
linearcombination opened this issue Jun 12, 2022 · 1 comment
Open

Bug in parser? #148

linearcombination opened this issue Jun 12, 2022 · 1 comment

Comments

@linearcombination
Copy link

linearcombination commented Jun 12, 2022

I get unexpected output when I give a particular valid USFM input to the do_graph.js script:

In proskemma-js cloned repo root:

❯ node scripts/do_graph.js ~/src/WA/github.com/linearcombination/DOC/working/temp/en_ulb-wa/en_ulb/41-MAT.usfm scripts/example_query.txt { "data": { "documents": [ { "mainSequence": { "id": "YzM5MDJiMGQt", "type": "main", "blocks": [ { "os": [], "is": [ { "payload": "chapter/1" }, { "payload": "verse/1" }, { "payload": "verses/1" } ], "text": "The book of the genealogy of Jesus Christ, son of David, son of Abraham." }, { "os": [ { "payload": "chapter/1" } ], "is": [ { "payload": "verse/2" }, { "payload": "verses/2" } ], "text": "Abraham was the father of Isaac, and Isaac the father of Jacob, and Jacob the father of Judah and his brothers." }, { "os": [ { "payload": "chapter/1" } ], "is": [ { "payload": "verse/3" }, { "payload": "verses/3" } ], "text": "Judah was the father of Perez and Zerah by Tamar, Perez the father of Hezron, and Hezron the father of Ram." }, { "os": [ { "payload": "chapter/1" } ], "is": [ { "payload": "verse/4" }, { "payload": "verses/4" } ], "text": "Ram was the father of Amminadab, Amminadab the father of Nahshon, and Nahshon the father of Salmon." }, { "os": [ { "payload": "chapter/1" } ], "is": [ { "payload": "verse/5" }, { "payload": "verses/5" } ], "text": "Salmon was the father of Boaz by Rahab, Boaz the father of Obed by Ruth, Obed the father of Jesse." }, { "os": [ { "payload": "chapter/1" } ], "is": [ { "payload": "verse/6" }, { "payload": "verses/6" } ], "text": "Jesse was the father of David the king." }, { "os": [ { "payload": "chapter/1" }, { "payload": "verse/6" }, { "payload": "verses/6" } ], "is": [], "text": "David was the father of Solomon by the wife of Uriah." }, { "os": [ { "payload": "chapter/1" } ], "is": [ { "payload": "verse/7" }, { "payload": "verses/7" } ], "text": "Solomon was the father of Rehoboam, Rehoboam the father of Abijah, Abijah the father of Asa." }, { "os": [ { "payload": "chapter/1" } ], "is": [ { "payload": "verse/8" }, { "payload": "verses/8" } ], "text": "Asa was the father of Jehoshaphat, Jehoshaphat the father of Joram, and Joram an ancestor of Uzziah." }, { "os": [ { "payload": "chapter/1" } ], "is": [ { "payload": "verse/9" }, { "payload": "verses/9" } ], "text": "Uzziah was the father of Jotham, Jotham the father of Ahaz, Ahaz the father of Hezekiah." }, { "os": [ { "payload": "chapter/1" } ], "is": [ { "payload": "verse/10" }, { "payload": "verses/10" } ], "text": "Hezekiah was the father of Manasseh, Manasseh the father of Amon, and Amon the father of Josiah." }, { "os": [ { "payload": "chapter/1" } ], "is": [ { "payload": "verse/11" }, { "payload": "verses/11" } ], "text": "Josiah was an ancestor of Jechoniah and his brothers at the time of the deportation to Babylon." }, { "os": [ { "payload": "chapter/1" "payload": "verse/17" }, { "payload": "verses/17" } ], "text": "But the eleven disciples went to Galilee, to the mountain to which Jesus had directed them.\nWhen they saw him, they worshiped him, but some doubted." }, { "os": [ { "payload": "chapter/28" } ], "is": [ { "payload": "verse/18" }, { "payload": "verses/18" }, { "payload": "verse/19" }, { "payload": "verses/19" }, { "payload": "verse/20" }, { "payload": "verses/20" } ], "text": "" } ] } } ] } }

Notice how chapter 1 does fine until verse 11 and then jumps to verse 17 and subsequent to that it jumps from chapter 1 to chapter 28 and yet all chapters and verses of MAT are present in the source file and are parsed fine by other USFM parsers.

Here is a link to the test USFM file

@linearcombination
Copy link
Author

Have you had a chance to look at this? I am interested in exploring this package if it will work correctly, I like the idea.

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

1 participant