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

Add default chapter count for apocrypha #10

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sebastiancarlos
Copy link
Contributor

@sebastiancarlos sebastiancarlos commented Aug 22, 2022

The counts were fetched with this script (which uses experimental/get_chapter_list_online.py):

apocrypha_books = [
    "Tobit", "Judith", "Greek Esther", "Wisdom Of Solomon", "Sirach", "Baruch",
    "Letter Of Jeremiah", "Prayer Of Azariah", "Susanna", "Bel And The Dragon",
    "1 Maccabees", "2 Maccabees", "1 Esdras", "Prayer Of Manasseh", "Psalm 151",
    "3 Maccabees", "2 Esdras", "4 Maccabees"
]

chapter_lengths = {book: len(get_online_chapter_list('NRSVUE', book)) for book in apocrypha_books}
print(chapter_lengths)

The names and order of the apocrypha books were taken from the NRSVUE translation.

This PR allows to download those books using BaseDownloader.download_book().

@daniel-tran
Copy link
Owner

Good effort, but I don't think directly adding the Apocrypha books into get_english_chapter_count is the best way forward, as it's basically saying that all supported Bible translations have these books, which isn't true.

My current recommendation would be to have a mapping of supported Bible translations to the Apocrypha books that it includes and the chapter ranges for each book, and do the appropriate lookup based on the Bible translation in use.
Note that this might require reworking various parts of the library, and may need its own file outside of common.py.

@sebastiancarlos
Copy link
Contributor Author

sebastiancarlos commented Aug 24, 2022

Sure. If it helps, here's a mapping of supported Bible translations to each book and chapter count:

