Comment Extraction

Every comment with its author, its date and the text it is attached to.

Review comments from Word, Excel and PowerPoint, as data. Comments hold the questions and objections raised in review, and they are lost when a file is converted to PDF or plain text. AILANG Parse returns each comment with its author, date, replies and the exact text it is attached to, so your AI application can answer “what did legal say about this clause?”

The Problem

Comments are where people discuss an Office document. They record who raised a concern, when, which text they were responding to, and the replies that followed.

Converting the file to PDF loses that review history.

Office keeps comments in their own files inside the document (word/comments.xml, xl/comments1.xml, ppt/comments/comment1.xml), with markers that link each comment to the content it is about. A parser that works from a PDF never sees those files.

On OfficeDocBench, AILANG Parse is the only one of these parsers that returns Office comments.

ParserComments returnedRight author, attached to the right text
AILANG Parse2 of 2 files100.0%
Unstructured0 of 2 files0.0%
Docling2 of 2 files7.1%
LlamaParse0 of 2 files0.0%
MarkItDown0 of 2 files0.0%
Pandoc2 of 2 files64.3%
Extend0 of 2 files0.0%

Read from the published OfficeDocBench results.

How It Works

AILANG Parse reads the Office file itself, with no conversion to PDF on the way. An Office file is a ZIP archive of XML files (the OOXML format), and the comments are read from the XML files that hold them.

DOCX (Word)

Word stores comments in word/comments.xml as w:comment elements, each with an id (w:id), author (w:author) and date (w:date). In the document text (word/document.xml), w:commentRangeStart and w:commentRangeEnd markers surround the exact words the comment is attached to. AILANG Parse matches the two, so each comment comes with the text it is about.

Replies are recorded in a separate file, word/commentsExtended.xml, which links each reply to its parent comment (w15:paraIdParent) and says whether the thread is resolved (w15:done). AILANG Parse reads it, so each reply points to its parent comment and is attached to the same text.

Sometimes a file does not say clearly what a comment is attached to: the markers are missing, a range is never closed, or the ids do not match. The comment is then returned with anchored: false and no attached text. AILANG Parse does not guess, because a comment attached to the wrong clause looks just like a correct one.

PPTX (PowerPoint)

PowerPoint has two comment formats and AILANG Parse reads both. Older decks use ppt/comments/comment1.xml, with author names in ppt/commentAuthors.xml. Current PowerPoint writes ppt/comments/modernComment_*.xml, with author names in ppt/authors.xml. A parser that reads only the older format misses every comment made in a recent version of PowerPoint.

Each comment is matched to its slide using the links stored in the slide itself, not by file number, so comments land on the right slide in decks where the numbering does not line up. A PowerPoint comment is pinned to a point on the slide, not to a run of text. AILANG Parse therefore reports the slide and its opening line, and does not invent a text range.

XLSX (Excel)

In Excel each comment names its cell directly, in a ref attribute (e.g. B5). Older notes are stored in xl/comments1.xml, with the author looked up in the file's authors list. Current threaded comments are stored in xl/threadedComments/, with author names in xl/persons/ and parentId linking each reply to its parent.

Current Excel writes both for the same comment. The older copy is there for compatibility, and its author is a placeholder like tc={guid}. AILANG Parse uses the threaded version and drops the duplicate, so a two-message thread is returned as two comments, not three. Each comment also comes with the value of its cell, such as B2: 184000, not just the cell reference.

What Gets Extracted

FieldDescriptionDOCXPPTXXLSX
Comment textThe full text of the commentYesYesYes
Author nameWho wrote the commentYesYesYes
TimestampWhen the comment was created (ISO 8601)YesYesThreaded only
Commented textThe exact text the comment is attached toYes—Cell value
Cell referenceThe cell a comment is attached to (e.g., B5)——Yes
Slide numberWhich slide the comment is on—Yes—
Comment IDAn id you can use to refer to the commentYesYesThreaded only
RepliesWhich comment each reply answersYes—Threaded only
Unanchored flaganchored: false when the file does not say what the comment is attached toYesYesYes

