The problem is that because I did not normalize the texts, it just returns a few sentences while there is more. In Persian there is a module called hazm for normalizing the texts. How can I use that in this code?
For example of normalizing: "ك" should change to "ک" or "ؤ" should change to "و". Because the first two ones are actually Arabic alphabets which were used in Persian. Without normalizing the code just returns the words that are written with the second form and it does not recognize the words which are in the first forms Arabic).