Transformer architectures and models have made significant progress in language-based tasks. In this area, is BERT one of the most widely used and freely available transformer architecture. In our work, we use BERT for context-based phrase recognition of magic spells in the Harry Potter novel series. Spells are a common part of active magic in fantasy novels. Typically, spells are used in a specific context to achieve a supernatural effect. A series of investigations were conducted to see if a Transformer architecture could recognize such phrases based on their context in the Harry Potter saga. For our studies a pre-trained BERT model was used and fine-tuned utilising different datasets and training methods to identify the searched context. By considering different approaches for sequence classification as well as token classification, it is shown that the context of spells can be recognised. According to our investigations, the examined sequence length for fine-tuning and validation of the model plays a significant role in context recognition. Based on this, we have investigated whether spells have overarching properties that allow a transfer of the neural network models to other fantasy universes as well. The application of our model showed promising results and is worth to be deepened in subsequent studies.
翻译:Transformer架构和模型在基于语言的任务中取得了显著进展。在这一领域,BERT是最广泛使用且可免费获取的Transformer架构之一。在我们的研究中,我们使用BERT对《哈利·波特》系列小说中的魔法咒语进行基于上下文的短语识别。咒语是奇幻小说中活跃魔法常见的一部分。通常,咒语在特定情境下被使用以实现超自然效果。我们开展了一系列研究,探究Transformer架构是否能够基于《哈利·波特》系列中的上下文识别此类短语。我们的研究使用了预训练的BERT模型,并通过不同的数据集和训练方法对其进行微调,以识别所搜索的上下文。通过考虑序列分类和令牌分类的不同方法,研究表明咒语的上下文可以被识别。根据我们的调查,用于模型微调和验证的序列长度在上下文识别中起着重要作用。基于此,我们进一步研究了咒语是否具有跨奇幻宇宙迁移神经网络模型的通用特性。我们模型的应用展示了令人鼓舞的结果,值得在后续研究中深入探索。