From 3e189a33bc6e449cd864432b4aa3bfb5722b7bcf Mon Sep 17 00:00:00 2001 From: QueenieZqq <46456163+QueenieZqq@users.noreply.github.com> Date: Thu, 27 Feb 2025 20:42:04 +0000 Subject: [PATCH 01/22] Fix index.bs markup SHA: cba99261c9603d0dfc386b85de606b4b936636e9 Reason: push, by QueenieZqq Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- index.html | 496 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 496 insertions(+) create mode 100644 index.html diff --git a/index.html b/index.html new file mode 100644 index 0000000..50d061b --- /dev/null +++ b/index.html @@ -0,0 +1,496 @@ + + + + + Proofreader API + + + + + + + + + + + + + + + +
+

+

Proofreader API

+

Unofficial Proposal Draft,

+
+ More details about this document +
+
+
This version: +
https://explainers-by-googlers.github.io/proofreader-api +
Issue Tracking: +
GitHub +
Editor: +
(Google) +
+
+
+
+ +
+
+
+

Abstract

+

The proofreader API provides high-level interfaces to call on browser or operating system’s built-in language model to help with proofreading tasks.

+
+

Status of this document

+
+

+
+
+ +
+

1. Introduction

+

For now, see the explainer.

+
+
+

Conformance

+

Document conventions

+

Conformance requirements are expressed + with a combination of descriptive assertions + and RFC 2119 terminology. + The key words “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”, “RECOMMENDED”, “MAY”, and “OPTIONAL” + in the normative parts of this document + are to be interpreted as described in RFC 2119. + However, for readability, + these words do not appear in all uppercase letters in this specification.

+

All of the text of this specification is normative + except sections explicitly marked as non-normative, examples, and notes. [RFC2119]

+

Examples in this specification are introduced with the words “for example” + or are set apart from the normative text + with class="example", + like this:

+
+ +

This is an example of an informative example.

+
+

Informative notes begin with the word “Note” + and are set apart from the normative text + with class="note", + like this:

+

Note, this is an informative note.

+
+ +

References

+

Normative References

+
+
[RFC2119] +
S. Bradner. Key words for use in RFCs to Indicate Requirement Levels. March 1997. Best Current Practice. URL: https://datatracker.ietf.org/doc/html/rfc2119 +
\ No newline at end of file From 0218754389fdd88089dc6213de15fbe43ee2c0d6 Mon Sep 17 00:00:00 2001 From: QueenieZqq <46456163+QueenieZqq@users.noreply.github.com> Date: Mon, 10 Mar 2025 17:34:00 +0000 Subject: [PATCH 02/22] Merge pull request #1 from tomayac/patch-1 SHA: 4fe81ebd57ea4c7f3ef406745bb4be5bc5c1d996 Reason: push, by QueenieZqq Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- index.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/index.html b/index.html index 50d061b..1996d23 100644 --- a/index.html +++ b/index.html @@ -5,10 +5,10 @@ Proofreader API - + - +
-

+

+

Proofreader API

-

Unofficial Proposal Draft,

+

Unofficial Proposal Draft, +

More details about this document
@@ -428,7 +432,8 @@

Proofreader API

- +
@@ -470,21 +475,31 @@

[RFC2119]

+ except sections explicitly marked as non-normative, examples, and notes. [RFC2119] + +

Examples in this specification are introduced with the words “for example” or are set apart from the normative text with class="example", - like this:

+ like this: + +

- -

This is an example of an informative example.

+ + +

This is an example of an informative example. +

Informative notes begin with the word “Note” and are set apart from the normative text with class="note", - like this:

+ like this: + +

Note, this is an informative note.

From 427f77459002fc9aea06cdebdc7c1c078b89003b Mon Sep 17 00:00:00 2001 From: QueenieZqq <46456163+QueenieZqq@users.noreply.github.com> Date: Mon, 16 Jun 2025 23:15:53 +0000 Subject: [PATCH 07/22] Merge pull request #10 from christianliebel/patch-2 SHA: 2870e45c47271234a0c9cf5ddabae401e5ac14cf Reason: push, by QueenieZqq Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index 748b784..e4cb4ba 100644 --- a/index.html +++ b/index.html @@ -8,7 +8,7 @@ - + + + + +
-

Proofreader API

-

Unofficial Proposal Draft, -

+

Draft Community Group Report, +

More details about this document
@@ -433,7 +724,8 @@

Proofreader API

-
@@ -443,6 +735,17 @@

Status of this document

+

+ This specification was published by the Web Machine Learning Community Group. + It is not a W3C Standard nor is it on the W3C Standards Track. + + Please note that under the + W3C Community Contributor License Agreement (CLA) + there is a limited opt-out and other conditions apply. + + Learn more about + W3C Community and Business Groups. +

@@ -450,21 +753,100 @@

Table of Contents

  1. 1 Introduction +
  2. 2 The proofreader API +
  3. + 3 Shared infrastructure +
      +
    1. 3.1 Common APIs +
  4. Conformance
    1. Document conventions
    +
  5. + Index +
      +
    1. Terms defined by this specification +
    2. Terms defined by reference +
  6. References
    1. Normative References
    +
  7. IDL Index

1. Introduction

-

For now, see the explainer.

+

For now, see the explainer.

+

2. The proofreader API

