Table of Contents

Method RewriteAsync

Namespace
LMKit.TextEnhancement
Assembly
LM-Kit.NET.dll

RewriteAsync(string, CommunicationStyle, Language, CancellationToken)

Asynchronously rewrites the specified text into a specified style and language.

public Task<string> RewriteAsync(string text, TextRewriter.CommunicationStyle style, Language language = Language.English, CancellationToken cancellationToken = default)

Parameters

text string

The text to rewrite.

style TextRewriter.CommunicationStyle

The communication style to apply.

language Language

The language for the rewritten text. Default is English.

cancellationToken CancellationToken

Optional. A CancellationToken for handling cancellation requests.

Returns

Task<string>

A task representing the asynchronous operation, containing the rewritten text.

Remarks

This method handles text of any size, preserving the structure and formatting of the original content.