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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