translations_to_books_and_chapter_counts.json
{
  "ASV": {
    "Genesis": 50,
    "Exodus": 40,
    "Leviticus": 27,
    "Numbers": 36,
    "Deuteronomy": 34,
    "Joshua": 24,
    "Judges": 21,
    "Ruth": 4,
    "1 Samuel": 31,
    "2 Samuel": 24,
    "1 Kings": 22,
    "2 Kings": 25,
    "1 Chronicles": 29,
    "2 Chronicles": 36,
    "Ezra": 10,
    "Nehemiah": 13,
    "Esther": 10,
    "Job": 42,
    "Psalm": 150,
    "Proverbs": 31,
    "Ecclesiastes": 12,
    "Song Of Solomon": 8,
    "Isaiah": 66,
    "Jeremiah": 52,
    "Lamentations": 5,
    "Ezekiel": 48,
    "Daniel": 12,
    "Hosea": 14,
    "Joel": 3,
    "Amos": 9,
    "Obadiah": 1,
    "Jonah": 4,
    "Micah": 7,
    "Nahum": 3,
    "Habakkuk": 3,
    "Zephaniah": 3,
    "Haggai": 2,
    "Zechariah": 14,
    "Malachi": 4,
    "Matthew": 28,
    "Mark": 16,
    "Luke": 24,
    "John": 21,
    "Acts": 28,
    "Romans": 16,
    "1 Corinthians": 16,
    "2 Corinthians": 13,
    "Galatians": 6,
    "Ephesians": 6,
    "Philippians": 4,
    "Colossians": 4,
    "1 Thessalonians": 5,
    "2 Thessalonians": 3,
    "1 Timothy": 6,
    "2 Timothy": 4,
    "Titus": 3,
    "Philemon": 1,
    "Hebrews": 13,
    "James": 5,
    "1 Peter": 5,
    "2 Peter": 3,
    "1 John": 5,
    "2 John": 1,
    "3 John": 1,
    "Jude": 1,
    "Revelation": 22
  },
  "AKJV": {
    "Genesis": 50,
    "Exodus": 40,
    "Leviticus": 27,
    "Numbers": 36,
    "Deuteronomy": 34,
    "Joshua": 24,
    "Judges": 21,
    "Ruth": 4,
    "1 Samuel": 31,
    "2 Samuel": 24,
    "1 Kings": 22,
    "2 Kings": 25,
    "1 Chronicles": 29,
    "2 Chronicles": 36,
    "Ezra": 10,
    "Nehemiah": 13,
    "Esther": 10,
    "Job": 42,
    "Psalm": 150,
    "Proverbs": 31,
    "Ecclesiastes": 12,
    "Song Of Solomon": 8,
    "Isaiah": 66,
    "Jeremiah": 52,
    "Lamentations": 5,
    "Ezekiel": 48,
    "Daniel": 12,
    "Hosea": 14,
    "Joel": 3,
    "Amos": 9,
    "Obadiah": 1,
    "Jonah": 4,
    "Micah": 7,
    "Nahum": 3,
    "Habakkuk": 3,
    "Zephaniah": 3,
    "Haggai": 2,
    "Zechariah": 14,
    "Malachi": 4,
    "Matthew": 28,
    "Mark": 16,
    "Luke": 24,
    "John": 21,
    "Acts": 28,
    "Romans": 16,
    "1 Corinthians": 16,
    "2 Corinthians": 13,
    "Galatians": 6,
    "Ephesians": 6,
    "Philippians": 4,
    "Colossians": 4,
    "1 Thessalonians": 5,
    "2 Thessalonians": 3,
    "1 Timothy": 6,
    "2 Timothy": 4,
    "Titus": 3,
    "Philemon": 1,
    "Hebrews": 13,
    "James": 5,
    "1 Peter": 5,
    "2 Peter": 3,
    "1 John": 5,
    "2 John": 1,
    "3 John": 1,
    "Jude": 1,
    "Revelation": 22
  },
  "BRG": {
    "Genesis": 50,
    "Exodus": 40,
    "Leviticus": 27,
    "Numbers": 36,
    "Deuteronomy": 34,
    "Joshua": 24,
    "Judges": 21,
    "Ruth": 4,
    "1 Samuel": 31,
    "2 Samuel": 24,
    "1 Kings": 22,
    "2 Kings": 25,
    "1 Chronicles": 29,
    "2 Chronicles": 36,
    "Ezra": 10,
    "Nehemiah": 13,
    "Esther": 10,
    "Job": 42,
    "Psalm": 150,
    "Proverbs": 31,
    "Ecclesiastes": 12,
    "Song Of Solomon": 8,
    "Isaiah": 66,
    "Jeremiah": 52,
    "Lamentations": 5,
    "Ezekiel": 48,
    "Daniel": 12,
    "Hosea": 14,
    "Joel": 3,
    "Amos": 9,
    "Obadiah": 1,
    "Jonah": 4,
    "Micah": 7,
    "Nahum": 3,
    "Habakkuk": 3,
    "Zephaniah": 3,
    "Haggai": 2,
    "Zechariah": 14,
    "Malachi": 4,
    "Matthew": 28,
    "Mark": 16,
    "Luke": 24,
    "John": 21,
    "Acts": 28,
    "Romans": 16,
    "1 Corinthians": 16,
    "2 Corinthians": 13,
    "Galatians": 6,
    "Ephesians": 6,
    "Philippians": 4,
    "Colossians": 4,
    "1 Thessalonians": 5,
    "2 Thessalonians": 3,
    "1 Timothy": 6,
    "2 Timothy": 4,
    "Titus": 3,
    "Philemon": 1,
    "Hebrews": 13,
    "James": 5,
    "1 Peter": 5,
    "2 Peter": 3,
    "1 John": 5,
    "2 John": 1,
    "3 John": 1,
    "Jude": 1,
    "Revelation": 22
  },
  "EHV": {
    "Genesis": 50,
    "Exodus": 40,
    "Leviticus": 27,
    "Numbers": 36,
    "Deuteronomy": 34,
    "Joshua": 24,
    "Judges": 21,
    "Ruth": 4,
    "1 Samuel": 31,
    "2 Samuel": 24,
    "1 Kings": 22,
    "2 Kings": 25,
    "1 Chronicles": 29,
    "2 Chronicles": 36,
    "Ezra": 10,
    "Nehemiah": 13,
    "Esther": 10,
    "Job": 42,
    "Psalm": 150,
    "Proverbs": 31,
    "Ecclesiastes": 12,
    "Song Of Songs": 8,
    "Isaiah": 66,
    "Jeremiah": 52,
    "Lamentations": 5,
    "Ezekiel": 48,
    "Daniel": 12,
    "Hosea": 14,
    "Joel": 3,
    "Amos": 9,
    "Obadiah": 1,
    "Jonah": 4,
    "Micah": 7,
    "Nahum": 3,
    "Habakkuk": 3,
    "Zephaniah": 3,
    "Haggai": 2,
    "Zechariah": 14,
    "Malachi": 4,
    "Matthew": 28,
    "Mark": 16,
    "Luke": 24,
    "John": 21,
    "Acts": 28,
    "Romans": 16,
    "1 Corinthians": 16,
    "2 Corinthians": 13,
    "Galatians": 6,
    "Ephesians": 6,
    "Philippians": 4,
    "Colossians": 4,
    "1 Thessalonians": 5,
    "2 Thessalonians": 3,
    "1 Timothy": 6,
    "2 Timothy": 4,
    "Titus": 3,
    "Philemon": 1,
    "Hebrews": 13,
    "James": 5,
    "1 Peter": 5,
    "2 Peter": 3,
    "1 John": 5,
    "2 John": 1,
    "3 John": 1,
    "Jude": 1,
    "Revelation": 22
  },
  "ESV": {
    "Genesis": 50,
    "Exodus": 40,
    "Leviticus": 27,
    "Numbers": 36,
    "Deuteronomy": 34,
    "Joshua": 24,
    "Judges": 21,
    "Ruth": 4,
    "1 Samuel": 31,
    "2 Samuel": 24,
    "1 Kings": 22,
    "2 Kings": 25,
    "1 Chronicles": 29,
    "2 Chronicles": 36,
    "Ezra": 10,
    "Nehemiah": 13,
    "Esther": 10,
    "Job": 42,
    "Psalm": 150,
    "Proverbs": 31,
    "Ecclesiastes": 12,
    "Song Of Solomon": 8,
    "Isaiah": 66,
    "Jeremiah": 52,
    "Lamentations": 5,
    "Ezekiel": 48,
    "Daniel": 12,
    "Hosea": 14,
    "Joel": 3,
    "Amos": 9,
    "Obadiah": 1,
    "Jonah": 4,
    "Micah": 7,
    "Nahum": 3,
    "Habakkuk": 3,
    "Zephaniah": 3,
    "Haggai": 2,
    "Zechariah": 14,
    "Malachi": 4,
    "Matthew": 28,
    "Mark": 16,
    "Luke": 24,
    "John": 21,
    "Acts": 28,
    "Romans": 16,
    "1 Corinthians": 16,
    "2 Corinthians": 13,
    "Galatians": 6,
    "Ephesians": 6,
    "Philippians": 4,
    "Colossians": 4,
    "1 Thessalonians": 5,
    "2 Thessalonians": 3,
    "1 Timothy": 6,
    "2 Timothy": 4,
    "Titus": 3,
    "Philemon": 1,
    "Hebrews": 13,
    "James": 5,
    "1 Peter": 5,
    "2 Peter": 3,
    "1 John": 5,
    "2 John": 1,
    "3 John": 1,
    "Jude": 1,
    "Revelation": 22
  },
  "ESVUK": {
    "Genesis": 50,
    "Exodus": 40,
    "Leviticus": 27,
    "Numbers": 36,
    "Deuteronomy": 34,
    "Joshua": 24,
    "Judges": 21,
    "Ruth": 4,
    "1 Samuel": 31,
    "2 Samuel": 24,
    "1 Kings": 22,
    "2 Kings": 25,
    "1 Chronicles": 29,
    "2 Chronicles": 36,
    "Ezra": 10,
    "Nehemiah": 13,
    "Esther": 10,
    "Job": 42,
    "Psalm": 150,
    "Proverbs": 31,
    "Ecclesiastes": 12,
    "Song Of Solomon": 8,
    "Isaiah": 66,
    "Jeremiah": 52,
    "Lamentations": 5,
    "Ezekiel": 48,
    "Daniel": 12,
    "Hosea": 14,
    "Joel": 3,
    "Amos": 9,
    "Obadiah": 1,
    "Jonah": 4,
    "Micah": 7,
    "Nahum": 3,
    "Habakkuk": 3,
    "Zephaniah": 3,
    "Haggai": 2,
    "Zechariah": 14,
    "Malachi": 4,
    "Matthew": 28,
    "Mark": 16,
    "Luke": 24,
    "John": 21,
    "Acts": 28,
    "Romans": 16,
    "1 Corinthians": 16,
    "2 Corinthians": 13,
    "Galatians": 6,
    "Ephesians": 6,
    "Philippians": 4,
    "Colossians": 4,
    "1 Thessalonians": 5,
    "2 Thessalonians": 3,
    "1 Timothy": 6,
    "2 Timothy": 4,
    "Titus": 3,
    "Philemon": 1,
    "Hebrews": 13,
    "James": 5,
    "1 Peter": 5,
    "2 Peter": 3,
    "1 John": 5,
    "2 John": 1,
    "3 John": 1,
    "Jude": 1,
    "Revelation": 22
  },
  "GNV": {
    "Genesis": 50,
    "Exodus": 40,
    "Leviticus": 27,
    "Numbers": 36,
    "Deuteronomy": 34,
    "Joshua": 24,
    "Judges": 21,
    "Ruth": 4,
    "1 Samuel": 31,
    "2 Samuel": 24,
    "1 Kings": 22,
    "2 Kings": 25,
    "1 Chronicles": 29,
    "2 Chronicles": 36,
    "Ezra": 10,
    "Nehemiah": 13,
    "Esther": 10,
    "Job": 42,
    "Psalm": 150,
    "Proverbs": 31,
    "Ecclesiastes": 12,
    "Song Of Solomon": 8,
    "Isaiah": 66,
    "Jeremiah": 52,
    "Lamentations": 5,
    "Ezekiel": 48,
    "Daniel": 12,
    "Hosea": 14,
    "Joel": 3,
    "Amos": 9,
    "Obadiah": 1,
    "Jonah": 4,
    "Micah": 7,
    "Nahum": 3,
    "Habakkuk": 3,
    "Zephaniah": 3,
    "Haggai": 2,
    "Zechariah": 14,
    "Malachi": 4,
    "Matthew": 28,
    "Mark": 16,
    "Luke": 24,
    "John": 21,
    "Acts": 28,
    "Romans": 16,
    "1 Corinthians": 16,
    "2 Corinthians": 13,
    "Galatians": 6,
    "Ephesians": 6,
    "Philippians": 4,
    "Colossians": 4,
    "1 Thessalonians": 5,
    "2 Thessalonians": 3,
    "1 Timothy": 6,
    "2 Timothy": 4,
    "Titus": 3,
    "Philemon": 1,
    "Hebrews": 13,
    "James": 5,
    "1 Peter": 5,
    "2 Peter": 3,
    "1 John": 5,
    "2 John": 1,
    "3 John": 1,
    "Jude": 1,
    "Revelation": 22
  },
  "GW": {
    "Genesis": 50,
    "Exodus": 40,
    "Leviticus": 27,
    "Numbers": 36,
    "Deuteronomy": 34,
    "Joshua": 24,
    "Judges": 21,
    "Ruth": 4,
    "1 Samuel": 31,
    "2 Samuel": 24,
    "1 Kings": 22,
    "2 Kings": 25,
    "1 Chronicles": 29,
    "2 Chronicles": 36,
    "Ezra": 10,
    "Nehemiah": 13,
    "Esther": 10,
    "Job": 42,
    "Psalm": 150,
    "Proverbs": 31,
    "Ecclesiastes": 12,
    "Song Of Solomon": 8,
    "Isaiah": 66,
    "Jeremiah": 52,
    "Lamentations": 5,
    "Ezekiel": 48,
    "Daniel": 12,
    "Hosea": 14,
    "Joel": 3,
    "Amos": 9,
    "Obadiah": 1,
    "Jonah": 4,
    "Micah": 7,
    "Nahum": 3,
    "Habakkuk": 3,
    "Zephaniah": 3,
    "Haggai": 2,
    "Zechariah": 14,
    "Malachi": 4,
    "Matthew": 28,
    "Mark": 16,
    "Luke": 24,
    "John": 21,
    "Acts": 28,
    "Romans": 16,
    "1 Corinthians": 16,
    "2 Corinthians": 13,
    "Galatians": 6,
    "Ephesians": 6,
    "Philippians": 4,
    "Colossians": 4,
    "1 Thessalonians": 5,
    "2 Thessalonians": 3,
    "1 Timothy": 6,
    "2 Timothy": 4,
    "Titus": 3,
    "Philemon": 1,
    "Hebrews": 13,
    "James": 5,
    "1 Peter": 5,
    "2 Peter": 3,
    "1 John": 5,
    "2 John": 1,
    "3 John": 1,
    "Jude": 1,
    "Revelation": 22
  },
  "ISV": {
    "Genesis": 50,
    "Exodus": 40,
    "Leviticus": 27,
    "Numbers": 36,
    "Deuteronomy": 34,
    "Joshua": 24,
    "Judges": 21,
    "Ruth": 4,
    "1 Samuel": 31,
    "2 Samuel": 24,
    "1 Kings": 22,
    "2 Kings": 25,
    "1 Chronicles": 29,
    "2 Chronicles": 36,
    "Ezra": 10,
    "Nehemiah": 13,
    "Esther": 10,
    "Job": 42,
    "Psalm": 150,
    "Proverbs": 31,
    "Ecclesiastes": 12,
    "Song Of Solomon": 8,
    "Isaiah": 66,
    "Jeremiah": 52,
    "Lamentations": 5,
    "Ezekiel": 48,
    "Daniel": 12,
    "Hosea": 14,
    "Joel": 3,
    "Amos": 9,
    "Obadiah": 1,
    "Jonah": 4,
    "Micah": 7,
    "Nahum": 3,
    "Habakkuk": 3,
    "Zephaniah": 3,
    "Haggai": 2,
    "Zechariah": 14,
    "Malachi": 4,
    "Matthew": 28,
    "Mark": 16,
    "Luke": 24,
    "John": 21,
    "Acts": 28,
    "Romans": 16,
    "1 Corinthians": 16,
    "2 Corinthians": 13,
    "Galatians": 6,
    "Ephesians": 6,
    "Philippians": 4,
    "Colossians": 4,
    "1 Thessalonians": 5,
    "2 Thessalonians": 3,
    "1 Timothy": 6,
    "2 Timothy": 4,
    "Titus": 3,
    "Philemon": 1,
    "Hebrews": 13,
    "James": 5,
    "1 Peter": 5,
    "2 Peter": 3,
    "1 John": 5,
    "2 John": 1,
    "3 John": 1,
    "Jude": 1,
    "Revelation": 22
  },
  "JUB": {
    "Genesis": 50,
    "Exodus": 40,
    "Leviticus": 27,
    "Numbers": 36,
    "Deuteronomy": 34,
    "Joshua": 24,
    "Judges": 21,
    "Ruth": 4,
    "1 Samuel": 31,
    "2 Samuel": 24,
    "1 Kings": 22,
    "2 Kings": 25,
    "1 Chronicles": 29,
    "2 Chronicles": 36,
    "Ezra": 10,
    "Nehemiah": 13,
    "Esther": 10,
    "Job": 42,
    "Psalm": 150,
    "Proverbs": 31,
    "Ecclesiastes": 12,
    "Song Of Solomon": 8,
    "Isaiah": 66,
    "Jeremiah": 52,
    "Lamentations": 5,
    "Ezekiel": 48,
    "Daniel": 12,
    "Hosea": 14,
    "Joel": 3,
    "Amos": 9,
    "Obadiah": 1,
    "Jonah": 4,
    "Micah": 7,
    "Nahum": 3,
    "Habakkuk": 3,
    "Zephaniah": 3,
    "Haggai": 2,
    "Zechariah": 14,
    "Malachi": 4,
    "Matthew": 28,
    "Mark": 16,
    "Luke": 24,
    "John": 21,
    "Acts": 28,
    "Romans": 16,
    "1 Corinthians": 16,
    "2 Corinthians": 13,
    "Galatians": 6,
    "Ephesians": 6,
    "Philippians": 4,
    "Colossians": 4,
    "1 Thessalonians": 5,
    "2 Thessalonians": 3,
    "1 Timothy": 6,
    "2 Timothy": 4,
    "Titus": 3,
    "Philemon": 1,
    "Hebrews": 13,
    "James": 5,
    "1 Peter": 5,
    "2 Peter": 3,
    "1 John": 5,
    "2 John": 1,
    "3 John": 1,
    "Jude": 1,
    "Revelation": 22
  },
  "KJV": {
    "Genesis": 50,
    "Exodus": 40,
    "Leviticus": 27,
    "Numbers": 36,
    "Deuteronomy": 34,
    "Joshua": 24,
    "Judges": 21,
    "Ruth": 4,
    "1 Samuel": 31,
    "2 Samuel": 24,
    "1 Kings": 22,
    "2 Kings": 25,
    "1 Chronicles": 29,
    "2 Chronicles": 36,
    "Ezra": 10,
    "Nehemiah": 13,
    "Esther": 10,
    "Job": 42,
    "Psalm": 150,
    "Proverbs": 31,
    "Ecclesiastes": 12,
    "Song Of Solomon": 8,
    "Isaiah": 66,
    "Jeremiah": 52,
    "Lamentations": 5,
    "Ezekiel": 48,
    "Daniel": 12,
    "Hosea": 14,
    "Joel": 3,
    "Amos": 9,
    "Obadiah": 1,
    "Jonah": 4,
    "Micah": 7,
    "Nahum": 3,
    "Habakkuk": 3,
    "Zephaniah": 3,
    "Haggai": 2,
    "Zechariah": 14,
    "Malachi": 4,
    "Matthew": 28,
    "Mark": 16,
    "Luke": 24,
    "John": 21,
    "Acts": 28,
    "Romans": 16,
    "1 Corinthians": 16,
    "2 Corinthians": 13,
    "Galatians": 6,
    "Ephesians": 6,
    "Philippians": 4,
    "Colossians": 4,
    "1 Thessalonians": 5,
    "2 Thessalonians": 3,
    "1 Timothy": 6,
    "2 Timothy": 4,
    "Titus": 3,
    "Philemon": 1,
    "Hebrews": 13,
    "James": 5,
    "1 Peter": 5,
    "2 Peter": 3,
    "1 John": 5,
    "2 John": 1,
    "3 John": 1,
    "Jude": 1,
    "Revelation": 22
  },
  "KJ21": {
    "Genesis": 50,
    "Exodus": 40,
    "Leviticus": 27,
    "Numbers": 36,
    "Deuteronomy": 34,
    "Joshua": 24,
    "Judges": 21,
    "Ruth": 4,
    "1 Samuel": 31,
    "2 Samuel": 24,
    "1 Kings": 22,
    "2 Kings": 25,
    "1 Chronicles": 29,
    "2 Chronicles": 36,
    "Ezra": 10,
    "Nehemiah": 13,
    "Esther": 10,
    "Job": 42,
    "Psalm": 150,
    "Proverbs": 31,
    "Ecclesiastes": 12,
    "Song Of Solomon": 8,
    "Isaiah": 66,
    "Jeremiah": 52,
    "Lamentations": 5,
    "Ezekiel": 48,
    "Daniel": 12,
    "Hosea": 14,
    "Joel": 3,
    "Amos": 9,
    "Obadiah": 1,
    "Jonah": 4,
    "Micah": 7,
    "Nahum": 3,
    "Habakkuk": 3,
    "Zephaniah": 3,
    "Haggai": 2,
    "Zechariah": 14,
    "Malachi": 4,
    "Matthew": 28,
    "Mark": 16,
    "Luke": 24,
    "John": 21,
    "Acts": 28,
    "Romans": 16,
    "1 Corinthians": 16,
    "2 Corinthians": 13,
    "Galatians": 6,
    "Ephesians": 6,
    "Philippians": 4,
    "Colossians": 4,
    "1 Thessalonians": 5,
    "2 Thessalonians": 3,
    "1 Timothy": 6,
    "2 Timothy": 4,
    "Titus": 3,
    "Philemon": 1,
    "Hebrews": 13,
    "James": 5,
    "1 Peter": 5,
    "2 Peter": 3,
    "1 John": 5,
    "2 John": 1,
    "3 John": 1,
    "Jude": 1,
    "Revelation": 22
  },
  "LEB": {
    "Genesis": 50,
    "Exodus": 40,
    "Leviticus": 27,
    "Numbers": 36,
    "Deuteronomy": 34,
    "Joshua": 24,
    "Judges": 21,
    "Ruth": 4,
    "1 Samuel": 31,
    "2 Samuel": 24,
    "1 Kings": 22,
    "2 Kings": 25,
    "1 Chronicles": 29,
    "2 Chronicles": 36,
    "Ezra": 10,
    "Nehemiah": 13,
    "Esther": 10,
    "Job": 42,
    "Psalm": 150,
    "Proverbs": 31,
    "Ecclesiastes": 12,
    "Song Of Solomon": 8,
    "Isaiah": 66,
    "Jeremiah": 52,
    "Lamentations": 5,
    "Ezekiel": 48,
    "Daniel": 12,
    "Hosea": 14,
    "Joel": 3,
    "Amos": 9,
    "Obadiah": 1,
    "Jonah": 4,
    "Micah": 7,
    "Nahum": 3,
    "Habakkuk": 3,
    "Zephaniah": 3,
    "Haggai": 2,
    "Zechariah": 14,
    "Malachi": 4,
    "Matthew": 28,
    "Mark": 16,
    "Luke": 24,
    "John": 21,
    "Acts": 28,
    "Romans": 16,
    "1 Corinthians": 16,
    "2 Corinthians": 13,
    "Galatians": 6,
    "Ephesians": 6,
    "Philippians": 4,
    "Colossians": 4,
    "1 Thessalonians": 5,
    "2 Thessalonians": 3,
    "1 Timothy": 6,
    "2 Timothy": 4,
    "Titus": 3,
    "Philemon": 1,
    "Hebrews": 13,
    "James": 5,
    "1 Peter": 5,
    "2 Peter": 3,
    "1 John": 5,
    "2 John": 1,
    "3 John": 1,
    "Jude": 1,
    "Revelation": 22
  },
  "MEV": {
    "Genesis": 50,
    "Exodus": 40,
    "Leviticus": 27,
    "Numbers": 36,
    "Deuteronomy": 34,
    "Joshua": 24,
    "Judges": 21,
    "Ruth": 4,
    "1 Samuel": 31,
    "2 Samuel": 24,
    "1 Kings": 22,
    "2 Kings": 25,
    "1 Chronicles": 29,
    "2 Chronicles": 36,
    "Ezra": 10,
    "Nehemiah": 13,
    "Esther": 10,
    "Job": 42,
    "Psalm": 150,
    "Proverbs": 31,
    "Ecclesiastes": 12,
    "Song Of Songs": 8,
    "Isaiah": 66,
    "Jeremiah": 52,
    "Lamentations": 5,
    "Ezekiel": 48,
    "Daniel": 12,
    "Hosea": 14,
    "Joel": 3,
    "Amos": 9,
    "Obadiah": 1,
    "Jonah": 4,
    "Micah": 7,
    "Nahum": 3,
    "Habakkuk": 3,
    "Zephaniah": 3,
    "Haggai": 2,
    "Zechariah": 14,
    "Malachi": 4,
    "Matthew": 28,
    "Mark": 16,
    "Luke": 24,
    "John": 21,
    "Acts": 28,
    "Romans": 16,
    "1 Corinthians": 16,
    "2 Corinthians": 13,
    "Galatians": 6,
    "Ephesians": 6,
    "Philippians": 4,
    "Colossians": 4,
    "1 Thessalonians": 5,
    "2 Thessalonians": 3,
    "1 Timothy": 6,
    "2 Timothy": 4,
    "Titus": 3,
    "Philemon": 1,
    "Hebrews": 13,
    "James": 5,
    "1 Peter": 5,
    "2 Peter": 3,
    "1 John": 5,
    "2 John": 1,
    "3 John": 1,
    "Jude": 1,
    "Revelation": 22
  },
  "NASB": {
    "Genesis": 50,
    "Exodus": 40,
    "Leviticus": 27,
    "Numbers": 36,
    "Deuteronomy": 34,
    "Joshua": 24,
    "Judges": 21,
    "Ruth": 4,
    "1 Samuel": 31,
    "2 Samuel": 24,
    "1 Kings": 22,
    "2 Kings": 25,
    "1 Chronicles": 29,
    "2 Chronicles": 36,
    "Ezra": 10,
    "Nehemiah": 13,
    "Esther": 10,
    "Job": 42,
    "Psalm": 150,
    "Proverbs": 31,
    "Ecclesiastes": 12,
    "Song Of Solomon": 8,
    "Isaiah": 66,
    "Jeremiah": 52,
    "Lamentations": 5,
    "Ezekiel": 48,
    "Daniel": 12,
    "Hosea": 14,
    "Joel": 3,
    "Amos": 9,
    "Obadiah": 1,
    "Jonah": 4,
    "Micah": 7,
    "Nahum": 3,
    "Habakkuk": 3,
    "Zephaniah": 3,
    "Haggai": 2,
    "Zechariah": 14,
    "Malachi": 4,
    "Matthew": 28,
    "Mark": 16,
    "Luke": 24,
    "John": 21,
    "Acts": 28,
    "Romans": 16,
    "1 Corinthians": 16,
    "2 Corinthians": 13,
    "Galatians": 6,
    "Ephesians": 6,
    "Philippians": 4,
    "Colossians": 4,
    "1 Thessalonians": 5,
    "2 Thessalonians": 3,
    "1 Timothy": 6,
    "2 Timothy": 4,
    "Titus": 3,
    "Philemon": 1,
    "Hebrews": 13,
    "James": 5,
    "1 Peter": 5,
    "2 Peter": 3,
    "1 John": 5,
    "2 John": 1,
    "3 John": 1,
    "Jude": 1,
    "Revelation": 22
  },
  "NASB1995": {
    "Genesis": 50,
    "Exodus": 40,
    "Leviticus": 27,
    "Numbers": 36,
    "Deuteronomy": 34,
    "Joshua": 24,
    "Judges": 21,
    "Ruth": 4,
    "1 Samuel": 31,
    "2 Samuel": 24,
    "1 Kings": 22,
    "2 Kings": 25,
    "1 Chronicles": 29,
    "2 Chronicles": 36,
    "Ezra": 10,
    "Nehemiah": 13,
    "Esther": 10,
    "Job": 42,
    "Psalm": 150,
    "Proverbs": 31,
    "Ecclesiastes": 12,
    "Song Of Solomon": 8,
    "Isaiah": 66,
    "Jeremiah": 52,
    "Lamentations": 5,
    "Ezekiel": 48,
    "Daniel": 12,
    "Hosea": 14,
    "Joel": 3,
    "Amos": 9,
    "Obadiah": 1,
    "Jonah": 4,
    "Micah": 7,
    "Nahum": 3,
    "Habakkuk": 3,
    "Zephaniah": 3,
    "Haggai": 2,
    "Zechariah": 14,
    "Malachi": 4,
    "Matthew": 28,
    "Mark": 16,
    "Luke": 24,
    "John": 21,
    "Acts": 28,
    "Romans": 16,
    "1 Corinthians": 16,
    "2 Corinthians": 13,
    "Galatians": 6,
    "Ephesians": 6,
    "Philippians": 4,
    "Colossians": 4,
    "1 Thessalonians": 5,
    "2 Thessalonians": 3,
    "1 Timothy": 6,
    "2 Timothy": 4,
    "Titus": 3,
    "Philemon": 1,
    "Hebrews": 13,
    "James": 5,
    "1 Peter": 5,
    "2 Peter": 3,
    "1 John": 5,
    "2 John": 1,
    "3 John": 1,
    "Jude": 1,
    "Revelation": 22
  },
  "NET": {
    "Genesis": 50,
    "Exodus": 40,
    "Leviticus": 27,
    "Numbers": 36,
    "Deuteronomy": 34,
    "Joshua": 24,
    "Judges": 21,
    "Ruth": 4,
    "1 Samuel": 31,
    "2 Samuel": 24,
    "1 Kings": 22,
    "2 Kings": 25,
    "1 Chronicles": 29,
    "2 Chronicles": 36,
    "Ezra": 10,
    "Nehemiah": 13,
    "Esther": 10,
    "Job": 42,
    "Psalm": 150,
    "Proverbs": 31,
    "Ecclesiastes": 12,
    "Song Of Solomon": 8,
    "Isaiah": 66,
    "Jeremiah": 52,
    "Lamentations": 5,
    "Ezekiel": 48,
    "Daniel": 12,
    "Hosea": 14,
    "Joel": 3,
    "Amos": 9,
    "Obadiah": 1,
    "Jonah": 4,
    "Micah": 7,
    "Nahum": 3,
    "Habakkuk": 3,
    "Zephaniah": 3,
    "Haggai": 2,
    "Zechariah": 14,
    "Malachi": 4,
    "Matthew": 28,
    "Mark": 16,
    "Luke": 24,
    "John": 21,
    "Acts": 28,
    "Romans": 16,
    "1 Corinthians": 16,
    "2 Corinthians": 13,
    "Galatians": 6,
    "Ephesians": 6,
    "Philippians": 4,
    "Colossians": 4,
    "1 Thessalonians": 5,
    "2 Thessalonians": 3,
    "1 Timothy": 6,
    "2 Timothy": 4,
    "Titus": 3,
    "Philemon": 1,
    "Hebrews": 13,
    "James": 5,
    "1 Peter": 5,
    "2 Peter": 3,
    "1 John": 5,
    "2 John": 1,
    "3 John": 1,
    "Jude": 1,
    "Revelation": 22
  },
  "NIV": {
    "Genesis": 50,
    "Exodus": 40,
    "Leviticus": 27,
    "Numbers": 36,
    "Deuteronomy": 34,
    "Joshua": 24,
    "Judges": 21,
    "Ruth": 4,
    "1 Samuel": 31,
    "2 Samuel": 24,
    "1 Kings": 22,
    "2 Kings": 25,
    "1 Chronicles": 29,
    "2 Chronicles": 36,
    "Ezra": 10,
    "Nehemiah": 13,
    "Esther": 10,
    "Job": 42,
    "Psalm": 150,
    "Proverbs": 31,
    "Ecclesiastes": 12,
    "Song Of Songs": 8,
    "Isaiah": 66,
    "Jeremiah": 52,
    "Lamentations": 5,
    "Ezekiel": 48,
    "Daniel": 12,
    "Hosea": 14,
    "Joel": 3,
    "Amos": 9,
    "Obadiah": 1,
    "Jonah": 4,
    "Micah": 7,
    "Nahum": 3,
    "Habakkuk": 3,
    "Zephaniah": 3,
    "Haggai": 2,
    "Zechariah": 14,
    "Malachi": 4,
    "Matthew": 28,
    "Mark": 16,
    "Luke": 24,
    "John": 21,
    "Acts": 28,
    "Romans": 16,
    "1 Corinthians": 16,
    "2 Corinthians": 13,
    "Galatians": 6,
    "Ephesians": 6,
    "Philippians": 4,
    "Colossians": 4,
    "1 Thessalonians": 5,
    "2 Thessalonians": 3,
    "1 Timothy": 6,
    "2 Timothy": 4,
    "Titus": 3,
    "Philemon": 1,
    "Hebrews": 13,
    "James": 5,
    "1 Peter": 5,
    "2 Peter": 3,
    "1 John": 5,
    "2 John": 1,
    "3 John": 1,
    "Jude": 1,
    "Revelation": 22
  },
  "NIVUK": {
    "Genesis": 50,
    "Exodus": 40,
    "Leviticus": 27,
    "Numbers": 36,
    "Deuteronomy": 34,
    "Joshua": 24,
    "Judges": 21,
    "Ruth": 4,
    "1 Samuel": 31,
    "2 Samuel": 24,
    "1 Kings": 22,
    "2 Kings": 25,
    "1 Chronicles": 29,
    "2 Chronicles": 36,
    "Ezra": 10,
    "Nehemiah": 13,
    "Esther": 10,
    "Job": 42,
    "Psalm": 150,
    "Proverbs": 31,
    "Ecclesiastes": 12,
    "Song Of Solomon": 8,
    "Isaiah": 66,
    "Jeremiah": 52,
    "Lamentations": 5,
    "Ezekiel": 48,
    "Daniel": 12,
    "Hosea": 14,
    "Joel": 3,
    "Amos": 9,
    "Obadiah": 1,
    "Jonah": 4,
    "Micah": 7,
    "Nahum": 3,
    "Habakkuk": 3,
    "Zephaniah": 3,
    "Haggai": 2,
    "Zechariah": 14,
    "Malachi": 4,
    "Matthew": 28,
    "Mark": 16,
    "Luke": 24,
    "John": 21,
    "Acts": 28,
    "Romans": 16,
    "1 Corinthians": 16,
    "2 Corinthians": 13,
    "Galatians": 6,
    "Ephesians": 6,
    "Philippians": 4,
    "Colossians": 4,
    "1 Thessalonians": 5,
    "2 Thessalonians": 3,
    "1 Timothy": 6,
    "2 Timothy": 4,
    "Titus": 3,
    "Philemon": 1,
    "Hebrews": 13,
    "James": 5,
    "1 Peter": 5,
    "2 Peter": 3,
    "1 John": 5,
    "2 John": 1,
    "3 John": 1,
    "Jude": 1,
    "Revelation": 22
  },
  "NKJV": {
    "Genesis": 50,
    "Exodus": 40,
    "Leviticus": 27,
    "Numbers": 36,
    "Deuteronomy": 34,
    "Joshua": 24,
    "Judges": 21,
    "Ruth": 4,
    "1 Samuel": 31,
    "2 Samuel": 24,
    "1 Kings": 22,
    "2 Kings": 25,
    "1 Chronicles": 29,
    "2 Chronicles": 36,
    "Ezra": 10,
    "Nehemiah": 13,
    "Esther": 10,
    "Job": 42,
    "Psalm": 150,
    "Proverbs": 31,
    "Ecclesiastes": 12,
    "Song Of Solomon": 8,
    "Isaiah": 66,
    "Jeremiah": 52,
    "Lamentations": 5,
    "Ezekiel": 48,
    "Daniel": 12,
    "Hosea": 14,
    "Joel": 3,
    "Amos": 9,
    "Obadiah": 1,
    "Jonah": 4,
    "Micah": 7,
    "Nahum": 3,
    "Habakkuk": 3,
    "Zephaniah": 3,
    "Haggai": 2,
    "Zechariah": 14,
    "Malachi": 4,
    "Matthew": 28,
    "Mark": 16,
    "Luke": 24,
    "John": 21,
    "Acts": 28,
    "Romans": 16,
    "1 Corinthians": 16,
    "2 Corinthians": 13,
    "Galatians": 6,
    "Ephesians": 6,
    "Philippians": 4,
    "Colossians": 4,
    "1 Thessalonians": 5,
    "2 Thessalonians": 3,
    "1 Timothy": 6,
    "2 Timothy": 4,
    "Titus": 3,
    "Philemon": 1,
    "Hebrews": 13,
    "James": 5,
    "1 Peter": 5,
    "2 Peter": 3,
    "1 John": 5,
    "2 John": 1,
    "3 John": 1,
    "Jude": 1,
    "Revelation": 22
  },
  "NLT": {
    "Genesis": 50,
    "Exodus": 40,
    "Leviticus": 27,
    "Numbers": 36,
    "Deuteronomy": 34,
    "Joshua": 24,
    "Judges": 21,
    "Ruth": 4,
    "1 Samuel": 31,
    "2 Samuel": 24,
    "1 Kings": 22,
    "2 Kings": 25,
    "1 Chronicles": 29,
    "2 Chronicles": 36,
    "Ezra": 10,
    "Nehemiah": 13,
    "Esther": 10,
    "Job": 42,
    "Psalm": 150,
    "Proverbs": 31,
    "Ecclesiastes": 12,
    "Song Of Solomon": 8,
    "Isaiah": 66,
    "Jeremiah": 52,
    "Lamentations": 5,
    "Ezekiel": 48,
    "Daniel": 12,
    "Hosea": 14,
    "Joel": 3,
    "Amos": 9,
    "Obadiah": 1,
    "Jonah": 4,
    "Micah": 7,
    "Nahum": 3,
    "Habakkuk": 3,
    "Zephaniah": 3,
    "Haggai": 2,
    "Zechariah": 14,
    "Malachi": 4,
    "Matthew": 28,
    "Mark": 16,
    "Luke": 24,
    "John": 21,
    "Acts": 28,
    "Romans": 16,
    "1 Corinthians": 16,
    "2 Corinthians": 13,
    "Galatians": 6,
    "Ephesians": 6,
    "Philippians": 4,
    "Colossians": 4,
    "1 Thessalonians": 5,
    "2 Thessalonians": 3,
    "1 Timothy": 6,
    "2 Timothy": 4,
    "Titus": 3,
    "Philemon": 1,
    "Hebrews": 13,
    "James": 5,
    "1 Peter": 5,
    "2 Peter": 3,
    "1 John": 5,
    "2 John": 1,
    "3 John": 1,
    "Jude": 1,
    "Revelation": 22
  },
  "NLV": {
    "Genesis": 50,
    "Exodus": 40,
    "Leviticus": 27,
    "Numbers": 36,
    "Deuteronomy": 34,
    "Joshua": 24,
    "Judges": 21,
    "Ruth": 4,
    "1 Samuel": 31,
    "2 Samuel": 24,
    "1 Kings": 22,
    "2 Kings": 25,
    "1 Chronicles": 29,
    "2 Chronicles": 36,
    "Ezra": 10,
    "Nehemiah": 13,
    "Esther": 10,
    "Job": 42,
    "Psalm": 150,
    "Proverbs": 31,
    "Ecclesiastes": 12,
    "Song Of Solomon": 8,
    "Isaiah": 66,
    "Jeremiah": 52,
    "Lamentations": 5,
    "Ezekiel": 48,
    "Daniel": 12,
    "Hosea": 14,
    "Joel": 3,
    "Amos": 9,
    "Obadiah": 1,
    "Jonah": 4,
    "Micah": 7,
    "Nahum": 3,
    "Habakkuk": 3,
    "Zephaniah": 3,
    "Haggai": 2,
    "Zechariah": 14,
    "Malachi": 4,
    "Matthew": 28,
    "Mark": 16,
    "Luke": 24,
    "John": 21,
    "Acts": 28,
    "Romans": 16,
    "1 Corinthians": 16,
    "2 Corinthians": 13,
    "Galatians": 6,
    "Ephesians": 6,
    "Philippians": 4,
    "Colossians": 4,
    "1 Thessalonians": 5,
    "2 Thessalonians": 3,
    "1 Timothy": 6,
    "2 Timothy": 4,
    "Titus": 3,
    "Philemon": 1,
    "Hebrews": 13,
    "James": 5,
    "1 Peter": 5,
    "2 Peter": 3,
    "1 John": 5,
    "2 John": 1,
    "3 John": 1,
    "Jude": 1,
    "Revelation": 22
  },
  "NOG": {
    "Genesis": 50,
    "Exodus": 40,
    "Leviticus": 27,
    "Numbers": 36,
    "Deuteronomy": 34,
    "Joshua": 24,
    "Judges": 21,
    "Ruth": 4,
    "1 Samuel": 31,
    "2 Samuel": 24,
    "1 Kings": 22,
    "2 Kings": 25,
    "1 Chronicles": 29,
    "2 Chronicles": 36,
    "Ezra": 10,
    "Nehemiah": 13,
    "Esther": 10,
    "Job": 42,
    "Psalm": 150,
    "Proverbs": 31,
    "Ecclesiastes": 12,
    "Song Of Solomon": 8,
    "Isaiah": 66,
    "Jeremiah": 52,
    "Lamentations": 5,
    "Ezekiel": 48,
    "Daniel": 12,
    "Hosea": 14,
    "Joel": 3,
    "Amos": 9,
    "Obadiah": 1,
    "Jonah": 4,
    "Micah": 7,
    "Nahum": 3,
    "Habakkuk": 3,
    "Zephaniah": 3,
    "Haggai": 2,
    "Zechariah": 14,
    "Malachi": 4,
    "Matthew": 28,
    "Mark": 16,
    "Luke": 24,
    "John": 21,
    "Acts": 28,
    "Romans": 16,
    "1 Corinthians": 16,
    "2 Corinthians": 13,
    "Galatians": 6,
    "Ephesians": 6,
    "Philippians": 4,
    "Colossians": 4,
    "1 Thessalonians": 5,
    "2 Thessalonians": 3,
    "1 Timothy": 6,
    "2 Timothy": 4,
    "Titus": 3,
    "Philemon": 1,
    "Hebrews": 13,
    "James": 5,
    "1 Peter": 5,
    "2 Peter": 3,
    "1 John": 5,
    "2 John": 1,
    "3 John": 1,
    "Jude": 1,
    "Revelation": 22
  },
  "NRSV": {
    "Genesis": 50,
    "Exodus": 40,
    "Leviticus": 27,
    "Numbers": 36,
    "Deuteronomy": 34,
    "Joshua": 24,
    "Judges": 21,
    "Ruth": 4,
    "1 Samuel": 31,
    "2 Samuel": 24,
    "1 Kings": 22,
    "2 Kings": 25,
    "1 Chronicles": 29,
    "2 Chronicles": 36,
    "Ezra": 10,
    "Nehemiah": 13,
    "Esther": 10,
    "Job": 42,
    "Psalm": 150,
    "Proverbs": 31,
    "Ecclesiastes": 12,
    "Song Of Songs": 8,
    "Isaiah": 66,
    "Jeremiah": 52,
    "Lamentations": 5,
    "Ezekiel": 48,
    "Daniel": 12,
    "Hosea": 14,
    "Joel": 3,
    "Amos": 9,
    "Obadiah": 1,
    "Jonah": 4,
    "Micah": 7,
    "Nahum": 3,
    "Habakkuk": 3,
    "Zephaniah": 3,
    "Haggai": 2,
    "Zechariah": 14,
    "Malachi": 4,
    "Matthew": 28,
    "Mark": 16,
    "Luke": 24,
    "John": 21,
    "Acts": 28,
    "Romans": 16,
    "1 Corinthians": 16,
    "2 Corinthians": 13,
    "Galatians": 6,
    "Ephesians": 6,
    "Philippians": 4,
    "Colossians": 4,
    "1 Thessalonians": 5,
    "2 Thessalonians": 3,
    "1 Timothy": 6,
    "2 Timothy": 4,
    "Titus": 3,
    "Philemon": 1,
    "Hebrews": 13,
    "James": 5,
    "1 Peter": 5,
    "2 Peter": 3,
    "1 John": 5,
    "2 John": 1,
    "3 John": 1,
    "Jude": 1,
    "Revelation": 22,
    "Tobit": 14,
    "Judith": 16,
    "Greek Esther": 10,
    "Wisdom Of Solomon": 19,
    "Sirach": 51,
    "Baruch": 5,
    "Letter Of Jeremiah": 1,
    "Prayer Of Azariah": 1,
    "Susanna": 1,
    "Bel And The Dragon": 1,
    "1 Maccabees": 16,
    "2 Maccabees": 15,
    "1 Esdras": 9,
    "Prayer Of Manasseh": 1,
    "Psalm 151": 1,
    "3 Maccabees": 7,
    "2 Esdras": 16,
    "4 Maccabees": 18
  },
  "NRSVUE": {
    "Genesis": 50,
    "Exodus": 40,
    "Leviticus": 27,
    "Numbers": 36,
    "Deuteronomy": 34,
    "Joshua": 24,
    "Judges": 21,
    "Ruth": 4,
    "1 Samuel": 31,
    "2 Samuel": 24,
    "1 Kings": 22,
    "2 Kings": 25,
    "1 Chronicles": 29,
    "2 Chronicles": 36,
    "Ezra": 10,
    "Nehemiah": 13,
    "Esther": 10,
    "Job": 42,
    "Psalm": 150,
    "Proverbs": 31,
    "Ecclesiastes": 12,
    "Song Of Songs": 8,
    "Isaiah": 66,
    "Jeremiah": 52,
    "Lamentations": 5,
    "Ezekiel": 48,
    "Daniel": 12,
    "Hosea": 14,
    "Joel": 3,
    "Amos": 9,
    "Obadiah": 1,
    "Jonah": 4,
    "Micah": 7,
    "Nahum": 3,
    "Habakkuk": 3,
    "Zephaniah": 3,
    "Haggai": 2,
    "Zechariah": 14,
    "Malachi": 4,
    "Matthew": 28,
    "Mark": 16,
    "Luke": 24,
    "John": 21,
    "Acts": 28,
    "Romans": 16,
    "1 Corinthians": 16,
    "2 Corinthians": 13,
    "Galatians": 6,
    "Ephesians": 6,
    "Philippians": 4,
    "Colossians": 4,
    "1 Thessalonians": 5,
    "2 Thessalonians": 3,
    "1 Timothy": 6,
    "2 Timothy": 4,
    "Titus": 3,
    "Philemon": 1,
    "Hebrews": 13,
    "James": 5,
    "1 Peter": 5,
    "2 Peter": 3,
    "1 John": 5,
    "2 John": 1,
    "3 John": 1,
    "Jude": 1,
    "Revelation": 22,
    "Tobit": 14,
    "Judith": 16,
    "Greek Esther": 10,
    "Wisdom Of Solomon": 19,
    "Sirach": 51,
    "Baruch": 5,
    "Letter Of Jeremiah": 1,
    "Prayer Of Azariah": 1,
    "Susanna": 1,
    "Bel And The Dragon": 1,
    "1 Maccabees": 16,
    "2 Maccabees": 15,
    "1 Esdras": 9,
    "Prayer Of Manasseh": 1,
    "Psalm 151": 1,
    "3 Maccabees": 7,
    "2 Esdras": 16,
    "4 Maccabees": 18
  },
  "WEB": {
    "Genesis": 50,
    "Exodus": 40,
    "Leviticus": 27,
    "Numbers": 36,
    "Deuteronomy": 34,
    "Joshua": 24,
    "Judges": 21,
    "Ruth": 4,
    "1 Samuel": 31,
    "2 Samuel": 24,
    "1 Kings": 22,
    "2 Kings": 25,
    "1 Chronicles": 29,
    "2 Chronicles": 36,
    "Ezra": 10,
    "Nehemiah": 13,
    "Esther": 10,
    "Job": 42,
    "Psalm": 150,
    "Proverbs": 31,
    "Ecclesiastes": 12,
    "Song Of Solomon": 8,
    "Isaiah": 66,
    "Jeremiah": 52,
    "Lamentations": 5,
    "Ezekiel": 48,
    "Daniel": 12,
    "Hosea": 14,
    "Joel": 3,
    "Amos": 9,
    "Obadiah": 1,
    "Jonah": 4,
    "Micah": 7,
    "Nahum": 3,
    "Habakkuk": 3,
    "Zephaniah": 3,
    "Haggai": 2,
    "Zechariah": 14,
    "Malachi": 4,
    "Matthew": 28,
    "Mark": 16,
    "Luke": 24,
    "John": 21,
    "Acts": 28,
    "Romans": 16,
    "1 Corinthians": 16,
    "2 Corinthians": 13,
    "Galatians": 6,
    "Ephesians": 6,
    "Philippians": 4,
    "Colossians": 4,
    "1 Thessalonians": 5,
    "2 Thessalonians": 3,
    "1 Timothy": 6,
    "2 Timothy": 4,
    "Titus": 3,
    "Philemon": 1,
    "Hebrews": 13,
    "James": 5,
    "1 Peter": 5,
    "2 Peter": 3,
    "1 John": 5,
    "2 John": 1,
    "3 John": 1,
    "Jude": 1,
    "Revelation": 22
  },
  "YLT": {
    "Genesis": 50,
    "Exodus": 40,
    "Leviticus": 27,
    "Numbers": 36,
    "Deuteronomy": 34,
    "Joshua": 24,
    "Judges": 21,
    "Ruth": 4,
    "1 Samuel": 31,
    "2 Samuel": 24,
    "1 Kings": 22,
    "2 Kings": 25,
    "1 Chronicles": 29,
    "2 Chronicles": 36,
    "Ezra": 10,
    "Nehemiah": 13,
    "Esther": 10,
    "Job": 42,
    "Psalm": 150,
    "Proverbs": 31,
    "Ecclesiastes": 12,
    "Song Of Solomon": 8,
    "Isaiah": 66,
    "Jeremiah": 52,
    "Lamentations": 5,
    "Ezekiel": 48,
    "Daniel": 12,
    "Hosea": 14,
    "Joel": 3,
    "Amos": 9,
    "Obadiah": 1,
    "Jonah": 4,
    "Micah": 7,
    "Nahum": 3,
    "Habakkuk": 3,
    "Zephaniah": 3,
    "Haggai": 2,
    "Zechariah": 14,
    "Malachi": 4,
    "Matthew": 28,
    "Mark": 16,
    "Luke": 24,
    "John": 21,
    "Acts": 28,
    "Romans": 16,
    "1 Corinthians": 16,
    "2 Corinthians": 13,
    "Galatians": 6,
    "Ephesians": 6,
    "Philippians": 4,
    "Colossians": 4,
    "1 Thessalonians": 5,
    "2 Thessalonians": 3,
    "1 Timothy": 6,
    "2 Timothy": 4,
    "Titus": 3,
    "Philemon": 1,
    "Hebrews": 13,
    "James": 5,
    "1 Peter": 5,
    "2 Peter": 3,
    "1 John": 5,
    "2 John": 1,
    "3 John": 1,
    "Jude": 1,
    "Revelation": 22
  }
}
It was made with this script:
#!/usr/bin/env python
import json

