CheckGrammarOptions Class
Wordize.AI.CheckGrammarOptions class. Allows to specify various options while checking grammar of a document using AI.
CheckGrammarOptions class
Allows to specify various options while checking grammar of a document using AI.
public class CheckGrammarOptions
Constructors
| Name | Description |
|---|---|
| CheckGrammarOptions() | The default constructor. |
Properties
| Name | Description |
|---|---|
| ImproveStylistics { get; set; } | Allows to specify either AI will try to improve stylistics of the text being proofed. Default value is false. |
| MakeRevisions { get; set; } | Allows to specify either final or revised document to be returned with proofed text. Default value is false. |
| PreserveFormatting { get; set; } | Allows to specify whether preserve layout and formatting of the original document, or not. Default value is true. |
Examples
Shows how to create custom OpenAiModel and perform grammar checking.
string apiUrl = Environment.GetEnvironmentVariable("CUSTOM_OPENAI_URL", EnvironmentVariableTarget.User);
string apiName = Environment.GetEnvironmentVariable("CUSTOM_OPENAI_NAME", EnvironmentVariableTarget.User);
string apiKey = Environment.GetEnvironmentVariable("CUSTOM_OPENAI_KEY", EnvironmentVariableTarget.User);
AiModel model = OpenAiModel.Create(apiUrl, apiName, apiKey);
CheckGrammarOptions options = new CheckGrammarOptions() { MakeRevisions = true };
GrammarChecker.CheckGrammar(MyDir + "SimpleAI.docx", ArtifactsDir + "CheckGrammar.docx", model, options);
See Also
- namespace Wordize.AI
- assembly Wordize