توصيفگر ها :
پردازش زبان طبيعي , توليد متن , ترانسفورمر , GPT-2
چكيده فارسي :
ارتباط كلامي و زبان انساني ماهيتي بسيار پيچيده و قدرتمند در برقراري ارتباط و انتقال مفاهيم است. شعريكي از اشكال هنري زبان است كه با استفاده از تركيب و تنظيم واژگان و ساختارهاي زباني، ميتواند احساسات، افكار و تصاوير را بهصورت زيبا و هنرمندانه بيان كند. اين هنر كلامي در زبان فارسي جايگاه ويژهاي دارد. شاعران بزرگ، كه از مفاخر كشورهاي فارسيزبان هستند، شعر را در قالبهايي مانند قصيده و غزل به اوج رسانده و تكامل دادهاند. از سوي ديگر، شاخهاي از علم هوش مصنوعي تحت عنوان هوش مصنوعي مولد، در كنار پردازش زبان طبيعي، توانسته است مدلهايي براي توليد متنهاي انسانگونه و خلاق توسعه دهد كه گاه براي توليد اشعار مورداستفاده قرار ميگيرد. در اين پژوهش، تلاش كرديم با استفاده از مكانيسم توجه در معماري ترانسفورمر و با الهام از مدل GPT-2، يك مدل زباني براي توليد شعر فارسي توسعه دهيم. اين مدل قادر به مديريت قالبهاي شعري غزل و مثنوي بوده و ميتواند قلم و سبك شعري چند تن از شاعران كلاسيك معاصر را تقليد كند. براي اين پژوهش، دادههاي آموزشي نسبتاً حجيم خود را در دودسته: دادههاي متني خام و اشعار فارسي جمعآوري، تميز و پردازش كرديم. همچنين، يك توكنساز اختصاصي سطح زير كلمه تعريف كردهايم كه با دادههاي آموزشي بهينهشده است. نسخهاي از GPT-2 را بر اساس نيازهاي خود بهينه كرديم. مدل زباني توليد شعر فارسي ما با حدود 93 ميليون پارامتر، طي بيش از 190 ساعت و در سه مرحله آموزش ديد و به كمك استراتژي توكنگذاري اختصاصي، كه بهمنظور درك قالب شعري و سبك شاعر بر رويدادههاي شعر كلاسيك پياده شده بود، به توانمندي خلق شعر فارسي با مديريت قالب شعري و سبك شاعر دستيافت. نتايج بهدستآمده در اين پژوهش، با استفاده از روشهاي آماري مانند معيارهاي BERTScore و BLEU و همچنين ارزيابيهاي انساني، مورد تحليل قرار گرفت كه حكايت از موفقيت مدل در دستيابي به اهداف تعريفشده براي پژوهش دارد.
چكيده انگليسي :
Verbal communication and human language possess a very complex and powerful nature in establishing connections and conveying meanings. Poetry is one of the artistic forms of language that, through the combination and arrangement of words and linguistic structures, can beautifully and artistically express emotions, thoughts, and images. This verbal art holds a special place in the Persian language. Great poets, who are the pride of Persian-speaking countries, have elevated and evolved poetry in forms such as Ghazal and Gasidah. On the other hand, a branch of artificial intelligence known as generative AI, alongside natural language processing, has managed to develop models for producing human-like and creative texts that are sometimes used to generate poetry. In this research, we aimed to develop a Persian poetry generation model using attention mechanisms in the Transformer architecture and inspired by the GPT-2 model. This model is capable of managing poetic forms like Ghazal and Masnavi and can imitate the style and pen of several classical poets. For this study, we collected, cleaned, and processed a relatively large training dataset divided into two categories: raw text data and Persian poetry. Additionally, we defined a custom subword tokenizer optimized for the training data. We customized a version of GPT-2 based on our needs. Our Persian poetry generation language model, with approximately 93 million parameters, underwent over 190 hours of training in three phases. Using a custom tokenization strategy designed to understand poetic forms and the poet's style, it achieved the capability of creating Persian poetry while managing poetic forms and styles. The results obtained in this research were analyzed using statistical methods such as BERTScore and BLEU metrics, as well as human evaluations, which indicate the model's success in achieving the defined goals of the research