## 4 Experimental Settings and Results
### Results of LSTM  
Deep learning algorithms, including LSTMs and BLTMS have various parameters such as the number of hidden layers, the number of cells in each hidden layer, etc. To find the  
Figure 5: An example of font Nazanin-size 14. Figure 6: An example of font Calibri-size 18.  
best configuration of the used BLSTM in the recognition module of Bina, several settings of LSTM and BLSTM were tested and reported in this section. CNN setting is explained in Section 3.2, which is fixed in all the experiments. The character \"r\" means backward layers, the character \"f\" shows forward layers, and the character \"b\" illustrates bidirectional layers, all of the reported results are generated by testing Bina on the Persian and English test set that involves \(11\) fonts with three different sizes. Eight experiments were done to find the best structure of the recurrent neural network used in the recognition section of Bina. All the experiments are summarized in Table 3 in terms of the network structure and their performances. The eight experiments show the best performance among all the experiments. Table 4 demonstrates more details about this experiment by showing the performance of the tested network on various fonts and sizes of our dataset. Besides, Table 5 illustrates the character recognition accuracy on the best model. Additionally, the best model was also applied to the Persian-only test set. The reason is that the reference model (Tesseract) we used does not recognize English words in the Persian context and inserts Persian numbers instead of them. The model we proposed, however, recognizes both Persian and English words. Due to this reason, the best model is applied to the Persian-only test set, and reasonable comparison can be made between the proposed results and the reference results. The result of this experiment is illustrated in Table 6. \begin{table}
\begin{tabular}{l c c c c} \hline \hline
**Font** & **12** & **14** & **18** & **Average of Fonts** \\ \hline Arial & 92.25 & 94.65 & 63.18 & 83.36 \\ Calibri & 88.41 & 92.34 & 61.29 & 80.68 \\ Homa & 94.13 & 93.60 & 78.69 & 88.81 \\ Lotus & 95.43 & 95.50 & 90.79 & 93.91 \\ Mitra & 95.05 & 94.98 & 51.88 & 80.64 \\ Nazanin & 95.02 & 95.85 & 91.76 & 94.21 \\ Tahoma & 91.89 & 94.40 & 63.15 & 83.15 \\ Times New Roman & 87.95 & 93.41 & 62.83 & 81.40 \\ Traffic & 95.98 & 94.36 & 92.33 & 94.22 \\ Yagut & 95.32 & 94.89 & 93.44 & 94.55 \\ Zar & 93.47 & 93.78 & 90.03 & 92.43 \\ \hline Average of Accuracy & 93.17 & 94.34 & 76.30 & 87.94 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Deep BLSTM accuracy on Persian and English test set with four layers and 64, 128, 256 and 512 BLSTM blocks. \begin{table}
\begin{tabular}{l c c c c c c c} \hline \hline
**Font** & \multicolumn{2}{c}{**1 Layer**} & \multicolumn{2}{c}{**2 Layer**} & \multicolumn{2}{c}{**4 Layer**} & \multicolumn{2}{c}{**Best Model**} \\ \cline{2-7}  & **512f** & **512b** & **64f,** & **64b,** & **64f, 96f,** & **64b, 96b,** & **64b, 128b,** \\  & & **512r,** & **512b,** & **96r, 192r,** & **96r, 512f,** & **96b, 192b,** & **256b, 512b,** & \\ \hline Arial & 46.56 & 50.78 & 72.63 & 84.13 & 81.39 & 83.38 & 84.27 & 83.36 \\ Calibri & 43.15 & 47.38 & 71.38 & 82.65 & 79.38 & 81.21 & 82.91 & 80.68 \\ Homa & 39.72 & 44.43 & 66.01 & 76.25 & 44.47 & 44.45 & 75.02 & 88.81 \\ Lotus & 39.25 & 44.27 & 72.94 & 90.51 & 77.70 & 89.19 & 92.44 & 93.91 \\ Mitra & 37.44 & 41.64 & 66.52 & 75.83 & 58.78 & 74.50 & 79.71 & 80.64 \\ Nazanin & 42.99 & 45.74 & 72.51 & 91.34 & 75.88 & 89.04 & 93.42 & 94.21 \\ Tahoma & 43.07 & 47.09 & 72.94 & 84.04 & 80.71 & 82.23 & 82.90 & 83.15 \\ Times New Roman & 41.21 & 44.03 & 72.10 & 82.82 & 80.61 & 82.91 & 84.31 & 81.40 \\ Traffic & 38.18 & 43.24 & 73.02 & 92.22 & 72.46 & 87.62 & 93.68 & 94.22 \\ Yagut & 37.96 & 41.41 & 72.14 & 93.69 & 82.43 & 89.49 & 94.33 & 94.55 \\ Zar & 37.49 & 42.03 & 70.02 & 88.00 & 75.30 & 86.35 & 91.20 & 92.43 \\ \hline Average Accuracy & 40.46 & 44.75 & 71.10 & 85.59 & 73.55 & 80.94 & 86.74 & 87.94 \\ \hline \hline \end{tabular}
\end{table}