PPTX & XLSX Comments

Comments work differently in each Office format. AILANG Parse returns them in the same shape for all three.

PowerPoint Comments

A PowerPoint comment sits at a position on a slide, not on a run of text. Reviewers use them for notes such as "Move this chart to slide 3" or "Font too small for projection". AILANG Parse returns each comment with the slide it is on.

Excel Comments

Excel comments (called "Notes" in current Excel) are attached to a cell. They often explain a formula or question a specific value. AILANG Parse returns the comment text, the author and the cell reference, so you know which figure the comment is about.

Current Excel also has "Threaded Comments", stored separately in xl/threadedComments/. These also carry timestamps and replies.

Example Output

A DOCX with three review comments gives output like this:

{
  "blocks": [
    {
      "type": "Text",
      "content": "The quarterly revenue target of $4.2M was met."
    },
    {
      "type": "Text",
      "content": "[Comment by Sarah Chen on 2026-01-15T09:32:00Z] on 'quarterly revenue target of $4.2M': Should we break this down by region? The EMEA numbers look flat."
    },
    {
      "type": "Text",
      "content": "[Comment by James Park on 2026-01-15T10:14:00Z] (reply to Sarah Chen): Good call. EMEA was $1.1M vs $1.3M target. Adding a regional breakdown table."
    },
    {
      "type": "Text",
      "content": "Operating expenses remained within the approved budget."
    },
    {
      "type": "Text",
      "content": "[Comment by Legal Review on 2026-01-16T14:02:00Z] on 'approved budget': Need to clarify which board approval this refers to. Add the resolution number."
    }
  ]
}

Each comment keeps its author, its timestamp, the text it was attached to and the comment it replies to. This is the review history that a PDF conversion loses.

XLSX Example

{
  "blocks": [
    {
      "type": "Table",
      "content": "| Region | Q1 Revenue | Q1 Target | ... |",
      "metadata": { "sheet": "Revenue" }
    },
    {
      "type": "Text",
      "content": "[Comment by Audit Team on cell D7]: This figure doesn't match the GL export. Verify against SAP report #4821."
    }
  ]
}

Use Cases

Legal Review

See who raised which concern and when. Build an audit trail of review comments across contract drafts without opening each version by hand.

Compliance Audit

Show that a document went through review. The full comment thread gives you the reviewers, the timestamps and the responses.

Collaborative Editing

Get all the feedback from a reviewed document at once, as data you can sort and track, without clicking through each comment bubble.

Document Intelligence

Give the comments to an LLM along with the text. It can then tell you what the document says and what reviewers thought about each section.

Try It

Extract comments from any Office document:

# Parse a DOCX with comments
docparse contract_reviewed.docx

# Parse via the API
curl -X POST https://docparse.ailang.sunholo.com/api/v1/parse \
  -H "Authorization: Bearer dp_YOUR_KEY" \
  -F "filepath=@contract_reviewed.docx" \
  -F "outputFormat=blocks"

# Parse an XLSX with cell comments
docparse budget_annotated.xlsx

Parse in Browser    API Reference

Frequently Asked Questions

How do I extract comments with author names from a DOCX file?

AILANG Parse reads comments.xml and matches each comment to the text it is attached to, using the w:commentRangeStart/w:commentRangeEnd markers. Each comment is returned with its text, author, date and the commented text.

Do PDF-based document parsers preserve DOCX comments?

No. Converting to PDF either prints comments in the margin or drops them. AILANG Parse reads them from the DOCX with author, date and commented text. See the comparison page.

Can I extract both comments and track changes from the same document?

Yes. One parse returns both. Comments and tracked changes are separate kinds of block, so you can filter for either.

Format Guides

AILANG Parse reads comments from DOCX, PPTX and XLSX files. The format guides list everything else it extracts:

DOCX Parsing →  ·  PPTX Parsing →  ·  XLSX Parsing →