# Development of Intellectual Web System for Morph Analyzing of Uzbek Words
## 4 Algorithm Implementation and Testing  
### System Description  
Taking into account the grammar rules of forming words above, we have decided to use the popular stemming algorithm (Stemmer Porter). However, the raw version of this algorithm will not work for the Uzbek language as well as for the Kazakh language [8], so we came up with the idea of using [PERSON]'s way of stemming [17] as a foundation for our own (software) system of stemming and generation of words.  
Now, our system works like this:  
Step 1. To start the ball rolling, a word is sent to the server.  
Step 2. Firstly, the word is checked in the exception word sets, if the result is positive, the system returns the prepared answer (morphologically analyzed word) to the user. If the search's result is negative, then the system starts the stemming of the word.  
Step 3. When stemming starts, the algorithm first searches for endings from right to left and, then, at the end, checks the prefixed endings (that is, from left to right).  
Step 4. In this stage, the system forms dictionaries of truncated endings from each part of speech and, then, sends them to the decisive class.  
Step 5. The decisive class compares the composition of the dictionaries of truncated endings. Depending on which dictionary with endings will be larger (quantity of truncated endings), the sent word will belong to that part of speech.  
\begin{table}
\begin{tabular}{c c c c} \hline \hline
**Input** & \multicolumn{3}{c}{**Output**} \\ \hline
**Dadamlar** & **Dada** & **M** & **lar** \\ \hline Word & root—noun & possessive affix & affix of plural form \\ \hline \hline \end{tabular}
\end{table}
Table 11: Noun from exception word set according to grammatical morphotactics.  
\begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Input** & \multicolumn{3}{c}{**Output**} \\ \hline
**Muzlatgich** & **muz-** & **-la** & **-t** & **-gich** \\ \hline Word & root—noun & root—verb & voice &
\begin{tabular}{c} ending, which forms \\ noun from verb \\ \end{tabular} \\ \hline \hline \end{tabular}
\end{table}
Table 12: Noun from exception word set according to derivative possibility.  
For example, we analyze the word _uylarimizga_ ((Dative: where?) to our home).  
Step 1. The word _uylarimizga_ is sent to the server.  
Step 2. Since there are no such words in the exception dictionaries, the system will pass it on to the next stage.  
Step 3. Stemming of the word begins; the system uses specific libraries of endings, in order to perform truncation of the word. So, it finds those endings from:  
* [noitemsep,topsep=0 pt]
* Noun endings library: up (N (home)- root) + lar (plural) + imiz (possessive) + ga (Dative-directional case).
* Adjective endings library: nothing will be found.
* root) + lar (plural) + i (unknown) + miz (personal affix of plural form) + ga (unknown).
* Adverb endings library: nothing will be found.  
Step 4. At this stage, the system forms a large dictionary, which contains other smaller dictionaries obtained from the previous stage (noun, adjective, verb, and adverb).  
Step 5. The system starts iterating over the large dictionary obtained from stage 4. Four dictionaries with truncated endings and a word root in each one is searched. According to the calculation, the verbs' dictionary has more key-value pairs of endings, but the program only counts known endings. So, the system will choose the dictionary, which contains the biggest number of known morphemes. As a result, the number of truncated endings in the noun dictionary significantly exceeds the number of other dictionaries' endings. Thus, the dictionary of nouns is taken as the most appropriate, and the system accepts the original word _uylarimizga_ as a noun with its endings.