Use item axis details in captions
This commit is contained in:
@@ -51,6 +51,7 @@ class CaptionMetadataRouteDependencies:
|
||||
subject_phrase_from_counts: Callable[[dict[str, Any]], str]
|
||||
verb_for_row: Callable[[dict[str, Any]], str]
|
||||
metadata_action_label: Callable[[dict[str, Any]], str]
|
||||
item_axis_detail_text: Callable[[dict[str, Any], str], str]
|
||||
natural_cast_descriptor_text: Callable[[str], str]
|
||||
cast_labels: Callable[[str], list[str]]
|
||||
natural_label_text: Callable[[Any, list[str]], str]
|
||||
@@ -227,6 +228,7 @@ def configured_cast_from_row_result(
|
||||
cast = deps.row_value(row, "cast_summary", ("Cast",))
|
||||
role_graph = deps.row_value(row, "role_graph", ("Role graph",))
|
||||
item = deps.row_value(row, "item", deps.item_labels)
|
||||
axis_detail = deps.item_axis_detail_text(row, " ".join(part for part in (role_graph, item) if part))
|
||||
scene = deps.row_value(row, "scene_text", ("Setting", "Scene"))
|
||||
expression = ""
|
||||
if not deps.expression_disabled(row):
|
||||
@@ -250,6 +252,8 @@ def configured_cast_from_row_result(
|
||||
parts.append(role_graph)
|
||||
if item:
|
||||
parts.append(f"The {deps.metadata_action_label(row)} is {item}")
|
||||
if axis_detail:
|
||||
parts.append(f"Selected action details include {axis_detail}")
|
||||
scene_bits = []
|
||||
if scene:
|
||||
scene_bits.append(f"set in {scene}")
|
||||
|
||||
Reference in New Issue
Block a user