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

Identification of images in docx #273

Closed
jkindahood opened this issue Nov 7, 2024 · 6 comments · Fixed by #330
Closed

Identification of images in docx #273

jkindahood opened this issue Nov 7, 2024 · 6 comments · Fixed by #330
Assignees
Labels
enhancement New feature or request

Comments

@jkindahood
Copy link

Hello everyone,
im working on docx document type with docling.
My first test was very poor.
I have a docx file which is only a testfile and this contains one image.
The standard procedure doesnt even recognise the image in the file...
Standard is this:

from docling.document_converter import DocumentConverter

source = "data/example_small.docx"
converter = DocumentConverter()
result = converter.convert(source)
for item in result.document:
print(item)

The example file is contained here!
Am im wrong with the code or is this a bug?

Greetings
example_small.docx
word_sample.docx

@jkindahood jkindahood added the question Further information is requested label Nov 7, 2024
@PeterStaar-IBM
Copy link
Contributor

@jkindahood Thanks for the feedback! Let us look into it and come back to you.

I dont see any handling of pictures in the msword-backend. If we need to add pictures (which we obviously need to do), we need to update handle_elements method.

@PeterStaar-IBM PeterStaar-IBM added enhancement New feature or request and removed question Further information is requested labels Nov 8, 2024
@jkindahood
Copy link
Author

can you describe me what to do?
maybe i can implement that.

@PeterStaar-IBM
Copy link
Contributor

Yes, absolutely, if you follow the link, you see that we are have no add_picture method yet (as in the html version: https://github.com/DS4SD/docling/blob/main/docling/backend/html_backend.py#L429)

@jkindahood
Copy link
Author

Thank you for your answer @PeterStaar-IBM.
I think this enhancement is stronly connected to this pull request:
#259
because im interested in the description of a picture, embedded into the text on the rigth position.
In a first step would you say we should read the images in wordbackend like in the pdf backend?
And in a second step we add the option to describe the image and add the description to the returned text?
Greetings

@maxmnemonic
Copy link
Contributor

@jkindahood, small update, I'm working on PR to resolve image identification in DOCX: #330

@jkindahood
Copy link
Author

@maxmnemonic all fine, i try to understand how your codebase works and still want to contribute.
Tell me if i can do some thing to help you.

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

Successfully merging a pull request may close this issue.

3 participants