Africa has over 2000 indigenous languages but they are under-represented in NLP research due to lack of datasets. In recent years, there have been progress in developing labelled corpora for African languages. However, they are often available in a single domain and may not generalize to other domains. In this paper, we focus on the task of sentiment classification for cross-domain adaptation. We create a new dataset, Nollywood movie reviews for five languages widely spoken in Nigeria (English, Hausa, Igbo, Nigerian Pidgin, and Yoruba). We provide an extensive empirical evaluation using classical machine learning methods and pre-trained language models. By leveraging transfer learning, we compare the performance of cross-domain adaptation from Twitter domain, and cross-lingual adaptation from English language. Our evaluation shows that transfer from English in the same target domain leads to more than 5% improvement in accuracy compared to transfer from Twitter in the same language. To further mitigate the domain difference, we leverage machine translation from English to other Nigerian languages, which leads to a further improvement of 7% over cross-lingual evaluation. While machine translation to low-resource languages are often of low quality, our analysis shows that sentiment related words are often preserved.
非洲有2000多种本土语言,但由于缺乏数据集,它们在自然语言处理研究中代表性不足。近年来,在为非洲语言开发标注语料库方面取得了一些进展。然而,这些语料库往往仅适用于单一领域,可能无法推广到其他领域。在本文中,我们专注于跨领域适应的情感分类任务。我们创建了一个新的数据集,即针对尼日利亚广泛使用的五种语言(英语、豪萨语、伊博语、尼日利亚洋泾浜语和约鲁巴语)的诺莱坞电影评论数据集。我们使用经典机器学习方法和预训练语言模型进行了广泛的实证评估。通过利用迁移学习,我们比较了从推特领域进行跨领域适应以及从英语进行跨语言适应的性能。我们的评估表明,与从同一语言的推特进行迁移相比,从同一目标领域的英语进行迁移可使准确率提高5%以上。为了进一步缓解领域差异,我们利用从英语到其他尼日利亚语言的机器翻译,这比跨语言评估又提高了7%。虽然针对低资源语言的机器翻译质量往往较低,但我们的分析表明,与情感相关的词汇往往得以保留。