maxframe.learn.contrib.llm.text.translate#

maxframe.learn.contrib.llm.text.translate(series, model: TextLLM, source_language: str, target_language: str, index=None)[source]#

Translate text content in a series using a language model from source language to target language.

Parameters:
  • series (pandas.Series) – A maxframe Series containing text data to translate. Each element should be a text string.

  • model (TextLLM) – Language model instance used for text summarization.

  • source_language (str) – Source language of the text.

  • target_language (str) – Target language of the text.

  • index (array-like, optional) – Index for the output series, by default None, will generate new index.

Returns:

A pandas Series containing the generated translation and success status.

Return type:

maxframe.Series

Notes

Preview: This API is in preview state and may be unstable. The interface may change in future releases.