## 3 Methodology
### Conversion Rules  
The first set of rules for the conversion of graphemes into phonemes for the Polish language was developed by [PERSON] and presented in her set of monographs dedicated to automatic grapheme-to-phoneme conversion of texts in Polish [36; 37]. Knowledge-based grapheme-to-phoneme conversion, unlike data-driven approaches, exploits rules derived by humans and/or from linguistic studies [46]. The rules for rule-based grapheme-to-phoneme are typically formulated in the framework of finite state automata [47]. The primary advantage of such rule-based approaches is that they can provide complete coverage. To achieve this objective it is crucial to use the algebra of sets and, for this purpose, it is necessary to define the basic sets of graphemes employed. Examples of these basic sets for the Polish language are presented below [37]. One of the basic sets is \(Z\), \(E\), and \(S\). \(Z\) is a set of alphabetic characters for Polish, \(E\) is a set of three graphemes that are non-alphabetic for Polish, and \(S\) is a set of special characters [37]: \begin{table}
\begin{tabular}{c c c c c} \hline \hline \multirow{2}{*}{**No.**} & \multicolumn{3}{c}{**Phonetic Alphabet**} & **Example of** \\  & \multicolumn{3}{c}{**Symbols**} & **Occurrence** \\ \cline{2-5}  & [SPAI] & [IPA] & [SAMPA] & **in Polish** \\ \hline
26 & [s] & [c] & [s’] & **s**ano \\
27 & [c] & [c] & [t=”] & **ci**asto \\
28 & [s] & [j] & [x] & **hi**je**ina \\
29 & [k] & [f] & [tS] & **cz**amy \\
30 & [2] & [s] & [Z] & **k**z**d**y \\
31 & [s] & [n] & [e ] & **re**la** \\
32 & [k] & [c] & [b’] & **k**ino \\
33 & [s] & [\(\lambda\)] & [t=”] & **dz**del**ic \\
34 & [s] & [\(\lambda\)] & [t=”] & **n**adzy** \\
35 & [z] & [n] & [x’] & **zi**amo \\
36 & [s] & [\(\lambda\)] & [g’] & **m**agicz**my \\
37 & [s] & [\(\lambda\)] & [\(\alpha\)] & **d**ro**_d**z**e** \\ \hline \hline \end{tabular}
\end{table} 
Table 1: _Cont._  
where:  
\[\alpha=\alpha_{1}...\alpha_{k}...\alpha_{a}\ \ \wedge\ \ \alpha_{k}\in X\ \ \forall\ \ (1\leq k\leq a) \tag{15}\]  
\[\beta=\beta_{1}...\beta_{k}...\beta_{b}\ \ \wedge\ \ \beta_{k}\in Y\ \ \forall\ \ (1\leq k\leq b) \tag{16}\]  
and where \(\alpha\) is a sequence of \(a\) alphabetic characters, \(\beta\) is a sequence of \(b\) phonemic characters, \(b\) is determined by \(a\), but \(a\) need not be equal to \(b\) at all. The set \(Y\) is the entire set of phonemic characters for Polish described by the SPA alphabet:  
\[Y = \{i,\,y,\,e,\,a,\,o,\,u,\,i,\,u,\,r,\,l,\,m,\,n,\,i,\,u,\,f,\,v, \,s,\,z,\,\bar{s},\,\bar{z},\,\bar{s},\,\bar{z},\,\chi,\,p,\,b,\,t, \tag{17}\] \[\mathrm{d},\,k,\,g,\,\bar{k},\,\bar{g},\,c,\,\bar{s},\,\bar{c}, \,\bar{\bar{s}},\,\bar{c},\,\bar{\bar{s}}\}\]  
The grapheme-to-phoneme conversion of correctly written orthographic texts in Polish is the transformation of sequences written in the \(X\) alphabet, to a correct form in the phonemic alphabet \(Y\). The grapheme-to-phoneme conversion \(F\) function can be described by a set of formal grapheme-to-phoneme conversion rules defining how each sequence \(\alpha\) representing a word in the \(X\) alphabet, can be transformed into a correct sequence \(\beta\) in the phonemic alphabet defined by the set \(Y\). The conversion rules are usually numerous with varying degrees of complexity. The size and complexity of a set of grapheme-to-phoneme conversion rules depends on the number of letters in the orthographic alphabet and the degree to which each letter can be pronounced differently in various contexts. The first set of grapheme-to-phoneme conversion rules for Polish was developed by [PERSON] and presented in her set of monographs dedicated to automatic grapheme-to-phoneme conversion of texts in Polish [36; 37]. The knowledge contained in these publications was the basis for developing the grapheme-to-phoneme conversion algorithm for Polish implemented by the author in the Python programming language [48].