8. Right-to-Left Model Training
Train custom Text Recognition Models for languages with Right-to-Left scripts.
Transkribus is committed to extending support for a wide variety of scripts and writing systems. This article explains the current workflow for training models to handle RTL (Right-to-Left) scripts, and guides you through each step to ensure that your model is optimised for right-to-left languages.
Step 1: Prepare Training Data
Create a substantial amount of RTL printed or handwritten samples as Ground Truth (GT) data. Depending on the type of material and the number of hands, we recommend at least 5,000 and 15,000 words (around 25-75 pages) of transcribed material.
-
Run Layout Recognition: First, run layout recognition on the document to detect text regions and baselines. Alternatively, you can mark these manually if preferred or needed. Note that if you are drawing the baselines manually, you still need to draw those from Left to right even if your script is RTL, or else your baselines will end up upside-down.
- Create your Ground Truth in Transkribus
- Generally the Transkribus Editor automatically recognizes RTL scripts when you start creating or adding your Ground Truth to your pages.
- You can also try to pre-recognize your pages with a fitting public model, which might make your Gorund Truth creation faster, for more information on this see this article: Data Preperation for Model Training.
The Ground Truth should include examples of all the scripts that you want your model to be able to transcribe. It is possible to train models capable of recognising two or more hands at the same time: however, all the different variants must be present in a representative manner in the Ground Truth.
Note: It is not possible to train a model at the same time on both a RTL and LTR (Left-to-Right) reading order.
Step 2: Model Setup & Training
- You can start the training either by using Datasets or directly from the collection or document(s) you've been working on.
- To do the latter, simply mark the transcribed pages, then click on the "Selected" button in the bar above the images. There click on "Train Model" and select "Text Recognition Model".
- Model Setup: fill in the following fields:
- Model Name (chosen by you);
- Description of your model and the documents on which it is trained (material, period, number of hands, how you have managed abbreviations…);
- Image URL (optional);
- Language(s) of your documents;
- Time span of your documents.
This metadata will help you filter the search bar later and find a model more easily.
- Training Parameters: Enable the "Reverse Text (RTL)" option in Advanced Settings
Note: You also need to enable this when trying to train a LTR script model on RTL material.
Review all the settings and data you have inputted. Once everything looks good, start the training process.
More information on how to train a model can also be found here: Training Text Recognition Models.
After the training is finished, you are now ready to use your model to recognise new documents, as explained on this page.
If you are not satisfied with the performance of the model and the CER (Character Error Rate) is over 10%, don't give up! You can improve it by using the first model to generate additional ground truth data, and then start a new training cycle with this expanded data set. It's normal to train several models before you get the result you want.
Read the Managing Models page to learn how to manage and share models.
For further information on how to train a model on RTL material you can also have a look at some examples highlighted in our Blog posts: Transkribus Blog posts.
Note: While RTL scripts are recognized by the editor, it is currently not possible to train a model on vertical scripts within Transkribus.
Next step: Retraining a model.