from bs4 import BeautifulSoup
from meaningless.utilities import common


# Credit to A. Baker, who wrote the original logic and provided written permission to adapt it


def get_book_to_chapter_count_mapping(translation):
    print('Getting chapter count for {0}'.format(translation))
    switch = {
        # List of English Translations from https://www.biblegateway.com/versions/
        # Will need manually updated as translations are added/removed from their website
        'AKJV': 'Authorized-King-James-Version-AKJV-Bible',
        'AMP': 'Amplified-Bible-AMP',
        'AMPC': 'Amplified-Bible-Classic-Edition-AMPC',
        'ASV': 'American-Standard-Version-ASV-Bible',
        'BRG': 'BRG-Bible',
        'CEB': 'Common-English-Bible-CEB',
        'CEV': 'Contemporary-English-Version-CEV-Bible',
        'CJB': 'Complete-Jewish-Bible-CJB',
        'CSB': 'Christian-Standard-Bible-CSB',
        'DARBY': 'Darby-Translation-Bible',
        'DLNT': 'Disciples-Literal-New-Testament-DLNT',
        'DRA': 'Douay-Rheims-1899-American-Edition-DRA-Bible',
        'EHV': 'Evangelical-Heritage-Version-EHV-Bible',
        'ERV': 'Easy-to-Read-Version-ERV-Bible',
        'ESV': 'English-Standard-Version-ESV-Bible',
        'ESVUK': 'English-Standard-Version-Anglicised-ESV-Bible',
        'EXB': 'Expanded-Bible-EXB',
        'GNT': 'Good-News-Translation-GNT-Bible',
        'GNV': '1599-Geneva-Bible-GNV',
        'GW': 'GODS-WORD-Translation-GW-Bible',
        'HCSB': 'Holman-Christian-Standard-Bible-HCSB',
        'ICB': 'International-Childrens-Bible-ICB',
        'ISV': 'International-Standard-Version-ISV-Bible',
        'JUB': 'Jubilee-Bible-2000-JUB',
        'KJ21': '21st-Century-King-James-Version-KJ21-Bible',
        'KJV': 'King-James-Version-KJV-Bible',
        'LEB': 'Lexham-English-Bible-LEB',
        'MEV': 'Modern-English-Version-MEV-Bible',
        'MOUNCE': 'Mounce-Reverse-Interlinear-New-Testament',
        'MSG': 'Message-MSG-Bible',
        'NABRE': 'New-American-Bible-Revised-Edition-NABRE-Bible',
        'NASB': 'New-American-Standard-Bible-NASB',
        'NASB1995': 'New-American-Standard-Bible-NASB1995',
        'NCB': 'New-Catholic-Bible-NCB-Bible',
        'NCV': 'New-Century-Version-NCV-Bible',
        'NET': 'New-English-Translation-NET-Bible',
        'NIRV': 'New-International-Readers-Version-NIRV-Bible',
        'NIV': 'New-International-Version-NIV-Bible',
        'NIVUK': 'New-International-Version-UK-NIVUK-Bible',
        'NKJV': 'New-King-James-Version-NKJV-Bible',
        'NLT': 'New-Living-Translation-NLT-Bible',
        'NLV': 'New-Life-Version-NLV-Bible',
        'NMB': 'New-Matthew-Bible-NMB',
        'NOG': 'Names-of-God-NOG-Bible',
        'NRSV': 'New-Revised-Standard-Version-NRSV-Bible',
        'NRSVUE': 'New-Revised-Standard-Version-Updated-Edition-NRSVue-Bible',
        'NRSVA': 'New-Revised-Standard-Version-Anglicised-NRSVA-Bible',
        'NRSVCE': 'New-Revised-Standard-Version-Anglicised-Catholic-Edition-NRSVACE-Bible',
        'NTE': 'New-Testament-for-Everyone-NTE',
        'OJB': 'Orthodox-Jewish-Bible-OJB',
        'PHILLIPS': 'JB-Phillips-New-Testament',
        'RGT': 'Revised-Geneva-Translation-RGT-Bible',
        'RSV': 'Revised-Standard-Version-RSV-Bible',
        'RSVCE': 'Revised-Standard-Version-Catholic-Edition-RSVCE-Bible',
        'TLB': 'The-Living-Bible-TLB',
        'TLV': 'Tree-of-Life-Version-TLV-Bible',
        'TPT': 'The-Passion-Translation-TPT-Bible',  # No longer recognised on Bible Gateway
        'VOICE': 'The-Voice-Bible',
        'WE': 'Worldwide-English-New-Testament-WE',
        'WEB': 'World-English-Bible-WEB',
        'WYC': 'Wycliffe-Bible-WYC',
        'YLT': 'Youngs-Literal-Translation-YLT-Bible'
    }

    # Look up the translation in the dictionary and return an empty array if not found
    version_string = switch.get(translation)
    if not version_string:
        return []

    url = 'https://www.biblegateway.com/versions/{0}/#booklist'.format(version_string)

    # There's a match, so download the page and search it
    soup = BeautifulSoup(common.get_page(url), 'html.parser')

    # The spans inside the chapter's td complicate things - remove them
    [span.decompose() for span in soup.find_all('span')]

    # Search for the books
    book_tds = soup.find_all('td', class_='book-name')

    book_to_chapter_count = {
        book_td.text.strip().title(): len(list(book_td.next_sibling.next_sibling.stripped_strings))
        for book_td in book_tds
    }
    print('Got chapter count for {0}'.format(translation))
    return book_to_chapter_count


