Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add DocTags serializers #192

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Conversation

vagenas
Copy link
Collaborator

@vagenas vagenas commented Mar 14, 2025

  • Introduced inline DocTag
  • Using new serialization framework code seems to automatically fix some bugs around list handling

Still todo:

  • Propagate & use all parameters
  • Fix page headers & footnotes not showing up in new export
  • Handle page breaks
  • Move all relevant code out of DoclingDocument
  • Adapt any moved code to framework & its conventions
  • Iron out any misalignment with previous exporters

Signed-off-by: Panos Vagenas <[email protected]>
Copy link

mergify bot commented Mar 14, 2025

Merge Protections

Your pull request matches the following merge protections and will not be merged until they are valid.

🔴 Require two reviewer for test updates

This rule is failing.

When test data is updated, we require two reviewers

  • #approved-reviews-by >= 2

🟢 Enforce conventional commit

Wonderful, this rule succeeded.

Make sure that we follow https://www.conventionalcommits.org/en/v1.0.0/

  • title ~= ^(fix|feat|docs|style|refactor|perf|test|build|ci|chore|revert)(?:\(.+\))?(!)?:

xsize: int = 500
ysize: int = 500
add_location: bool = True
add_content: bool = True # TODO remove as always true?
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, not always True

parts = self.get_parts()
content = "\n".join([p.text for p in parts if p.text])
wrap_tag = DocumentToken.DOCUMENT.value
text_res = f"<{wrap_tag}>{content}\n</{wrap_tag}>"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here, the newline might become optional

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants