-
|
Hi @dosu! i am now wondering how to adjust my code so that i can get compact markdown tables (without excessive spaces in rows)? This is the PR i am talking about, fix(markdown): add an option to compact table serialization Here is some of my code: |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
The parameter is actually 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 To reply, just mention @dosu. How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other |
Beta Was this translation helpful? Give feedback.
The parameter is actually
compact_tables(plural), notcompact_table. You need to pass it viaMarkdownParamsto theChunkingDocSerializer. Here's how to update your code:The key change is adding
params=M…