Repository navigation
Upgrade office_oxide to v0.1.16 and drop temporary caption/table fixes - #12
Closed
xugangqiang wants to merge 24 commits into
Closed
xugangqiang wants to merge 24 commits into
xugangqiang wants to merge 24 commits into
Conversation
## What Compile the claims a retrieved chunk carries into an evidence page, and rule on that page statement by statement before it reaches the answer model. 1. **Claim page** (`compiled_evidence.go`) — page the claims compiled from each anchored chunk, union a claim-text search leg on top, and serve a chunk with no claims as its own text. Statements carry ref handles, so a deep read is only needed for a fact the page does not state. 2. **Statement-level filter** (`decision_filter.go`) — judge the page line by line, with a per-chunk floor and a page-relative threshold so a correctly recalled statement below the absolute cutoff survives. The page is bounded to a judge cap (default 16) first: a several-hundred-statement page would otherwise be dozens of judge round trips for one retrieval round. The older claim recall inside the navigate tool is removed; the page and its retrieval legs own it now. --------- Co-authored-by: Yingfeng Zhang <[email protected]> Co-authored-by: Hermes Agent <hermes-agent@localhost>
…ison page to the chat page. (infiniflow#21564)
Signed-off-by: Jin Hai <[email protected]>
Signed-off-by: Jin Hai <[email protected]>
office_oxide v0.1.16 (yfedoseev/office_oxide) now exposes the Word paragraph style name via the IR "style" field (yfedoseev/office_oxide#455) and no longer splits .doc tables whose first row is a header (yfedoseev/office_oxide#456). Both temporary Go-side workarounds are therefore obsolete: - Remove docx_caption_scan.go / extractDOCXTableCaptions: Caption-styled paragraph detection is now read directly from the IR "style" field instead of re-parsing word/document.xml. - Drop the infiniflow#456 one-row-table merge in buildDOCXJSONSectionsCore: the native converter keeps .doc tables intact, so the structural proxy is no longer needed. - A "Caption"-styled paragraph now attaches to the following top-level table as its caption (overriding the heading-location caption) and is not emitted as a standalone text section. An orphan Caption paragraph with no following table is emitted as normal text. - Bump go.mod office_oxide binding to v0.1.16. Tests: replace the obsolete buildDOCXJSONSectionsWithCaptions tests with style-based cases (case-insensitive, preferred over heading, orphan emitted as text, adjacent tables stay separate) and update the cgo end-to-end test to exercise the real IR "style" field.
Owner
Author
|
Relocating this PR to infiniflow/ragflow (upstream). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Upgrade the
office_oxideGo binding fromv0.1.12tov0.1.16and remove two temporary Go-side workarounds that are now obsolete because upstream fixed both underlying issues.office_oxide v0.1.16 (yfedoseev/office_oxide) now:
"style"field (Expose paragraph style name (w:pStyle) in the IR JSON for non-heading paragraphs yfedoseev/office_oxide#455).doctables whose first row is a header (.doc tables never set TableRow.is_header (unlike .docx) yfedoseev/office_oxide#456)Changes
internal/parser/parser/docx_caption_scan.go(and its test): the temporary Caption-styled-paragraph detection that re-parsedword/document.xmlis gone. The parser now reads the style directly from the IR"style"field.#456one-row-table merge insidebuildDOCXJSONSectionsCore: the native converter keeps.doctables intact, so the structural proxy is no longer needed."Caption"-styled paragraph now attaches to the following top-level table as its caption (overriding the synthesized heading-location caption) and is not emitted as a standalone text section. An orphan Caption paragraph with no following table is emitted as normal text.go.modoffice_oxide binding tov0.1.16and tidiedgo.sum.Test plan
docx_ir_caption_style_test.go: case-insensitive match, preferred over heading-location caption, orphan emitted as text, non-Caption paragraphs ignored, and adjacent tables stay separate (Unnecessary repetition infiniflow/ragflow#456 regression).TestDOCXParser_CaptionStyledParagraphBecomesTableCaption_EndToEndto exercise the real IR"style"field through the v0.1.16 native library (passes against the actualliboffice_oxide.a).bash build.sh --test ./internal/parser/...passes under cgo with the real v0.1.16 native library.