if __name__ == "__main__":
    # list taken from the code of "meaningless.utilities.common.is_supported_english_translation()"
    supported_english_translations = [
        'ASV', 'AKJV', 'BRG', 'EHV', 'ESV', 'ESVUK', 'GNV', 'GW', 'ISV',
        'JUB', 'KJV', 'KJ21', 'LEB', 'MEV', 'NASB', 'NASB1995', 'NET',
        'NIV', 'NIVUK', 'NKJV', 'NLT', 'NLV', 'NOG', 'NRSV', 'NRSVUE', 'WEB', 'YLT'
    ]

    translation_books_and_chapter_counts = {
        translation: get_book_to_chapter_count_mapping(translation) for translation in supported_english_translations
    }

    print(json.dumps(translation_books_and_chapter_counts, indent=2))

I ran a diff on all the translations, and there are very few differences. Mostly on "Song Of Solomon" book name, but that's unrelated. It turns out that only NRSV & NRSVUE have Apocrypha, and their books, order, and chapter counts are the same:

Diff between translations:
### No Diff between ASV and AKJV

### No Diff between ASV and BRG

### Diff between ASV and EHV
@@ -20,7 +20,7 @@
   "Psalm": 150,
   "Proverbs": 31,
   "Ecclesiastes": 12,
