Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Add support for extracting comments from Word documents (.docx, .docm, .doc, .dotx)

Aperta
#1,850 0 commenti 0 reazioni 1 assegnatario Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@paullizer ci sta già lavorando.

Dal 27/10/2026.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

enhancement P2

Summary

Add support for extracting review comments from Word documents across both modern OOXML formats (.docx, .docm, .dotx) and legacy Word 97–2003 binary OLE documents (.doc).

User Value

Users and customers frequently store critical review feedback, clarifications, and Threaded Q&A in Word margin comments. Previously:

  • .docx files processed by Azure Document Intelligence (prebuilt-read) only extracted main document text, headers/footers, tables, and footnotes, ignoring word/comments.xml.
  • .docm files processed via docx2txt ignored word/comments.xml.
  • .doc (Word 97–2003 OLE) files flattened the piece table without extracting structured comment metadata (ccpAtn, PlcfandTxt, PlcfandRef, GrpXstAtnOwners), author names, or anchor positions.

Extracting and indexing Word comments alongside the document chunks where they are anchored makes review comments searchable and available to AI chat, workspace RAG, M365 extraction, and content screening.

Proposed Behavior

  • OOXML Word files (.docx, .docm, .dotx):
    • Safely parse word/comments.xml (author, initials, date, comment text), word/commentsExtended.xml (threaded replies via paraIdParent and resolved/done state), and word/document.xml (w:commentRangeStart, w:commentRangeEnd, w:commentReference for quoted anchor text and reading-order word_offset).
  • Legacy binary Word files (.doc):
    • Parse the MS-DOC File Information Block (FibRgLw97 ccpAtn and FibRgFcLcb97 PlcfandTxt, PlcfandRef, GrpXstAtnOwners) to extract structured comments with author/initials and anchor positions while keeping raw annotation subdocument text separate from body text.
  • Chunk & Text Integration:
    • Merge extracted comments into the chunk containing their anchored text during workspace ingestion (process_di_document, process_office_template), include them in extract_word_text() / direct chat uploads, and pass them to content screening.

Acceptance Criteria

  • .docx, .docm, and .dotx comments (including author, date, anchored text, threaded replies, and resolved status) are extracted and indexed.
  • Legacy .doc OLE comments are extracted with author/initials and anchor context without duplicating raw annotation text in the body.
  • Extracted comments in .docx documents are merged into their corresponding reading-order chunk (with overflow fallback).
  • Functional tests cover both OOXML .docx and legacy .doc comment extraction and chunk placement, and release notes are updated.

Notes

  • Uses local bounded XML (defusedxml) and OLE (olefile) parsing with zero additional Azure API calls.
Lingua principale
Python
Stelle
157
Fork
117
Merge medio
3h 6m
PR unite (30g)
219

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di microsoft/simplechat

Tutte le issue di microsoft/simplechat

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.