The "code" I am using is :
Code: Select all
\begin{algorithm}\caption{Αλγόριθμος πρόβλεψης της γλώσσας επόμενης λέξης}\label{euclid}\begin{algorithmic}[1]\Procedure{PredictLanguageOfNextWord}{}\State Initialize a queue of size 3\State Initialize a list with 3 weights [0.45, 0.35, 0.20]\State Append word of previous typed word to the queue\If{Word typed exists in both dictionaries}\State Iterate through queue and calculate probabilities for the two languages\State $prob\_of\_lang = prob\_of\_lang + weight_list$\State Compare final probabilities and return the language with the higher one\EndIf\EndProcedure\end{algorithmic}\end{algorithm}