hafez-fal.ir

hafez-fal.ir

The story of Hafez-fal site started on the day when I got tired of Hafez fortune-telling sites that were full of advertisements. I shared my discomfort with Kiavash and expressed my wish for a site that did not have so many ads that disturbed the eyes of Hafez readers. This is how we decided to build a Hafez Fal site that does not have any ads and is very simple and clean.

Everyone did their part of the work: I collected the texts from the web with the help of Python, and Kiavash, who had previously written Mira, converted the data I sent to him into YAML files with the help of Perl, and then converted it into the Mira format. He also created a random function in Javascript for getting a Fal. That’s it, http://hafez-fal.ir, is a simple, clean, and minimal site for reading Hafez’s poets.

At the beginning, Hafez-fal.ir did not have many visitors. So, I decided to create a Twitter bot for it that randomly tweets one of Hafez’s poems every day at 7:27 AM. Additionally, to attract more audience, I added the ability to like tweets containing the word “حافظ” to the Twitter bot.

Since the word “حافظ” has many meanings apart from the poet, I initially implemented a filter to only like tweets related to the poetry using ULMFit’s deep neural network. This network achieved 95.5% accuracy. However, later on, I realized that a deep and heavy neural network was not needed for this task. I conducted some experiments with scikit-learn models on Bag of Words tokens on the same dataset without any preprocessing and achieved 96.7% accuracy!

Currently, the Hafez-fal.ir receives an average number of 5.5k monthly visitors.