diff --git a/docs/v2.md b/docs/v2.md index df1c8233..395555d9 100644 --- a/docs/v2.md +++ b/docs/v2.md @@ -37,7 +37,7 @@ docling ./input/dir --output ./scratch --abort-on-error ### Setting up a `DocumentConverter` -To accomodate many input formats, we changed the way you need to set up your `DocumentConverter` object. +To accommodate many input formats, we changed the way you need to set up your `DocumentConverter` object. You can now define a list of allowed formats on the `DocumentConverter` initialization, and specify custom options per-format if desired. By default, all supported formats are allowed. If you don't provide `format_options`, defaults will be used for all `allowed_formats`. @@ -151,7 +151,7 @@ conv_result: ConversionResult = doc_converter.convert("https://arxiv.org/pdf/240 ## Inspect the converted document: conv_result.document.print_element_tree() -## Iterate the elements in reading order, including hierachy level: +## Iterate the elements in reading order, including hierarchy level: for item, level in conv_result.document.iterate_items(): if isinstance(item, TextItem): print(item.text)