-  "Song Of Solomon": 8,
+  "Song Of Songs": 8,
   "Isaiah": 66,
   "Jeremiah": 52,
   "Lamentations": 5,

### No Diff between ASV and ESV

### No Diff between ASV and ESVUK

### No Diff between ASV and GNV

### No Diff between ASV and GW

### No Diff between ASV and ISV

### No Diff between ASV and JUB

### No Diff between ASV and KJV

### No Diff between ASV and KJ21

### No Diff between ASV and LEB

### Diff between ASV and MEV
@@ -20,7 +20,7 @@
   "Psalm": 150,
   "Proverbs": 31,
   "Ecclesiastes": 12,
-  "Song Of Solomon": 8,
+  "Song Of Songs": 8,
   "Isaiah": 66,
   "Jeremiah": 52,
   "Lamentations": 5,

### No Diff between ASV and NASB

### No Diff between ASV and NASB1995

### No Diff between ASV and NET

### Diff between ASV and NIV
@@ -20,7 +20,7 @@
   "Psalm": 150,
   "Proverbs": 31,
   "Ecclesiastes": 12,
-  "Song Of Solomon": 8,
+  "Song Of Songs": 8,
   "Isaiah": 66,
   "Jeremiah": 52,
   "Lamentations": 5,

### No Diff between ASV and NIVUK

