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
stringThe text to rewrite.
style
TextRewriter.CommunicationStyleThe communication style to apply.
language
LanguageThe language for the rewritten text. Default is English.
cancellationToken
CancellationTokenOptional. A CancellationToken for handling cancellation requests.
Returns
Remarks
This method handles text of any size, preserving the structure and formatting of the original content.