Unstructured-IO / Unstructured-IO/unstructured
bug/right to left languages
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 15.5k
- Forks
- 1.3k
- Avg merge
- 4d 2h
- Merged PRs (30d)
- 13
Description
Describe the bug
for right to left languages the output of reading a document is printed left to right,
for example instead of printing "Hello world", in arabic for example, the output print : "Dlor wolleh"
To Reproduce
from unstructured.partition.pdf import partition_pdf
elements=partition_pdf(
filename=file_path,
languages= languages,
strategy="hi_res",
)
elements_dict = [el.to_dict() for el in elements]
Expected behavior
the output text is printed right to left sentences
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the unstructured.partition.pdf partition_pdf entry point and reproduce the issue with the supplied languages and hi_res example. Trace how the extracted elements are converted with to_dict(), then verify that right-to-left language output preserves sentence direction rather than reversing the text.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100