### No Diff between ASV and NKJV

### No Diff between ASV and NLT

### No Diff between ASV and NLV

### No Diff between ASV and NOG

### Diff between ASV and NRSV
@@ -20,7 +20,7 @@
   "Psalm": 150,
   "Proverbs": 31,
   "Ecclesiastes": 12,
-  "Song Of Solomon": 8,
+  "Song Of Songs": 8,
   "Isaiah": 66,
   "Jeremiah": 52,
   "Lamentations": 5,
@@ -64,5 +64,23 @@
   "2 John": 1,
   "3 John": 1,
   "Jude": 1,
-  "Revelation": 22
+  "Revelation": 22,
+  "Tobit": 14,
+  "Judith": 16,
+  "Greek Esther": 10,
+  "Wisdom Of Solomon": 19,
+  "Sirach": 51,
+  "Baruch": 5,
+  "Letter Of Jeremiah": 1,
+  "Prayer Of Azariah": 1,
+  "Susanna": 1,
+  "Bel And The Dragon": 1,
+  "1 Maccabees": 16,
+  "2 Maccabees": 15,
+  "1 Esdras": 9,
+  "Prayer Of Manasseh": 1,
+  "Psalm 151": 1,
+  "3 Maccabees": 7,
+  "2 Esdras": 16,
+  "4 Maccabees": 18
 }

