xml_translator¶
academic_doc_generator.exam_translator.xml_translator
¶
Module for translating XML-based exam content (e.g., ILIAS export) from German to English.
translate_xml_exam(input_path, llm_client=None, output_path=None, verbose=False)
¶
Translates an XML exam file from German to English.
This function searches for
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
input_path
|
Union[str, Path]
|
Path to the German XML exam file. |
required |
llm_client
|
Optional[LLMClient]
|
LLMClient instance. If None, a new one is created. |
None
|
output_path
|
Optional[Union[str, Path]]
|
Path for the English output. If None, a suffix "_engl" is added. |
None
|
verbose
|
bool
|
If True, prints detailed translation progress. |
False
|
Returns:
| Type | Description |
|---|---|
str
|
Path to the saved English XML file. |