Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.
Kiểm tra ngữ pháp trong tài liệu là rất quan trọng để đảm bảo sự rõ ràng, chuyên nghiệp và chính xác. Các tài liệu được viết tốt để lại ấn tượng tích cực và tránh hiểu lầm. Kiểm tra ngữ pháp giúp xác định và sửa lỗi nhanh chóng, tiết kiệm thời gian và cải thiện chất lượng.
Aspose.Words cho phép người dùng kiểm tra ngữ pháp và phát hiện lỗi trong tài liệu bằng cách sử dụng các họ của OpenAI, Google và Claude được liệt kê trong bảng liệt kê AiModelType. Sử dụng phương thức CheckGrammar, có sẵn trong không gian tên Aspose.Words.AI. CheckGrammar phân tích văn bản trong tài liệu và nêu bật các vấn đề ngữ pháp.
Ví dụ mã sau đây cho thấy cách sử dụng mô hình GPT-4o mini trong Aspose.Words để kiểm tra ngữ pháp:
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.