## 3 Methodology
### Conversion Algorithm  
The grapheme-to-phoneme conversion rules are the foundation of the grapheme-to-phoneme conversion algorithm implemented here [48]. The conversion algorithm defines how the function \(F(\alpha)=\beta\) works and determines the method for obtaining sequences of phonemic \(\beta_{k}\) letters on the basis of orthographic sequences \(\alpha_{k}\) and their contexts. The block diagram of the grapheme-to-phoneme conversion algorithm for a single orthographic letter is presented in Figure 1. \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Table Number** & **Orthographic Letter** & **No. of Rows** & **No. of Columns** & **No. of Cells** & **No. of Rules** \\ \hline  
& 2 & 2 & 1 & 1 \\ \hline \hline \end{tabular}
\end{table} 
Table 9: The list of implemented grapheme-to-phoneme conversion rules for Polish. The grapheme-to-phoneme conversion algorithm, using the general form of grapheme-to-phoneme conversion rules shown in Table 2, is shown here in terms of 12 steps:  
1. Read an input orthographically represented word \(\alpha\), where \(\alpha=\alpha_{1}\alpha_{2}\ldots\alpha_{k}\ldots\alpha_{n}\) and \(\alpha_{1},\ldots,\alpha_{n}\in X\);
2. At the beginning of the orthographically represented word \(\alpha\), let \(k=1\);
3. Read a single letter \(\alpha_{k}\) of the input word \(\alpha\);
4. Check the context of the letter \(\alpha_{k}\) in the word \(\alpha\): * Read a string of letters \(\gamma=\alpha_{1}\ldots\alpha_{k-1}\) preceding the orthographic \(\alpha_{k}\) letter; * Read a string of letters \(\delta=\alpha_{k+1}\alpha_{k+2}\ldots\alpha_{n}\) following the orthographic \(\alpha_{k}\) letter;
5. Select the appropriate grapheme-to-phoneme conversion rule table for the orthographic letter \(\alpha_{k}\);
6. Select the appropriate \(j\)-th table's column for the orthographic letter \(\alpha_{k}\), where \(\delta\in\Delta_{j}\);
7. Select the appropriate \(i\)-th table's row for the orthographic letter \(\alpha_{k}\), where \(\gamma\in\Gamma_{i}\);
8. Select the appropriate grapheme-to-phoneme conversion rule for the orthographic letter \(\alpha_{k}\), as defined by the cell in the \(j\)-th column and \(i\)-th row of the table;
9. Use the appropriate grapheme-to-phoneme conversion rule for the orthographic letter \(\alpha_{k}\), as defined by the cell in the \(j\)-th column and \(i\)-th row of the table: * In the cell with the table coordinates \([i,j]\), phonemic letter \(\beta_{i,j}\) letter is saved, corresponding to the orthographic letter \(\alpha_{k}\) with the following context \(\delta\) and preceding context \(\gamma\); * The grapheme-to-phoneme conversion rule for orthographic letter \(\alpha_{k}\) will be implemented by assignment \(\alpha_{k}\rightarrow\beta_{k}=\beta_{i,j}\) ;
10. Increment \(k=k+1\) and read the next orthographic letter \(\alpha_{k}\) of the input word \(\alpha\);
11. Go to step number 3, unless \(k>n\), where \(n\) is the length of input word \(\alpha\);
12. Output the result of the grapheme-to-phoneme conversion of orthographic word \(\alpha=\alpha_{1}\ldots\alpha_{n}\) where \(\alpha_{1},\ldots,\alpha_{n}\in X\), is a new phonemic representation of the word \(\beta=\beta_{1}\ldots\beta_{n}\), where \(\beta_{1},\ldots,\beta_{n}\in Y\). These 12 steps summarize the automatic grapheme-to-phoneme conversion algorithm. This algorithm can also be presented as \"pseudocode\", as shown in the list called Algorithm 1. Figure 1: The block diagram of a grapheme-to-phoneme conversion algorithm for a single orthographic letter.