Converter Result Utils
Module for modifying converter results.
extract_captions_from_result(result, selected_route=None)
Extracts captions from the result based on the result tag and selected route.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
result
|
TextResult
|
The result of the converter. |
required |
selected_route
|
str | None
|
The selected route for the conversion. Defaults to None. |
None
|
Returns:
| Type | Description |
|---|---|
list[str]
|
list[str]: The captions output. |
extract_text_repr_from_result(result)
Extracts text representation from the result.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
result
|
TextResult
|
The result of the converter. |
required |
Returns:
| Type | Description |
|---|---|
str | list[str] | dict[str, Any]
|
str | list[str] | dict[str, Any]: The text representation. |