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モデルを使用して文法をチェックする方法を示しています:
doc = aw.Document(file_name=MY_DIR + 'Big document.docx')
api_key = system_helper.environment.Environment.get_environment_variable('API_KEY')
# Use OpenAI generative language models.
model = aw.ai.AiModel.create(aw.ai.AiModelType.GPT_4O_MINI).with_api_key(api_key).as_open_ai_model()
grammar_options = aw.ai.CheckGrammarOptions()
grammar_options.improve_stylistics = True
proofed_doc = model.check_grammar(doc, grammar_options)
proofed_doc.save(file_name='AI.AiGrammar.docx')
Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.