+
[Exposed=Window, SecureContext]
+interface Proofreader {
+    static Promise<Proofreader> create(optional ProofreaderCreateOptions options = {});
+    static Promise<Availability> availability(optional ProofreaderCreateCoreOptions options = {});
+
+    Promise<ProofreadResult> proofread(
+        DOMString input,
+        optional ProofreaderProofreadOptions options = {}
+    );
+
+    readonly attribute boolean includeCorrectionTypes;
+    readonly attribute boolean includeCorrectionExplanations;
+
+    readonly attribute FrozenArray<DOMString>? expectedInputLanguages;
+    readonly attribute DOMString? outputLanguage;
+};
+
+dictionary ProofreaderCreateCoreOptions {
+    boolean includeCorrectionTypes = false;
+    boolean includeCorrectionExplanations = false;
+
+    sequence<DOMString> expectedInputLanguages;
+    DOMString outputLanguage;
+};
+
+dictionary ProofreaderCreateOptions : ProofreaderCreateCoreOptions {
+    AbortSignal signal;
+    CreateMonitorCallback monitor;
+};
+
+dictionary ProofreaderProofreadOptions {
+    AbortSignal signal;
+};
+
+dictionary ProofreadResult {
+    DOMString correctedInput;
+    sequence<ProofreadCorrection> corrections;
+};
+
+dictionary ProofreadCorrection {
+    unsigned long long startIndex;
+    unsigned long long endIndex;
+    DOMString correction;
+    sequence<CorrectionType> type;
+    DOMString explanation;
+};
+
+enum CorrectionType { "spelling", "punctuation", "capitalization", "preposition", "missing-words", "grammar" };
+
+

3. Shared infrastructure

+

3.1. Common APIs

+
[Exposed=Window, SecureContext]
+interface CreateMonitor : EventTarget {
+    attribute EventHandler ondownloadprogress;
+};
+
+callback CreateMonitorCallback = undefined (CreateMonitor monitor);
+
+enum Availability {
+    "unavailable",
+    "downloadable",
+    "downloading",
+    "available"
+};
+

Conformance

@@ -504,9 +886,1048 @@

Note, this is an informative note.

+

Index

+

Terms defined by this specification

+ +

Terms defined by reference

+

References

Normative References

+
[DOM] +
Anne van Kesteren. DOM Standard. Living Standard. URL: https://dom.spec.whatwg.org/ +
[HTML] +
Anne van Kesteren; et al. HTML Standard. Living Standard. URL: https://html.spec.whatwg.org/multipage/
[RFC2119]
S. Bradner. Key words for use in RFCs to Indicate Requirement Levels. March 1997. Best Current Practice. URL: https://datatracker.ietf.org/doc/html/rfc2119 -
\ No newline at end of file +
[WEBIDL] +
Edgar Chen; Timothy Gu. Web IDL Standard. Living Standard. URL: https://webidl.spec.whatwg.org/ + +

IDL Index

+
[Exposed=Window, SecureContext]
+interface Proofreader {
+    static Promise<Proofreader> create(optional ProofreaderCreateOptions options = {});
+    static Promise<Availability> availability(optional ProofreaderCreateCoreOptions options = {});
+
+    Promise<ProofreadResult> proofread(
+        DOMString input,
+        optional ProofreaderProofreadOptions options = {}
+    );
+
+    readonly attribute boolean includeCorrectionTypes;
+    readonly attribute boolean includeCorrectionExplanations;
+
+    readonly attribute FrozenArray<DOMString>? expectedInputLanguages;
+    readonly attribute DOMString? outputLanguage;
+};
+
+dictionary ProofreaderCreateCoreOptions {
+    boolean includeCorrectionTypes = false;
+    boolean includeCorrectionExplanations = false;
+
+    sequence<DOMString> expectedInputLanguages;
+    DOMString outputLanguage;
+};
+
+dictionary ProofreaderCreateOptions : ProofreaderCreateCoreOptions {
+    AbortSignal signal;
+    CreateMonitorCallback monitor;
+};
+
+dictionary ProofreaderProofreadOptions {
+    AbortSignal signal;
+};
+
+dictionary ProofreadResult {
+    DOMString correctedInput;
+    sequence<ProofreadCorrection> corrections;
+};
+
+dictionary ProofreadCorrection {
+    unsigned long long startIndex;
+    unsigned long long endIndex;
+    DOMString correction;
+    sequence<CorrectionType> type;
+    DOMString explanation;
+};
+
+enum CorrectionType { "spelling", "punctuation", "capitalization", "preposition", "missing-words", "grammar" };
+
+[Exposed=Window, SecureContext]
+interface CreateMonitor : EventTarget {
+    attribute EventHandler ondownloadprogress;
+};
+
+callback CreateMonitorCallback = undefined (CreateMonitor monitor);
+
+enum Availability {
+    "unavailable",
+    "downloadable",
+    "downloading",
+    "available"
+};
+
+
+ + + \ No newline at end of file From 094df452b482d1fb2a31780d735925c77a074fa6 Mon Sep 17 00:00:00 2001 From: Reilly Grant Date: Tue, 3 Feb 2026 22:35:36 +0000 Subject: [PATCH 21/22] Rename 'type' to 'types' SHA: 29971f436c7c6e9a5ada47000b897162b8168e6c Reason: push, by QueenieZqq Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index 2156292..a34fcc6 100644 --- a/index.html +++ b/index.html @@ -8,7 +8,7 @@ - +