Poetry can be defined as a form of literary expression that uses language and artistic techniques to evoke emotions, create imagery, and convey complex ideas in a concentrated and imaginative manner. It is a form of written or spoken art that often incorporates rhythm, meter, rhyme, and figurative language to engage the reader or listener on multiple levels. There is no automated system that can identify figures of speech (FsoS) in poetry using Natural Language Processing (NLP) methods. In this research paper, the authors categorized four types of FsoS (Type of alliteration), (Type of alliteration), (Rhyme), and (Repetition) using two custom algorithms, Koshur and Awadhi (KA and AA), developed specifically for three different language corpora of poems (Koshur (K), Awadhi (A), and Hindi (H)). To evaluate the effectiveness of these algorithms, the authors conducted tests on three languages using four distinct approaches: with stopwords without optimization, with stopwords with optimization, without stopwords without optimization, and without stopwords with optimization. Authors have put lots of effort into identifying FsoS in not only one single language but in three Devanagari scripted languages. This research work is the first of its kind. The average accuracy without stopwords was not up to the mark. The authors then optimized both algorithms and again tested them on the same corpora with or without stopwords, resulting in a significant increase in accuracy.