Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.
文書の文法をチェックすることは、明快さ、プロ意識、正確さを確保するために重要です。 よく書かれた文書は肯定的な印象を残し、誤解を避ける。 文法チェックは、エラーを迅速に特定して修正するのに役立ち、時間を節約し、品質を向上させます。
Aspose.Wordsを使用すると、ユーザーはAiModelType列挙にリストされているOpenAI、Google、およびClaudeモデルのファミリを使用して、文法をチェックし、文書のエラーを検出できます。 Aspose.Words.AI名前空間で使用できるCheckGrammarメソッドを使用します。 CheckGrammarは、文書内のテキストを分析し、文法上の問題を強調表示します。
次のコード例は、Aspose.WordsのGPT-4o miniモデルを使用して文法をチェックする方法を示しています:
// For complete examples and data files, please go to https://github.com/aspose-words/Aspose.Words-for-.NET.git. | |
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"); |
Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.