### Diff between ASV and NRSVUE
@@ -20,7 +20,7 @@
   "Psalm": 150,
   "Proverbs": 31,
   "Ecclesiastes": 12,
-  "Song Of Solomon": 8,
+  "Song Of Songs": 8,
   "Isaiah": 66,
   "Jeremiah": 52,
   "Lamentations": 5,
@@ -64,5 +64,23 @@
   "2 John": 1,
   "3 John": 1,
   "Jude": 1,
-  "Revelation": 22
+  "Revelation": 22,
+  "Tobit": 14,
+  "Judith": 16,
+  "Greek Esther": 10,
+  "Wisdom Of Solomon": 19,
+  "Sirach": 51,
+  "Baruch": 5,
+  "Letter Of Jeremiah": 1,
+  "Prayer Of Azariah": 1,
+  "Susanna": 1,
+  "Bel And The Dragon": 1,
+  "1 Maccabees": 16,
+  "2 Maccabees": 15,
+  "1 Esdras": 9,
+  "Prayer Of Manasseh": 1,
+  "Psalm 151": 1,
+  "3 Maccabees": 7,
+  "2 Esdras": 16,
+  "4 Maccabees": 18
 }

### No Diff between ASV and WEB

### No Diff between ASV and YLT

### No Diff between NRSV and NRSVUE    <---

