Ancient Greek’s New Technological Muse: Extracting Topoi in the Anacreontea with LLMs

  • Rafael O. Nunes UFRGS
  • João G. Zandoná UFRGS
  • Júlia V. Maia UFRGS
  • Andre Spritzer UFRGS
  • Dennis G. Balreira UFRGS
  • Carla M. D. S. Freitas UFRGS

Resumo


Natural Language Processing, along with Large Language Models (LLMs), holds significant potential in the domain of literature, leveraging its computational capabilities to analyze and comprehend human language. These techniques prove to be particularly useful in a specific part of Greek literature called Anacreaontea, a collection of poems emulating the style of the 6thcentury BCE Greek poet Anacreon. This paper presents an LLM approach to automatically classify Anacreontea poems in their respective topoi. Our methodology explores two well-established autoregressive language models (LLama 2 and Mistral) and investigates the use of contextual prompting in this scenario. We also provide an annotated corpus with 21 fragments of the Anacreontea with topos for Greek and Portuguese text.

Referências

Antunes, C. L. B. (2013). As anacreônticas e a imagem de anacreonte na antiguidade. Letras Clássicas, 17(1):109–149.

Antunes, C. L. B. (2015). Byron, tradutor anacreôntico: Anacreôntica 23 e “to his lyre”. Translatio, (10):90–96.

Antunes, C. L. B. (2016). Entre amores ébrios e fazer artístico: Tópoi e poíesis nas’anacreônticas’— between drunken love and artistic praxis: Tópoi and poíesis in the’anacreontea’. Estudos Linguísticos e Literários, (55):374–385.

da Rocha Bartolomei, B. and Drummond, I. N. (2020). Authorship attribution of brazilian literary texts through machine learning techniques. In Brazilian Conference on Intelligent Systems, pages 389–402. Springer.

Genzel, D., Uszkoreit, J., and Och, F. (2010). “poetic” statistical machine translation: Rhyme and meter. In Li, H. and Màrquez, L., editors, Proceedings of the 2010 Conference on Empirical Methods in Natural Language Processing, pages 158–166, Cambridge, MA. Association for Computational Linguistics.

Ghazvininejad, M., Choi, Y., and Knight, K. (2018). Neural poetry translation. In Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 2 (Short Papers), pages 67–71.

Gupta, S., Gardner, M., and Singh, S. (2023). Coverage-based example selection for in-context learning. In Bouamor, H., Pino, J., and Bali, K., editors, Findings of the Association for Computational Linguistics: EMNLP 2023, pages 13924–13950, Singapore. Association for Computational Linguistics.

Jiang, A. Q., Sablayrolles, A., Mensch, A., Bamford, C., Chaplot, D. S., de las Casas, D., Bressand, F., Lengyel, G., Lample, G., Saulnier, L., Lavaud, L. R., Lachaux, M.-A., Stock, P., Scao, T. L., Lavril, T., Wang, T., Lacroix, T., and Sayed, W. E. (2023). Mistral 7b. arXiv preprint arXiv:2310.06825.

Karavangeli, E. A., Pantazi, D.-A., and Iliakis, M. (2023). Distilgreek-bert: A distilled version of the greek-bert model.

Koutsikakis, J., Chalkidis, I., Malakasiotis, P., and Androutsopoulos, I. (2020). Greekbert: The greeks visiting sesame street. In 11th Hellenic conference on artificial intelligence, pages 110–117.

Pavlopoulos, J., Xenos, A., and Picca, D. (2022). Sentiment analysis of homeric text: The 1st book of iliad. In Proceedings of the Thirteenth Language Resources and Evaluation Conference, pages 7071–7077.

Pedregosa, F., Varoquaux, G., Gramfort, A., Michel, V., Thirion, B., Grisel, O., Blondel, M., Prettenhofer, P., Weiss, R., Dubourg, V., Vanderplas, J., Passos, A., Cournapeau, D., Brucher, M., Perrot, M., and Duchesnay, E. (2011). Scikit-learn: Machine learning in Python. Journal of Machine Learning Research, 12:2825–2830.

Plaisant, C., Rose, J., Yu, B., Auvil, L., Kirschenbaum, M. G., Smith, M. N., Clement, T., and Lord, G. (2006). Exploring erotics in emily dickinson’s correspondence with text mining and visual interfaces. In Proceedings of the 6th ACM/IEEE-CS joint conference on Digital libraries, pages 141–150.

Ramezani, R. (2021). A language-independent authorship attribution approach for author identification of text documents. Expert Systems with Applications, 180:115139.

Salewski, L., Alaniz, S., Rio-Torto, I., Schulz, E., and Akata, Z. (2023). In-context impersonation reveals large language models’ strengths and biases. In Thirty-seventh Conference on Neural Information Processing Systems.

