Skip to content
Discussion options

You must be logged in to vote

The parameter is actually compact_tables (plural), not compact_table. You need to pass it via MarkdownParams to the ChunkingDocSerializer. Here's how to update your code:

from docling_core.transforms.chunker.hierarchical_chunker import ChunkingDocSerializer
from docling_core.transforms.serializer.markdown import MarkdownTableSerializer, MarkdownParams

class MDTableSerializerProvider(ChunkingSerializerProvider):
    def get_serializer(self, doc):
        return ChunkingDocSerializer(
            doc=doc,
            table_serializer=MarkdownTableSerializer(),
            params=MarkdownParams(compact_tables=True),  # Enable compact table format
        )

The key change is adding params=M…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by ofcat
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant