Regardless of the language, here is the general process :
After collecting the dataset, it has to be prepared. Then, several machine learning algorithms (if you have a supervised learning task--i.e, classification) must be compared using, cross-validation, for instance. Finally, select the best algorithm according to its performance result using metrics like accuracy, ROC, etc.
If your dataset has a textual type, then you need to convert it into a numeric type before preparing and classifying it.
Read below.Chapter Arabic Text Generation Using Recurrent Neural Networks: Thir...
Authors have applied Recurrent Neural Networks (RNNs) Language Model on Arabic Language by training and testing it on “Arab World Books” and “Hindawi” free Arabic text datasets. They mention that while the standard architecture of RNNs does not match ideally with Arabic, we adapted an RNN model to deal with Arabic features.