Santos, D. (2024). Literary similarity of novels in Portuguese. In Gamallo, P., Claro, D., Teixeira, A., Real, L., Garcia, M., Oliveira, H. G., and Amaro, R., editors, Proceedings of the 16th International Conference on Computational Processing of Portuguese, pages 539–543, Santiago de Compostela, Galicia/Spain. Association for Computational Lingustics.

Sens, A. (2014). Dialect in the anacreontea. Imitate Anacreon, pages 97–112.

Silva, M. O., de Melo-Gomes, L., and Moro, M. M. (2024). From words to gender: Quantitative analysis of body part descriptions within literature in portuguese. Information Processing & Management, 61(3):103647.

Silva, M. O. and Moro, M. M. (2024). Evaluating pre-training strategies for literary named entity recognition in Portuguese. In Gamallo, P., Claro, D., Teixeira, A., Real, L., Garcia, M., Oliveira, H. G., and Amaro, R., editors, Proceedings of the 16th International Conference on Computational Processing of Portuguese, pages 384–393, Santiago de Compostela, Galicia/Spain. Association for Computational Lingustics.

Singh, P., Rutten, G., and Lefever, E. (2021). A pilot study for bert language modelling and morphological analysis for ancient and medieval greek. In 5th Joint SIGHUM Workshop on Computational Linguistics for Cultural Heritage, Social Sciences, Humanities and Literature, co-located with EMNLP 2021, pages 128–137. Association for Computational Linguistics.

Touvron, H., Martin, L., Stone, K., Albert, P., Almahairi, A., Babaei, Y., Bashlykov, N., Batra, S., Bhargava, P., Bhosale, S., Bikel, D., Blecher, L., Ferrer, C. C., Chen, M., Cucurull, G., Esiobu, D., Fernandes, J., Fu, J., Fu, W., Fuller, B., Gao, C., Goswami, V., Goyal, N., Hartshorn, A., Hosseini, S., Hou, R., Inan, H., Kardas, M., Kerkez, V., Khabsa, M., Kloumann, I., Korenev, A., Koura, P. S., Lachaux, M.-A., Lavril, T., Lee, J., Liskovich, D., Lu, Y., Mao, Y., Martinet, X., Mihaylov, T., Mishra, P., Molybog, I., Nie, Y., Poulton, A., Reizenstein, J., Rungta, R., Saladi, K., Schelten, A., Silva, R., Smith, E. M., Subramanian, R., Tan, X. E., Tang, B., Taylor, R., Williams, A., Kuan, J. X., Xu, P., Yan, Z., Zarov, I., Zhang, Y., Fan, A., Kambadur, M., Narang, S., Rodriguez, A., Stojnic, R., Edunov, S., and Scialom, T. (2023). Llama 2: Open foundation and fine-tuned chat models. arXiv preprint arXiv:2307.09288.

Wei, J., Wang, X., Schuurmans, D., Bosma, M., Xia, F., Chi, E., Le, Q. V., Zhou, D., et al. (2022). Chain-of-thought prompting elicits reasoning in large language models. Advances in Neural Information Processing Systems, 35:24824–24837.

White, J., Fu, Q., Hays, S., Sandborn, M., Olea, C., Gilbert, H., Elnashar, A., Spencer-Smith, J., and Schmidt, D. C. (2023). A prompt pattern catalog to enhance prompt engineering with chatgpt. arXiv preprint arXiv:2302.11382.

Yeruva, V. K., Chandrashekar, M., Lee, Y., Rydberg-Cox, J., Blanton, V., and Oyler, N. A. (2020a). Interpretation of sentiment analysis in aeschylus’s greek tragedy. In Proceedings of the The 4th Joint SIGHUM Workshop on Computational Linguistics for Cultural Heritage, Social Sciences, Humanities and Literature, pages 138–146.

Yeruva, V. K., Chandrashekar, M., Lee, Y., Rydberg-Cox, J., Blanton, V., and Oyler, N. A. (2020b). Interpretation of sentiment analysis with human-in-the-loop. In 2020 IEEE International Conference on Big Data (Big Data), pages 3099–3108. IEEE.
Publicado
21/07/2024
NUNES, Rafael O.; ZANDONÁ, João G.; MAIA, Júlia V.; SPRITZER, Andre; BALREIRA, Dennis G.; FREITAS, Carla M. D. S.. Ancient Greek’s New Technological Muse: Extracting Topoi in the Anacreontea with LLMs. In: SEMINÁRIO INTEGRADO DE SOFTWARE E HARDWARE (SEMISH), 51. , 2024, Brasília/DF. Anais [...]. Porto Alegre: Sociedade Brasileira de Computação, 2024 . p. 25-36. ISSN 2595-6205. DOI: https://doi.org/10.5753/semish.2024.1803.