You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tika.apache.org by "Vivek-Suryawanshi (via GitHub)" <gi...@apache.org> on 2026/10/21 01:17:06 UTC
[PR] [TIKA-4694] Extract line and paragraph counts from legacy DOC files [tika]
Vivek-Suryawanshi opened a new pull request, #3376:
URL: https://github.com/apache/tika/pull/3376
## Issue
https://issues.apache.org/jira/browse/TIKA-4694
## Summary
This PR fixes missing line-count and paragraph-count metadata when
parsing legacy Microsoft Word (.doc) documents.
The existing SummaryExtractor handles several Office metadata
properties but does not extract these two stored counts.
## Changes
- Added extraction of line and paragraph counts using
DocumentSummaryInformation.getLineCount() and getParCount().
- Reused the existing Office.LINE_COUNT and Office.PARAGRAPH_COUNT
metadata properties.
- Added a regression test in WordParserTest using
testWORD_2006ml.doc.
- Added an entry to CHANGES.txt.
The implementation uses the existing metadata-handling logic.
Missing or non-positive counts are omitted.
## Testing
Tested locally on Windows 11 with JDK 21 and Maven 3.10.0.
Command:
./mvnw.cmd test -pl tika-parsers/tika-parsers-standard/tika-parsers-standard-modules/tika-parser-microsoft-module -am -Dtest=WordParserTest -Dsurefire.failIfNoSpecifiedTests=false
Results:
- BUILD SUCCESS.
- WordParserTest: 39 tests reported.
- 0 failures.
- 0 errors.
- 2 skipped.
- New testLineAndParagraphCount regression test passed.
The test document contains stored values of 12 lines and
3 paragraphs.
A group reviewer also independently verified that the new
regression test fails when the production fix is removed.
The full Microsoft parser test suite has not been run.
## AI Assistance
ChatGPT (OpenAI) was used to assist with code investigation,
implementation, test development, and documentation.
The commit includes the Generated-by trailer.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@tika.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [TIKA-4694] Extract line and paragraph counts from legacy DOC files [tika]
Posted by "tballison (via GitHub)" <gi...@apache.org>.
tballison merged PR #3376:
URL: https://github.com/apache/tika/pull/3376
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@tika.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [TIKA-4694] Extract line and paragraph counts from legacy DOC files [tika]
Posted by "tballison (via GitHub)" <gi...@apache.org>.
tballison commented on PR #3376:
URL: https://github.com/apache/tika/pull/3376#issuecomment-6315928975
Thank you @Vivek-Suryawanshi !
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@tika.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org