Allow flipping numbers
Our current arabic model predicts the numbers in the wrong order. This is known and a fix was integrated in our document-processing library.
We need to do what was done in ocelus and patch the Decoder class.
Add:
- a
flip_text: bool=False
attribute onPyLaiaWrapper
and use it when calling my_decode - the same parameter to my_decode
- a
flip_text
user configuration parameter on every inference worker set toFalse
by default except for Pylaia Synist where this will be set toTrue
by default.
You will need to add the document-processing library as a submodule
Failing example https://demo.arkindex.org/element/3f7839fd-409b-4f5f-ab37-5012d5b4dc69?highlight=567baa74-d447-486a-824b-00311e9537a2
Edited by Yoann Schneider