JavaScript에서 Word, PDF, 웹 문서의 문법을 검사합니다.

JavaScript를 사용하여 문서의 문법을 검사합니다.

OpenAI, Claude 및 Gemini과 같은 주요 언어 모델과의 원활한 통합을 통해 Node.js 애플리케이션에 대한 AI 기반 문서 처리 기능을 광범위하게 제공합니다.

코드 스니펫 보기

JavaScript AI 문법 검사기

Aspose.Words for Node.js via .NET OpenAI, Google, Claude AI 모델을 사용하여 문서의 문법 오류를 감지하고 강조 표시합니다. CheckGrammar 메서드는 DOC, DOCX, RTF, PDF, HTML, Markdown, ODT, TXT, EPUB 파일을 분석하고 문법 문제를 표시합니다 — 수동 교정 없이도 깔끔하고 전문적인 콘텐츠를 제공할 수 있도록 도와줍니다.

개발자들이 Aspose.Words를 문법 검사에 선택하는 이유

  • 전체 문서를 한 번의 API 호출로 문법 검사
  • OpenAI (GPT-4o), Google (Gemini), Claude 모델군 지원
  • 출력 문서에 오류를 강조 표시하여 쉽게 검토 가능
  • DOC, DOCX, RTF, PDF, ODT, HTML, Markdown, TXT, EPUB 등 다양한 형식 지원

인증을 위해서는 선택한 AI 제공업체의 API 키가 필요합니다. 지원되는 모델 전체 목록은 API Reference를 참조하세요.

오늘 바로 JavaScript 문법 검사를 시작하세요 — 위의 실시간 데모를 사용해 보세요.

JavaScript를 사용한 문법 검사 예제 코드
목록에서 대상 형식 선택
코드 실행
npm install @aspose/words
복사
const aw = require('@aspose/words');

const doc = new aw.Document("Document.docx");
const apiKey = process.env.API_KEY;

// OpenAI의 생성 언어 모델을 사용하십시오.
const model = aw.AI.AiModel.createGpt4OMini();
model.setApiKey(apiKey);

const grammarOptions = new aw.AI.CheckGrammarOptions();
grammarOptions.improveStylistics = true;

const proofedDoc = model.checkGrammar(doc, grammarOptions);
proofedDoc.save("Output.docx");
const aw = require('@aspose/words');

const doc = new aw.Document("Document.docx");
// Pass an empty string if the self-hosted model does not require an API key.
const model = new CustomAiModel("my-model-24b", "https://your-server.com/v1");
model.setApiKey("");

const grammarOptions = new aw.AI.CheckGrammarOptions();
grammarOptions.improveStylistics = true;

const proofedDoc = model.checkGrammar(doc, grammarOptions);
proofedDoc.save("Output.docx");

class CustomAiModel extends aw.AI.OpenAiModel {
    constructor(name, url) {
        super(name);
        this._url = url;
    }
    get url() {
        return this._url;
    }
}
코드 실행

JavaScript를 사용하여 문서의 문법을 검사하는 방법

  1. Aspose.Words for Node.js via .NET를 설치합니다.
  2. JavaScript 프로젝트에 라이브러리 참조(라이브러리 가져오기)를 추가합니다.
  3. JavaScript에서 소스 파일을 엽니다.
  4. CheckGrammar 메서드를 호출하고 문서를 전달합니다.
  5. 완료되면 문서의 문법 오류가 강조 표시되며, 원하는 형식으로 새 파일로 저장할 수 있습니다.

문법 검사를 위한 Node.js via .NET 라이브러리

We host our Node.js via .Net packages in NPM repositories. Please follow the step-by-step instructions on how to install "Aspose.Words for Node.js via .NET" to your developer environment.

System Requirements

This package is compatible with Node.js 14.17.0 or higher.

5%

Aspose 제품 업데이트 구독

월간 뉴스레터와 제안을 우편함으로 직접 받으십시오.

© Aspose Pty Ltd 2001-2026. 판권 소유.