Change default value of number of sentences to generate

This commit is contained in:
Matthias Bisping 2023-02-13 18:44:55 +01:00
parent be0c643f75
commit 46146cc886

View File

@ -65,7 +65,7 @@ def split_into_figure_and_caption(rectangle: Rectangle):
return figure_box, caption_box
def generate_random_text_block(rectangle: Rectangle, n_sentences=3000) -> ContentRectangle:
def generate_random_text_block(rectangle: Rectangle, n_sentences=None) -> ContentRectangle:
block = TextBlock(
*rectangle.coords,
font=pick_random_font_available_on_system(
@ -87,7 +87,7 @@ def generate_random_table_caption(rectangle: Rectangle) -> ContentRectangle:
return generate_random_caption(rectangle, f"Tabl {rnd.randint(1, 20)}")
def generate_random_caption(rectangle: Rectangle, caption_start, n_sentences=1000) -> ContentRectangle:
def generate_random_caption(rectangle: Rectangle, caption_start, n_sentences=None) -> ContentRectangle:
block = TextBlock(
*rectangle.coords,
text_generator=CaptionGenerator(caption_start=caption_start),