Class TextCorrection
- Namespace
- LMKit.TextEnhancement
- Assembly
- LM-Kit.NET.dll
Provides functionality for grammar and spell checking of plain text using a language model.
public sealed class TextCorrection
- Inheritance
-
TextCorrection
- Inherited Members
Remarks
The TextCorrection class allows you to correct grammatical and spelling errors in a given text. It utilizes a language model to process the text and return a corrected version while preserving the original structure and formatting.
Constructors
- TextCorrection(LLM)
Initializes a new instance of the TextCorrection class.
Properties
- Model
Gets the LLM instance associated with this TextCorrection object.
Methods
- Correct(string, CancellationToken)
Corrects grammar and spelling errors in the specified text.
- CorrectAsync(string, CancellationToken)
Asynchronously corrects grammar and spelling errors in the specified text.
Events
- AfterTextCompletion
Occurs after a text completion operation is performed.