
Aspose.Words has introduced an exciting new feature to improve the quality of your documents: AI-powered grammar checking.
With the integration of OpenAI generative models, users can now effortlessly identify and correct grammar errors in their documents. This is made possible by the CheckGrammar method recently added to the Aspose.Words.AI namespace.
Start using AI-powered grammar checking today and elevate your document quality!
This article covers the following topics:
How to Check Grammar Using .NET AI Functionality?
The CheckGrammar method analyzes the text within a document and highlights grammar issues. This feature streamlines the proofreading process to keep your documents error-free and polished.
The following code example shows how to use the CheckGrammar method in your .NET application:
Document doc = new Document(MyDir + "Big document.docx");
string apiKey = Environment.GetEnvironmentVariable("API_KEY");
// Use OpenAI generative language models.
IAiModelText model = (IAiModelText)AiModel.Create(AiModelType.Gpt4OMini).WithApiKey(apiKey);
CheckGrammarOptions grammarOptions = new CheckGrammarOptions();
grammarOptions.ImproveStylistics = true;
Document proofedDoc = model.CheckGrammar(doc, grammarOptions);
proofedDoc.Save("AI.AiGrammar.docx");
Benefits of AI-powered Grammar Checking
The integration of OpenAI generative models in Aspose.Words offers several advantages:
- Accuracy: Detect and correct complex grammatical errors with ease
- Efficiency: Save time on manual proofreading
- Professional Results: Ensure your documents maintain a high standard of quality and readability
With the CheckGrammar method, Aspose.Words empowers users to produce impeccable documents!