@daniel-tran
Copy link
Owner

Thanks for the additional information, the helper script and diff breakdown.

The main thinking behind my recommendation is that the translations which have Apocrypha books tend to be inconsistent in terms of included books (and occasionally the chapter counts can get a bit weird as well, see "Additions to Esther" in the WYC translation).
For example, the RSV translation lists "Song of the Three Young Men" in its Apocrypha books, but this isn't listed as part of NRSVUE. Similarly, NRSVUE has "Greek Esther" which isn't included in the WYC translation.

Fortunately, the library is still in a relatively simple state where we have only two supported translations with Apocrypha books. But when more translations with their own set of Apocrypha books start being supported, I'd prefer things to be streamlined such that defining the set of Apocrypha books related to a particular translation is hopefully straightforward.

Whether that means using a script such as the one you've provided to generate the mapping, or adding extra logic to determine if the translation being handled has applicable Apocrypha books, it's probably worth looking into some kind of basic support for Apocrypha books with the two translations you've highlighted.

I'm labeling this pull request as enhancement while this is being investigated. But having said that, I can't guarantee this is something that will take form anytime soon or at all, given that I don't have as much time to dedicate to this library as I used to.

@daniel-tran daniel-tran added the enhancement New feature, request or investigation of new potential functionality label Aug 26, 2022
@daniel-tran
Copy link
Owner

After a bit of looking around on Bible Gateway and thinking in general about the NRSVUE translation, my current assessment is that the Apocrypha books are not going be officially supported in the foreseeable future. Note that you can still use the Web Extractor to try getting the passage content for various Apocrypha books and processing the text with another script, but your mileage will definitely vary, especially when the output_as_list flag is enabled.

The following sections detail my thought process to reach this conclusion:

Sirach 1:1

In the NRSVUE translation, Sirach 1:1 contains both the book prologue as well as the passage itself. This is somewhat problematic, as this effectively means we have a nested Bible passage that makes processing it rather difficult in that the Web Extractor relies on superscript text (specifically, <sup> tags with the versenum class) as a means to separate passages from each other.
Since the prologue to Sirach also contains these tags, the Web Extractor will somehow need to mark these specific passage numbers in the prologue without relying on HTML or CSS selectors (since they are basically the same as superscript numbers that actually denote the start of a non-prologue passage) as being just regular superscript numbers that don't indicate a passage number, otherwise they get interpreted as individual passages, which is incorrect according to the Bible Gateway search result.

Sure, it might still be possible to process Sirach 1:1 correctly, but it would involve some potentially complex processing behaviour specific to the NRSVUE translation, and could even be prone to breaking with a simple site update on the Bible Gateway side.

Prayer of Azariah 1:1

There's a little blurb at the start of this book, which presumably isn't actually part of the book itself. However, it uses the same element and class name as the first passage, so the only real way to identify this blurb is to use its element ID - As of writing, this is en-NRSVUE-33872.

I'm under the premise that this number is a total passage count relative to Genesis 1:1, but this is only really speculation based on minimal evidence. Until there's a better understanding for what this number stands for as well as the possible conditions under which it could be changed, I'd be hesitant to introduce specific filtering at the ID level into the Web Extractor.

1 Esdras 1:1

Similar to Azariah 1:1, but the chapter blurb in this case has the first-line-none CSS class. Unfortunately, there are also passages in other books which utilise this class as well (e.g. 1 Peter 1:25), though they do have multiple classes applied in addition to first-line-none so at least there's something that can be utilised to distinguish between a normal passage and the chapter blurb of 1 Esdras 1.

This would probably involve modifying the Web Extractor to apply more sophisticated logic to decompose all p tags which only have the first-line-none class when dealing with this particular translation. But the Beautiful Soup documentation doesn't really specify if it's possible at all to select an element in this way (i.e. find an element whose sole class is first-line-none and disregard anything else if it has additional CSS classes).

Greek Esther 1:1, 3:13, 8:12 and 10:13

Similar to Sirach 1:1, the entirety of what appears to be chapters 11 and 12 are included in this one passage without any distinguishing HTML or CSS features to differentiate them from the start of chapter 1. To handle this properly, similar measures would have to be put in place much like what was described for Sirach 1:1.

Greek Esther 3:13, 8:12 and 10:13 also have an additional chapter appended to them (13, 16 and the second chapter 11 respectively), of which the extra chapters from 3:13 and 8:12 could appear in the midst of passages that follow the normal chapter and passage numbering scheme.

To ensure the output from the downloaders matches that of the Bible Gateway search results, the Web Extractor would have to account for these specific passages to not process the extra chapter content as a regular chapter and would also have to be inferred from the user's search parameters (e.g. "Greek Esther 2 - 4" includes the extra chapter from Greek Esther 3:13). Without any distinguishing HTML or CSS features like a distinct element ID or even a specific element hierarchy, figuring out when to apply this special chapter handling is considered non-trivial and may even involve a rewrite of the Web Extractor's core logic (currently, it just sifts out/transforms all the problematic tags and extracts passage content mostly as it is without any regard to the specific chapters being processed).

@daniel-tran daniel-tran removed the enhancement New feature, request or investigation of new potential functionality label Sep 4, 2022
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

Successfully merging this pull request may close these issues.

2 participants