Skip to content

Commit 9d71953

Browse files
authored
Update version to 1.8.4 (#238)
+ minor changes for consistency with Machine
1 parent 11d3611 commit 9d71953

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

machine/punctuation_analysis/usfm_structure_extractor.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@ def chapter(
2727
pub_number: Optional[str],
2828
) -> None:
2929
self._next_text_segment_builder.add_preceding_marker(UsfmMarkerType.CHAPTER)
30-
chapter_number: int = int(number) if number.isdigit() else 0
31-
self._next_text_segment_builder.set_chapter(chapter_number)
30+
self._next_text_segment_builder.set_chapter(state.verse_ref.chapter_num)
3231

3332
def start_para(
3433
self,

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ reportMissingModuleSource = false
3232

3333
[tool.poetry]
3434
name = "sil-machine"
35-
version = "1.8.3"
35+
version = "1.8.4"
3636
description = "A natural language processing library that is focused on providing tools for resource-poor languages."
3737
license = "MIT"
3838
authors = ["SIL International"]

tests/punctuation_analysis/test_usfm_structure_extractor.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,15 @@ def test_get_chapters_filter_by_book():
2121
def test_get_chapters_filter_by_chapter():
2222
usfm_structure_extractor = UsfmStructureExtractor()
2323
usfm_structure_extractor.start_book(verse_text_parser_state, "id", "MAT")
24+
verse_text_parser_state.verse_ref.chapter_num = 1
2425
usfm_structure_extractor.chapter(verse_text_parser_state, "1", "c", None, None)
2526
usfm_structure_extractor.verse(verse_text_parser_state, "1", "v", None, None)
2627
usfm_structure_extractor.text(verse_text_parser_state, "test")
28+
verse_text_parser_state.verse_ref.chapter_num = 2
2729
usfm_structure_extractor.chapter(verse_text_parser_state, "2", "c", None, None)
2830
usfm_structure_extractor.verse(verse_text_parser_state, "1", "v", None, None)
2931
usfm_structure_extractor.text(verse_text_parser_state, "test2")
32+
verse_text_parser_state.verse_ref.chapter_num = 3
3033
usfm_structure_extractor.chapter(verse_text_parser_state, "3", "c", None, None)
3134
usfm_structure_extractor.verse(verse_text_parser_state, "1", "v", None, None)
3235
usfm_structure_extractor.text(verse_text_parser_state, "test3")

0 commit comments

Comments
 (0)