Documentation
¶
Index ¶
Constants ¶
View Source
const WordsPerPage = 500
WordsPerPage is the target word count per pseudo-page when a DOCX has no explicit page breaks. Paragraphs are accumulated until this threshold is reached, then a new pseudo-page starts. This keeps each pseudo-page's keyword corpus comparable to a PDF page.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PageText ¶
PageText holds the raw extracted text for a single DOCX pseudo-page.
func ExtractPages ¶
ExtractPages opens the DOCX (ZIP) archive at docxPath, parses word/document.xml, extracts paragraph text, and groups paragraphs into pseudo-pages. Explicit page breaks (<w:br w:type="page"/>) always start a new pseudo-page; otherwise paragraphs are chunked by word count (WordsPerPage).
Click to show internal directories.
Click to hide internal directories.