GrammarChecker.CheckGrammarToImages
GrammarChecker CheckGrammarToImages method. Checks grammar of the provided document. This operation leverages the connected AI model for checking grammar of document.
CheckGrammarToImages(string, ImageSaveOptions, AiModel, CheckGrammarOptions)
Checks grammar of the provided document. This operation leverages the connected AI model for checking grammar of document.
public static Stream[] CheckGrammarToImages(string inputFile, ImageSaveOptions saveOptions,
AiModel model, CheckGrammarOptions options = null)
Parameter | Type | Description |
---|---|---|
inputFile | String | The input file name. |
saveOptions | ImageSaveOptions | Image save options. |
model | AiModel | Specifies the AI model responsible for generating the summary of a document. |
options | CheckGrammarOptions | Set of options used while checking grammar of a document using AI. |
Return Value
Returns array of image streams. The streams should be disposed by the end user.
Examples
Demonstrates how to check grammar in a document and save the result as an array of image streams.
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() { PreserveFormatting = true };
Stream[] pages = GrammarChecker.CheckGrammarToImages(MyDir + "SimpleAI.docx", new ImageSaveOptions(SaveFormat.Png), model, options);
See Also
- class ImageSaveOptions
- class AiModel
- class CheckGrammarOptions
- class GrammarChecker
- namespace Wordize.AI
- assembly Wordize
CheckGrammarToImages(Stream, ImageSaveOptions, AiModel, CheckGrammarOptions)
Checks grammar of the provided document. This operation leverages the connected AI model for checking grammar of document.
public static Stream[] CheckGrammarToImages(Stream inputStream, ImageSaveOptions saveOptions,
AiModel model, CheckGrammarOptions options = null)
Parameter | Type | Description |
---|---|---|
inputStream | Stream | The input stream. |
saveOptions | ImageSaveOptions | Image save options. |
model | AiModel | Specifies the AI model responsible for generating the summary of a document. |
options | CheckGrammarOptions | Set of options used while checking grammar of a document using AI. |
Return Value
Returns array of image streams. The streams should be disposed by the end user.
See Also
- class ImageSaveOptions
- class AiModel
- class CheckGrammarOptions
- class GrammarChecker
- namespace Wordize.AI
- assembly Wordize