RAIL 2021Original text
Training Cross-Lingual embeddings for Setswana and Sepedi
This is the original text of the paper. Translations are linked above.
Proceedings of the 2nd Workshop on Resources for African Indigenous Languages (RAIL 2021), Journal of the Digital Humanities Association of Southern Africa.
Original text, shown under its licence (CC BY-SA 4.0). Reuse allowed with attribution; share adaptations alike. The translations on this site are by Ernst van Gassen (Arktos AI Lab).
Plain text for reuse, with its licence: English · LICENSE
Affiliations
Makgatho, Mack
Dept. of Computer Science, University of Pretoria
Marivate, Vukosi
Dept. of Computer Science, University of Pretoria
Sefara, Tshephisho
Council for Scientific and Industrial Research
Wagner, Valencia
Sol Plaatje University
E-mail addresses removed for privacy. They are in the original PDF.
Abstract
African languages still lag in the advances of Natural Language Processing techniques, one reason being the lack of representative data, having a technique that can transfer information between languages can help mitigate against the lack of data problem. This paper trains Setswana and Sepedi monolingual word vectors and uses VecMap to create cross-lingual embeddings for Setswana-Sepedi in order to do a cross-lingual transfer.
Word embeddings are word vectors that represent words as continuous floating numbers where semantically similar words are mapped to nearby points in n-dimensional space. The idea of word embeddings is based on the distribution hypothesis that states, semantically similar words are distributed in similar contexts (Harris, 1954).
Cross-lingual embeddings leverages monolingual embeddings by learning a shared vector space for two separately trained monolingual vectors such that words with similar meaning are represented by similar vectors. In this paper, we investigate cross-lingual embeddings for Setswana-Sepedi monolingual word vector. We use the unsupervised cross lingual embeddings in VecMap to train the Setswana-Sepedi cross-language word embeddings. We evaluate the quality of the Setswana-Sepedi cross-lingual word representation using a semantic evaluation task. For the semantic similarity task, we translated the WordSim and SimLex tasks into Setswana and Sepedi. We release this dataset as part of this work for other researchers. We evaluate the intrinsic quality of the embeddings to determine if there is improvement in the semantic representation of the word embeddings.
Keywords
cross-lingual embeddings, word embeddings, intrinsic evaluation
1 Introduction
Many African languages have insufficient language resources (data, tools, people) (Abbott & Martinus 2019, Martinus & Abbott 2019, Nekoto et al. 2020, Sefara et al. 2021) and fall into the classification of low resource languages (Ranathunga et al. 2021) in the Natural Language Processing (NLP) field. This lack of resources makes it harder to capitalise on the recent advances in many NLP downstream tasks such as Neural Machine Translation (Cho et al. 2014), Large Language Models (Devlin et al. 2018, Howard & Ruder 2018), Q&A systems (Kwiatkowski et al. 2019), etc. There may be more downstream approaches to deal with some of these challenges such as Transfer Learning (Ruder et al. 2019), Data Augmentation (Marivate & Sefara 2020a), Multilingual Models (Hedderich et al. 2020), etc. Additionally, the lack of research attention to existing NLP techniques results in difficulties finding a benchmark (Abbott & Martinus 2019). In this work, we focus on word representations through word embeddings and how we can leverage one language to assist in the representation of another related language. These embeddings can then be used to develop tools for other downstream tasks.
Word Embeddings are a mathematical technique to learn general language vector representations from a large amount of unlabelled text using co-occurring statistics. In recent years, monolingual word embeddings techniques are increasingly becoming an important resource in NLP. Word embeddings are widely used in NLP problems such as sentiment analysis (Socher et al. 2013), named-entity-recognition (Guo et al. 2014), parts-of-speech tagging, and document retrieval. Word2Vec is a vector training model proposed by Mikolov et al. (2013). Word2Vec produces a low-dimensional real-value vector representing the meaning of a word. The word vector represents grammatical and semantic properties, which results in words with similar semantic relations being close to each other. The word vector representation method incorporates the semantic relationship between words which is not possible through representations such as BagOf-Words of TFIDF. Word embeddings are better than both methods because they map all the words in a language into a vector space of a given dimension, the words are converted into vectors and allow multiple linear operations and have the property of preserving analogies (Mikolov et al. 2013, Pennington et al. 2014).
Cross-lingual word embeddings have been receiving more and more attention from the NLP community, mainly because it has provided a path to effectively align two disjoint monolingual embeddings with no bilingual dictionary for unsupervised techniques or no more than a small bilingual dictionary for supervised techniques (Lample et al. 2018, Artetxe et al. 2020). Cross-lingual techniques also enable knowledge transfer between languages with rich resources and low resources. For languages lacking bilingual parallel corpus with other languages, cross-lingual embeddings can be utilised to train high-quality cross-lingual embeddings (Lample et al. 2018). This can aid in accelerating the progress of applying NLP to low-resourced languages. Artetxe et al. (2018) created the cross-lingual unsupervised or supervised word embedding (VecMap library) approach for training cross-lingual word embedding models. The approaches can be used to construct cross-language word vectors with or without a bilingual dictionary.
The majority of South African languages lag bilingual parallel corpus with other languages. In this work, we aim to investigate how cross-lingual embeddings could be used to improve the state of one or both languages. We used data (corpus) from different domains to train Word2Vec and fastText (Bojanowski et al. 2016) monolingual embeddings. When using VecMap, the two embeddings are aligned. VecMap requires two monolingual word vectors from source and target (Artetxe et al. 2018). To evaluate the effectiveness of the cross-lingual embedding for Setswana and Sepedi, we use intrinsic evaluation (Bakarov 2018) through Setswana and Sepedi versions of WordSim (Finkelstein et al. 2001) and Simlex (Hill et al. 2015). This is following on an approach that has been used for Yoruba and Twi (Alabi et al. 2019). We also release the dataset for this benchmark of human semantic similarity task.
This paper is structured as follows; the next section is a review of related work that is done on cross-lingual word vectors. Followed by data collection in Section 3. Section 4 discusses methodology followed to train cross-lingual word vectors using VecMap. The evaluation of the word vectors is discussed in Section 5. Section 5.1 explains the results while Section 6 discusses the findings and finally, conclusions and future work can be found in Section 7.
2 Background and Related Work
Cross-lingual word embeddings (CLWEs) are becoming popular in NLP for two reasons: Cross-lingual word embeddings can transfer knowledge from rich-resourced languages to low-resourced; The technique can also infer the semantics of words in a multiple language environment. Conneau et al. (2018) show that word embeddings spaces can be aligned without any cross-lingual supervision. The alignment is based on solely unaligned datasets of each language. Using adversarial training, they were able to initialise a linear mapping between a source and a target space, which they use to create a synthetic parallel dictionary. First, they propose a simple criterion that is used as an unsupervised validation matric. Second, they propose the similarity measure cross-domain similarity local scaling (CSLS), which mitigates the hubness problem and increases the word translation accuracy. The hubness problem is defined by Dinu et al. (2015) as:
"neighbourhoods of the mapped elements are strongly polluted by hubs, vectors that tend to be near a high proportion of items, pushing their correct labels down the neighbour list."
In the work done by Adams et al. (2017), the research looked at applying CLWEs to Yongning Na, a Sino-Tibetan language. The research focused on determining if the quality of CLWEs depends on having large amounts of data in multiple languages and if initialising the parameters of neural network language models (NMLM) can improve language modelling in a low-resourced context. The research scaled down the available monolingual data of the target language to about 1000 sentences. The quality of intrinsic embedding was assessed by taking into consideration correlation with human judgement on the WordSim353 (Finkelstein et al. 2001) test set. They went further to perform language modelling experiments by initialising the parameters for long short-term memory (LSTM) (Hochreiter & Schmidhuber 1997) by training across different language pairs. The research showed that CLWEs are resilient even when target language training data is scaled-down and that initialisation of NMLM parameters leads to good performance.
Artetxe & Schwenk (2019) introduced an architecture that can be used to learn multilingual sentence representations for more than 90 languages. The languages belonged to 30 different families. The research used a single BiLSTM encoder with a shared Byte Pair Encoding (BPE) vocabulary coupled with an auxiliary decoder and trained on parallel corpora. They learn a classifier using English annotated data only and transfer it to any language without modification. The research mainly focused on vector representations of sentences that are general for the input language and the NLP task.
Alabi et al. (2019) worked on massive vs. curated embeddings for low-resourced languages: the case of Yorùbá and Twi. Authors compare two types of word embeddings obtained from curated corpora and a language-dependent processing. They move further to collect high quality and noisy data for the two languages. They quantify that improvements that is based on the quality of data and not only on the amount of data. In their experiments, they use different architectures to learn word representations both from characters and surface forms. They evaluate multilingual BERT on a down stream task, specifically named entity recognition and WordSim-353 word pairs dataset.
Feng et al. (2018) investigates a cross-lingual knowledge transfer technique to improve the semantic representation of low-resourced languages and improving low resource named-entity recognition. In their research, neural networks are used to do knowledge transfer from high resource language using bilingual lexicons to improve low resource word representation. They automatically learn semantic projections using a lexicon extension strategy that is designed to address out-of lexicon problem. Finally, they regard word-level entity type distribution features as an external language independent knowledge and incorporate them into their neural architecture. The experiment is done on two low resource languages (Dutch and Spanish) to demonstrate the effectiveness of these additional semantic representations.
Banerjee et al. (2021) show that initialising the embedding layer of Unsupervised Neural Machine Translation (UNMT) models with cross-lingual embeddings shows significant improvements in BLEU score. Authors show that freezing the embedding layer weights lead to better gains compared to updating the embedding layer weights during training. They experimented using Denoising Autoencoder (DAE) and Masked Sequence to Sequence (MASS) for three different unrelated language pairs (for English-Hindi, English-Bengali, and English-Gujarati). The analysis shows the importance of using cross-lingual embedding as compared to other techniques.
The literature shows that there is a substantial amount of work done on cross-lingual transfer and empirical proof that the method improves the performance of models. The literature does not relay solely on intrinsic evaluation but the solutions are applied to some downstream tasks. In the next section, we detail the data used for conducting experiments.
3 Data collection
Training data is very important for implementing powerful and accurate models, and clean training data can make a difference between a good and great model. The data needs to be very imperative because the quality of the alignment depends on the quality of the monolingual embeddings, i.e. data used to create the initial monolingual embeddings before mapping.
We use data collected from different domains for training word vectors:
JW300 bible (Agić & Vulić 2019): A biblical-domain data set containing parallel corpus for low-resourced languages.
- Wikipedia
- National Centre for Human Language Technology (NCHLT) text corpus (Eiselen & Puttkammer 2014): The dataset contains clean textual data in Sepedi and Setswana. The data set was constructed by harvesting existing data such as online publications, online news, web crawling and crowd-sourcing.
- SABC News Data in Setswana and Sepedi (Marivate et al. 2020, Marivate & Sefara 2020b): The data set contains news titles collected from online social media.
National Centre for Human Language Technology (NCHLT) data is used for training monolingual word vectors. For preprocessing, we changed all words to lowercase, removing brackets, digits, punctuations, and white spaces.
Table 1: Corpus size for the Setswana and Sepedi Datasets

In this section we dealt with how we collected the data used to training our monolingual embeddings for both languages and what approach we took to pre-process the data before training the models. In the next section we discuss the approach taken to train the monolingual embeddings and how VecMap was used to training the cross-lingual embeddings.
4 Training monolingual and cross-lingual embeddings (VecMap)
In this section, we present the methods (frameworks) used to train monolingual and cross-lingual embeddings. We describe the parameters used to train word2Vec and fastText embeddings. We also look into VecMap, the framework that we used to align monolingual embeddings.
CLWEs have proved to perform very well for low-resourced languages. The main idea is to do a cross-lingual transfer from the source language to the target, such that we have a single representation for a pair of languages where semantically similar words are closer to one another. In order to use VecMap two monolingual embeddings are required, we train fastText and word2Vec vectors. We use the following parameters for fastText and word2Vec in Table 2. The definition of the parameters are as follows: skip-Gram - training method, dim - size of word vectors, minCount - minimal number of word occurrences, ws - size of the context window, and epoch - number of epochs or iterations.
4.1 Word2Vec
The word2Vec (Mikolov et al. 2013) algorithm is a two-layer neural network that vectorises words to processes text. The algorithm takes as input a text corpus and returns feature vectors that represent words in that corpus as a set of vectors. Word2Vec trains words against neighbouring words based on a window size context. It trains the words using two methods: skip-gram or continuous bag of words (CBOW), skip-gram uses a word to predict a target context and CBOW uses context to predict a target word. The experiment uses skip-gram to train monolingual embeddings. We use word vectors that were trained using Word2Vec. These correspond to monolingual embeddings of dimension 300 trained on Sepedi and Setswana corpora.
Table 2: Parameters for FastText and Word2Vec

4.2 FastText
FastText (Bojanowski et al. 2016) is a supervised prediction-based technique based on the word2Vec family of algorithms (Mikolov et al. 2013). It predicts tags through context and represents each word as an n-gram of characters, instead of learning vectors for words directly. The fastText model has three layers: input layer, hidden layer, and output layer. Input is a number of words and their n-gram features, these features are used to represent a single document. The hidden layer is the superimposed average of multiple feature vectors. The hidden layer solves the maximum likelihood function, then constructs a Huffman tree according to the weights and model parameters of each category, and uses the Huffman tree as the output.
4.3 VecMap
VecMap (Artetxe et al. 2020) is an open-source framework to learn CLWEs written in Python.
There are two techniques to do cross-lingual embeddings with VecMap, supervised (recommended if you have a large training dictionary) and unsupervised (recommended if you have no seed dictionary and do not want to rely on identical words). In this work, we align word embedding using VecMap[1]. The approach is fully unsupervised. The steps we followed to build our cross-lingual word embeddings model are motivated by the authors of VecMap Artetxe et al. (2020). The assumption is that we have a monolingual corpus for source and target languages. The word representations is learned independently for each language (monolingual embeddings for each language), and then mapped to a common vector space.
In this section, we presented word2Vec, fastText and VecMap. We also described the parameters used to train word2Vec and fastText embeddings. In the next section, we present experimental results and perform some analyses.
5 Evaluation
We evaluate the quality of Setswana and Sepedi word vector representations on two different benchmarks Simlex and WordSim. The datasets (Simlex and WordSim) contain pairs of Setswana and Sepedi words that have been assigned similarity ratings by humans. They give a similarity score between a pair of words corresponding to their relatedness. Cosine similarity is used to collect a score from the model in order to check how close the score is to the human score, we use Spearman to measure correlation. Spearman index measure the dependence of two variables, the correlation of two statistical variables is evaluated using monotonic equation. We manually translate the WordSim and Simlex word pairs dataset from English into Setswana and Sepedi. We are releasing a dataset of Setswana and Sepedi translated WordSim and Simlex as part of this project at https://github.com/dsfsi/embedding-eval-data and archived on Zenodo at https://zenodo.org/record/5673974.
Table 3: FastText Monolingual Results

Table 4: Word2Vec Monolingual Results

5.1 Results
This section presents the results of the experiments conducted to show the efficiency of the proposed technique with a couple of experiments. We first present the monolingual evaluation task for word2Vec and fastText and then present the cross-lingual evaluation task for Setswana and Sepedi. The evaluations of cross-lingual evaluation task is based on two embedding methods fastText and word2Vec.
In Table 3 and Table 4, we show the Spearman's correlation for word vectors trained on fastText and word2vec. The correlation scores calculate the similarity between word vectors. Table 5 and Table 6 scores are obtained from using Setswana and Sepedi monolingual vectors and using VecMap to align the two vectors to the same vector space.
The results at Table 3 and Table 4 show the coverage and Spearman results. Coverage refers to the total number of in vocabulary words (words that are found both in the model and evaluation dataset). We can see that the coverage is lower for word2Vec but a little higher for fastText (we expected coverage for fastText to be 100 percent). The Simlex and WordSim similarity score for monolingual fastText embeddings in Table 3 is higher, this is expected due to the coverage percentage also being very high as compared to the coverage value in Table 4.
Table 5: Word2Vec Cross-lingual Results

Table 6: FastText Cross-lingual Results

6 Discussion
The main purpose of this research is to show that it is possible to do cross-lingual transfer from the source language to the target. In essence we wanted to check if cross-lingual alignment can improve the word representation for the target language. The results on Table 4 shows that the Spearman's correlation value for the target language when using word2Vec is low, this is also due to coverage percentage, but fastText based-embeddings perform better on Table 3 and has a higher coverage percentage, as stated upove we expected 100 percent coverage. Table 5 shows that we improved the representation of words after cross-lingual alignment for word2Vec based-embeddings. The Spearman's value has increased for both Simlex and Wordsim. We expected to improve the results for fastText embeddings but in this case word2Vec actually yielded better results.
7 Conclusion
In this paper, VecMap was used to align Setswana-Sepedi to the same vector space. Through this work, we wanted to use cross-lingual (VecMap) technique to enable knowledge transfer between languages with rich resources and low resources. The results show that it is possible to align two monolingual embeddings to get cross-lingual embeddings. We mapped Setswana to Sepedi and used Spearman's to check correlation. Interestingly we get different results on fastText and word2Vec-based embeddings though we used the same data to train the embeddings.
In future work, it would be interesting to use the cross-lingual embedding on a downstream task like translation or sentiment analysis specifically for low-resourced languages.
8 Acknowledgements
We would like to acknowledge ABSA for sponsoring the industry chair and it's related activities to the project.
References
Abbott, J. & Martinus, L. (2019), Benchmarking neural machine translation for southern african languages, in 'Proceedings of the 2019 Workshop on Widening NLP', pp. 98-101.
Adams, O., Makarucha, A., Neubig, G., Bird, S. & Cohn, T. (2017), Cross-lingual word embeddings for low-resource language modeling, in 'Proceedings of the 15th Conference of the European Chapter of the Association for Computational Linguistics: Volume 1, Long Papers', pp. 937-947.
Agić, Ž. & Vulić, I. (2019), JW300: A wide-coverage parallel corpus for low-resource languages, in 'Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics', Association for Computational Linguistics, Florence, Italy, pp. 3204-3210. URL: https://aclanthology.org/P19-1310
Alabi, J. O., Amponsah-Kaakyire, K., Adelani, D. I. & España-Bonet, C. (2019), 'Massive vs. curated word embeddings for low-resourced languages. the case of yor\ub\'a and twi', arXiv preprint arXiv:1912.02481.
Artetxe, M., Labaka, G. & Agirre, E. (2018), A robust self-learning method for fully unsupervised cross-lingual mappings of word embeddings, in 'Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)', pp. 789-798.
Artetxe, M., Ruder, S. & Yogatama, D. (2020), On the cross-lingual transferability of monolingual representations, in 'Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics', pp. 4623-4637.
Artetxe, M. & Schwenk, H. (2019), 'Massively multilingual sentence embeddings for zero-shot cross-lingual transfer and beyond', Transactions of the Association for Computational Linguistics 7,597-610.
Bakarov, A. (2018), 'A survey of word embeddings evaluation methods', arXiv preprint arXiv:1801.09536.
Banerjee, T., au2, R. M. V. & Bhattacharyya, P. (2021), 'Cross-lingual embeddings are essential in unmt for distant languages: An english to indoaryan case study'.
Bojanowski, P., Grave, E., Joulin, A. & Mikolov, T. (2016), 'Enriching word vectors with subword information', arXiv preprint arXiv:1607.04606.
Cho, K., Van Merriënboer, B., Gulcehre, C., Bahdanau, D., Bougares, F., Schwenk, H. & Bengio, Y. (2014), 'Learning phrase representations using rnn encoder-decoder for statistical machine translation', arXiv preprint arXiv:1406.1078.
Conneau, A., Lample, G., Ranzato, M., Denoyer, L. & Jégou, H. (2018), 'Word translation without parallel data'.
Devlin, J., Chang, M.-W., Lee, K. & Toutanova, K. (2018), 'Bert: Pre-training of deep bidirectional transformers for language understanding', arXiv preprint arXiv:1810.04805.
Dinu, G., Lazaridou, A. & Baroni, M. (2015), 'Improving zero-shot learning by mitigating the hubness problem'.
Eiselen, R. & Puttkammer, M. J. (2014), Developing text resources for ten south african languages., in 'LREC', pp. 3698-3703.
Feng, X., Feng, X., Qin, B., Feng, Z. & Liu, T. (2018), Improving low resource named entity recognition using cross-lingual knowledge transfer, in 'Proceedings of the Twenty-Seventh International Joint Conference on Artificial Intelligence, IJCAI-18', International Joint Conferences on Artificial Intelligence Organization, pp. 4071-4077. URL: https://doi.org/10.24963/ijcai.2018/566
Finkelstein, L., Gabrilovich, E., Matias, Y., Rivlin, E., Solan, Z., Wolfman, G. & Ruppin, E. (2001), Placing search in context: The concept revisited, in 'Proceedings of the 10th international conference on World Wide Web', pp. 406-414.
Guo, J., Che, W., Wang, H. & Liu, T. (2014), Revisiting embedding features for simple semisupervised learning, in 'Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing (EMNLP)', pp. 110-120.
Hedderich, M. A., Adelani, D., Zhu, D., Alabi, J., Markus, U. & Klakow, D. (2020), Transfer learning and distant supervision for multilingual transformer models: A study on african languages, in 'Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP)', pp. 2580-2591.
Hill, F., Reichart, R. & Korhonen, A. (2015), 'Simlex-999: Evaluating semantic models with (genuine) similarity estimation', Computational Linguistics 41(4), 665-695.
Hochreiter, S. & Schmidhuber, J. (1997), 'Long short-term memory', Neural Computation 9, 1735-1780.
Howard, J. & Ruder, S. (2018), Universal language model fine-tuning for text classification, in 'Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)', pp. 328-339.
Kwiatkowski, T., Palomaki, J., Redfield, O., Collins, M., Parikh, A., Alberti, C., Epstein, D., Polosukhin, I., Devlin, J., Lee, K. et al. (2019), 'Natural questions: a benchmark for question answering research', Transactions of the Association for Computational Linguistics 7,453-466.
Lample, G., Conneau, A., Ranzato, M., Denoyer, L. & Jégou, H. (2018), Word translation without parallel data, in 'International Conference on Learning Representations'.
Marivate, V. & Sefara, T. (2020a), Improving short text classification through global augmentation methods, in 'International Cross-Domain Conference for Machine Learning and Knowledge Extraction', Springer, pp. 385-399.
Marivate, V. & Sefara, T. (2020b), 'South african news data'. URL: https://doi.org/10.5281/zenodo.3668495
Marivate, V., Sefara, T., Chabalala, V., Makhaya, K., Mokgonyane, T., Mokoena, R. & Modupe, A. (2020), Investigating an approach for low resource language dataset creation, curation and classification: Setswana and sepedi, in 'Proceedings of the first workshop on Resources for African Indigenous Languages', pp. 15-20.
Martinus, L. & Abbott, J. Z. (2019), 'A focus on neural machine translation for african languages', arXiv preprint arXiv:1906.05685.
Mikolov, T., Sutskever, I., Chen, K., Corrado, G. S. & Dean, J. (2013), Distributed representations of words and phrases and their compositionality, in 'Advances in neural information processing systems', pp. 3111-3119.
Nekoto, W., Marivate, V., Matsila, T., Fasubaa, T., Fagbohungbe, T., Akinola, S. O., Muhammad, S., Kabenamualu, S. K., Osei, S., Sackey, F. et al. (2020), Participatory research for low-resourced machine translation: A case study in african languages, in 'Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing: Findings', pp. 2144-2160.
Pennington, J., Socher, R. & Manning, C. (2014), Glove: Global vectors for word representation, Vol. 14, pp. 1532-1543.
Ranathunga, S., Lee, E.-S. A., Skenduli, M. P., Shekhar, R., Alam, M. & Kaur, R. (2021), 'Neural machine translation for low-resource languages: A survey', arXiv preprint arXiv:2106.15115.
Ruder, S., Peters, M. E., Swayamdipta, S. & Wolf, T. (2019), Transfer learning in natural language processing, in 'Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Tutorials', pp. 15-18.
Sefara, T. J., Zwane, S. G., Gama, N., Sibisi, H., Senoamadi, P. N. & Marivate, V. (2021), Transformer-based machine translation for low-resourced languages embedded with language identification, in '2021 Conference on Information Communications Technology and Society (ICTAS)', IEEE, pp. 127-132.
Socher, R., Perelygin, A., Wu, J., Chuang, J., Manning, C. D., Ng, A. Y. & Potts, C. (2013), Recursive deep models for semantic compositionality over a sentiment treebank, in 'Proceedings of the 2013 conference on empirical methods in natural language processing', pp. 1631-1642.
Training Cross-Lingual embeddings for Setswana and Sepedi
Entraînement de plongements interlingues pour le setswana et le sepedi
Affiliations
Makgatho, Mack
Dept. of Computer Science, University of Pretoria
Marivate, Vukosi
Dept. of Computer Science, University of Pretoria
Sefara, Tshephisho
Council for Scientific and Industrial Research
Wagner, Valencia
Sol Plaatje University
Affiliations
Makgatho, Mack
Dept. of Computer Science, University of Pretoria
Marivate, Vukosi
Dept. of Computer Science, University of Pretoria
Sefara, Tshephisho
Council for Scientific and Industrial Research
Wagner, Valencia
Sol Plaatje University
Abstract
Résumé
African languages still lag in the advances of Natural Language Processing techniques, one reason being the lack of representative data, having a technique that can transfer information between languages can help mitigate against the lack of data problem. This paper trains Setswana and Sepedi monolingual word vectors and uses VecMap to create cross-lingual embeddings for Setswana-Sepedi in order to do a cross-lingual transfer.
Les langues africaines sont encore à la traîne dans les progrès des techniques de traitement du langage naturel, l'une des raisons étant le manque de données représentatives, avoir une technique qui peut transférer des informations entre les langues peut aider à atténuer le problème du manque de données. Cet article entraîne des vecteurs de mots monolingues pour le setswana et le sepedi et utilise VecMap pour créer des plongements interlingues setswana-sepedi afin d'effectuer un transfert interlingue.
Word embeddings are word vectors that represent words as continuous floating numbers where semantically similar words are mapped to nearby points in n-dimensional space. The idea of word embeddings is based on the distribution hypothesis that states, semantically similar words are distributed in similar contexts (Harris, 1954).
Les plongements lexicaux sont des vecteurs de mots qui représentent les mots sous forme de nombres flottants continus où les mots sémantiquement similaires sont projetés vers des points proches dans un espace n-dimensionnel. L'idée des embeddings de mots est basée sur l'hypothèse de distribution qui stipule que les mots sémantiquement similaires sont distribués dans des contextes similaires (Harris, 1954).
Cross-lingual embeddings leverages monolingual embeddings by learning a shared vector space for two separately trained monolingual vectors such that words with similar meaning are represented by similar vectors. In this paper, we investigate cross-lingual embeddings for Setswana-Sepedi monolingual word vector. We use the unsupervised cross lingual embeddings in VecMap to train the Setswana-Sepedi cross-language word embeddings. We evaluate the quality of the Setswana-Sepedi cross-lingual word representation using a semantic evaluation task. For the semantic similarity task, we translated the WordSim and SimLex tasks into Setswana and Sepedi. We release this dataset as part of this work for other researchers. We evaluate the intrinsic quality of the embeddings to determine if there is improvement in the semantic representation of the word embeddings.
Les plongements interlingues exploitent les plongements monolingues en apprenant un espace vectoriel partagé pour deux vecteurs monolingues entraînés séparément, de sorte que les mots ayant une signification similaire soient représentés par des vecteurs similaires. Dans cet article, nous étudions les plongements interlingues pour les vecteurs de mots monolingues setsuana-sepedi. Nous utilisons les plongements interlingues non supervisés de VecMap pour entraîner les plongements lexicaux interlangues setswana-sepedi. Nous évaluons la qualité de la représentation interlingue des mots setswana-sepedi à l'aide d'une tâche d'évaluation sémantique. Pour la tâche de similarité sémantique, nous avons traduit les tâches WordSim et SimLex en Setswana et Sepedi. Nous publions cet ensemble de données dans le cadre de ce travail pour d'autres chercheurs. Nous évaluons la qualité intrinsèque des embeddings pour déterminer s'il y a une amélioration de la représentation sémantique des embeddings de mots.
Keywords
Mots-clés
cross-lingual embeddings, word embeddings, intrinsic evaluation
plongements interlingues, plongements lexicaux, évaluation intrinsèque
1 Introduction
1 Introduction
Many African languages have insufficient language resources (data, tools, people) (Abbott & Martinus 2019, Martinus & Abbott 2019, Nekoto et al. 2020, Sefara et al. 2021) and fall into the classification of low resource languages (Ranathunga et al. 2021) in the Natural Language Processing (NLP) field. This lack of resources makes it harder to capitalise on the recent advances in many NLP downstream tasks such as Neural Machine Translation (Cho et al. 2014), Large Language Models (Devlin et al. 2018, Howard & Ruder 2018), Q&A systems (Kwiatkowski et al. 2019), etc. There may be more downstream approaches to deal with some of these challenges such as Transfer Learning (Ruder et al. 2019), Data Augmentation (Marivate & Sefara 2020a), Multilingual Models (Hedderich et al. 2020), etc. Additionally, the lack of research attention to existing NLP techniques results in difficulties finding a benchmark (Abbott & Martinus 2019). In this work, we focus on word representations through word embeddings and how we can leverage one language to assist in the representation of another related language. These embeddings can then be used to develop tools for other downstream tasks.
De nombreuses langues africaines ont des ressources linguistiques insuffisantes (données, outils, personnes) (Abbott & Martinus 2019, Martinus & Abbott 2019, Nekoto et al. 2020, Sefara et al. 2021) et tombent dans la classification des langues à faible ressource (Ranathunga et al. 2021) dans le domaine du traitement du langage naturel (NLP). Ce manque de ressources rend plus difficile la capitalisation sur les récentes avancées dans de nombreuses tâches en aval du TAL telles que la Traduction Automatique Neuronale (Cho et al. 2014), les Grands Modèles de Langage (Devlin et al. 2018, Howard & Ruder 2018), les systèmes de Questions-Réponses (Kwiatkowski et al. 2019), etc. Il peut exister d'autres approches en aval pour traiter certains de ces défis, telles que l'apprentissage par transfert (Ruder et al. 2019), l'augmentation de données (Marivate & Sefara 2020a), les modèles multilingues (Hedderich et al. 2020), etc. De plus, le manque d'attention de la recherche sur les techniques existantes du TAL entraîne des difficultés à trouver un benchmark (Abbott & Martinus 2019). Dans ce travail, nous nous concentrons sur les représentations de mots par le biais des embeddings de mots et sur la manière dont nous pouvons utiliser une langue pour aider à la représentation d'une autre langue apparentée. Ces embeddings peuvent ensuite être utilisés pour développer des outils pour d'autres tâches en aval.
Word Embeddings are a mathematical technique to learn general language vector representations from a large amount of unlabelled text using co-occurring statistics. In recent years, monolingual word embeddings techniques are increasingly becoming an important resource in NLP. Word embeddings are widely used in NLP problems such as sentiment analysis (Socher et al. 2013), named-entity-recognition (Guo et al. 2014), parts-of-speech tagging, and document retrieval. Word2Vec is a vector training model proposed by Mikolov et al. (2013). Word2Vec produces a low-dimensional real-value vector representing the meaning of a word. The word vector represents grammatical and semantic properties, which results in words with similar semantic relations being close to each other. The word vector representation method incorporates the semantic relationship between words which is not possible through representations such as BagOf-Words of TFIDF. Word embeddings are better than both methods because they map all the words in a language into a vector space of a given dimension, the words are converted into vectors and allow multiple linear operations and have the property of preserving analogies (Mikolov et al. 2013, Pennington et al. 2014).
Les embeddings de mots sont une technique mathématique pour apprendre des représentations vectorielles générales de langage à partir d'une grande quantité de texte non étiqueté en utilisant des statistiques de co-occurrence. Ces dernières années, les techniques de plongements lexicaux monolingues deviennent une ressource de plus en plus importante en TAL. Les plongements lexicaux sont largement utilisés dans les problèmes de TAL tels que l'analyse de sentiments (Socher et al. 2013), la reconnaissance d'entités nommées (Guo et al. 2014), l'étiquetage des parties du discours et la recherche documentaire. Word2Vec est un modèle d'entraînement vectoriel proposé par Mikolov et al. (2013). Word2Vec produit un vecteur de faible dimension à valeur réelle représentant le sens d'un mot. Le vecteur de mots représente les propriétés grammaticales et sémantiques, ce qui fait que les mots ayant des relations sémantiques similaires sont proches les uns des autres. La méthode de représentation vectorielle des mots intègre la relation sémantique entre les mots, ce qui n'est pas possible avec des représentations telles que BagOf-Words de TFIDF. Les plongements lexicaux sont meilleurs que ces deux méthodes car ils projettent tous les mots d'une langue dans un espace vectoriel d'une dimension donnée, les mots sont convertis en vecteurs et permettent de multiples opérations linéaires et ont la propriété de préserver les analogies (Mikolov et al. 2013, Pennington et al. 2014).
Cross-lingual word embeddings have been receiving more and more attention from the NLP community, mainly because it has provided a path to effectively align two disjoint monolingual embeddings with no bilingual dictionary for unsupervised techniques or no more than a small bilingual dictionary for supervised techniques (Lample et al. 2018, Artetxe et al. 2020). Cross-lingual techniques also enable knowledge transfer between languages with rich resources and low resources. For languages lacking bilingual parallel corpus with other languages, cross-lingual embeddings can be utilised to train high-quality cross-lingual embeddings (Lample et al. 2018). This can aid in accelerating the progress of applying NLP to low-resourced languages. Artetxe et al. (2018) created the cross-lingual unsupervised or supervised word embedding (VecMap library) approach for training cross-lingual word embedding models. The approaches can be used to construct cross-language word vectors with or without a bilingual dictionary.
Les plongements lexicaux interlingues ont reçu de plus en plus d'attention de la part de la communauté du TAL, principalement parce qu'ils ont fourni une voie pour aligner efficacement deux plongements monolingues disjoints sans dictionnaire bilingue pour les techniques non supervisées ou avec pas plus qu'un petit dictionnaire bilingue pour les techniques supervisées (Lample et al. 2018, Artetxe et al. 2020). Les techniques interlingues permettent également le transfert de connaissances entre les langues disposant de ressources riches et celles disposant de ressources limitées. Pour les langues ne disposant pas de corpus parallèle bilingue avec d'autres langues, les plongements interlingues peuvent être utilisés pour entraîner des plongements interlingues de haute qualité (Lample et al. 2018). Cela peut contribuer à accélérer les progrès de l'application du TAL aux langues à faibles ressources. Artetxe et al. (2018) ont créé l'approche de plongement lexical interlingue non supervisé ou supervisé (bibliothèque VecMap) pour l'entraînement de modèles de plongements lexicaux interlingues. Les approches peuvent être utilisées pour construire des vecteurs de mots interlingues avec ou sans dictionnaire bilingue.
The majority of South African languages lag bilingual parallel corpus with other languages. In this work, we aim to investigate how cross-lingual embeddings could be used to improve the state of one or both languages. We used data (corpus) from different domains to train Word2Vec and fastText (Bojanowski et al. 2016) monolingual embeddings. When using VecMap, the two embeddings are aligned. VecMap requires two monolingual word vectors from source and target (Artetxe et al. 2018). To evaluate the effectiveness of the cross-lingual embedding for Setswana and Sepedi, we use intrinsic evaluation (Bakarov 2018) through Setswana and Sepedi versions of WordSim (Finkelstein et al. 2001) and Simlex (Hill et al. 2015). This is following on an approach that has been used for Yoruba and Twi (Alabi et al. 2019). We also release the dataset for this benchmark of human semantic similarity task.
La majorité des langues sud-africaines sont à la traîne par rapport aux autres langues en termes de corpus parallèles bilingues. Dans ce travail, nous cherchons à étudier comment les plongements interlingues pourraient être utilisés pour améliorer l'état d'une ou des deux langues. Nous avons utilisé des données (corpus) de différents domaines pour entraîner des embeddings monolingues Word2Vec et fastText (Bojanowski et al. 2016). Lorsque VecMap est utilisé, les deux embeddings sont alignés. VecMap nécessite deux vecteurs de mots monolingues de la source et de la cible (Artetxe et al. 2018). Pour évaluer l'efficacité du plongement interlingue pour le setswana et le sepedi, nous utilisons une évaluation intrinsèque (Bakarov 2018) via les versions setswana et sepedi de WordSim (Finkelstein et al. 2001) et Simlex (Hill et al. 2015). Cela fait suite à une approche qui a été utilisée pour Yoruba et Twi (Alabi et al. 2019). Nous publions également le jeu de données pour ce benchmark de la tâche de similarité sémantique humaine.
This paper is structured as follows; the next section is a review of related work that is done on cross-lingual word vectors. Followed by data collection in Section 3. Section 4 discusses methodology followed to train cross-lingual word vectors using VecMap. The evaluation of the word vectors is discussed in Section 5. Section 5.1 explains the results while Section 6 discusses the findings and finally, conclusions and future work can be found in Section 7.
Cet article est structuré comme suit ; la section suivante est une revue des travaux connexes réalisés sur les vecteurs de mots interlingues. Suivie par la collecte de données dans la Section 3. La Section 4 discute de la méthodologie suivie pour entraîner des vecteurs de mots interlingues en utilisant VecMap. L'évaluation des vecteurs de mot est discutée dans la section 5. La Section 5.1 explique les résultats tandis que la Section 6 discute des conclusions et enfin, les conclusions et les travaux futurs peuvent être trouvés dans la Section 7.
2 Background and Related Work
2 Contexte et travaux connexes
Cross-lingual word embeddings (CLWEs) are becoming popular in NLP for two reasons: Cross-lingual word embeddings can transfer knowledge from rich-resourced languages to low-resourced; The technique can also infer the semantics of words in a multiple language environment. Conneau et al. (2018) show that word embeddings spaces can be aligned without any cross-lingual supervision. The alignment is based on solely unaligned datasets of each language. Using adversarial training, they were able to initialise a linear mapping between a source and a target space, which they use to create a synthetic parallel dictionary. First, they propose a simple criterion that is used as an unsupervised validation matric. Second, they propose the similarity measure cross-domain similarity local scaling (CSLS), which mitigates the hubness problem and increases the word translation accuracy. The hubness problem is defined by Dinu et al. (2015) as:
Les plongements lexicaux interlingues (CLWEs) deviennent populaires en TAL pour deux raisons : les plongements lexicaux interlingues peuvent transférer des connaissances des langues riches en ressources vers les langues peu dotées ; cette technique peut également inférer la sémantique des mots dans un environnement multilingue. Conneau et al. (2018) montrent que les espaces de plongements lexicaux peuvent être alignés sans aucune supervision interlingue. L'alignement est basé uniquement sur des ensembles de données non alignés de chaque langue. En utilisant l’apprentissage adversatif, ils ont pu initialiser un mappage linéaire entre un espace source et un espace cible, qu’ils utilisent pour créer un dictionnaire parallèle synthétique. Tout d'abord, ils proposent un critère simple qui est utilisé comme métrique de validation non supervisée. Deuxièmement, ils proposent la mesure de similarité cross-domain similarity local scaling (CSLS), qui atténue le problème de hubness et augmente la précision de la traduction des mots. Le problème de hubness est défini par Dinu et al. (2015) comme :
"neighbourhoods of the mapped elements are strongly polluted by hubs, vectors that tend to be near a high proportion of items, pushing their correct labels down the neighbour list."
"les voisinages des éléments mappés sont fortement pollués par des hubs, des vecteurs qui tendent à être proches d'une grande proportion d'éléments, poussant leurs étiquettes correctes vers le bas de la liste des voisins."
In the work done by Adams et al. (2017), the research looked at applying CLWEs to Yongning Na, a Sino-Tibetan language. The research focused on determining if the quality of CLWEs depends on having large amounts of data in multiple languages and if initialising the parameters of neural network language models (NMLM) can improve language modelling in a low-resourced context. The research scaled down the available monolingual data of the target language to about 1000 sentences. The quality of intrinsic embedding was assessed by taking into consideration correlation with human judgement on the WordSim353 (Finkelstein et al. 2001) test set. They went further to perform language modelling experiments by initialising the parameters for long short-term memory (LSTM) (Hochreiter & Schmidhuber 1997) by training across different language pairs. The research showed that CLWEs are resilient even when target language training data is scaled-down and that initialisation of NMLM parameters leads to good performance.
Dans le travail réalisé par Adams et al. (2017), la recherche a porté sur l'application des CLWEs au Yongning Na, une langue sino-tibétaine. La recherche s’est concentrée sur la détermination si la qualité des CLWE dépend de la présence de grandes quantités de données dans plusieurs langues et si l’initialisation des paramètres des modèles de langage de réseau neuronal (NMLM) peut améliorer la modélisation du langage dans un contexte à faibles ressources. La recherche a réduit les données monolingues disponibles de la langue cible à environ 1000 phrases. La qualité du plongement intrinsèque a été évaluée en prenant en compte la corrélation avec le jugement humain sur l'ensemble de test WordSim353 (Finkelstein et al. 2001). Ils sont allés plus loin pour effectuer des expériences de modélisation linguistique en initialisant les paramètres de la mémoire à long et court terme (LSTM) (Hochreiter & Schmidhuber 1997) en entraînant différentes paires de langues. La recherche a montré que les CLWE sont résilients même lorsque les données d'apprentissage de la langue cible sont réduites et que l'initialisation des paramètres NMLM conduit à de bonnes performances.
Artetxe & Schwenk (2019) introduced an architecture that can be used to learn multilingual sentence representations for more than 90 languages. The languages belonged to 30 different families. The research used a single BiLSTM encoder with a shared Byte Pair Encoding (BPE) vocabulary coupled with an auxiliary decoder and trained on parallel corpora. They learn a classifier using English annotated data only and transfer it to any language without modification. The research mainly focused on vector representations of sentences that are general for the input language and the NLP task.
Artetxe & Schwenk (2019) ont présenté une architecture qui peut être utilisée pour apprendre des représentations de phrases multilingues pour plus de 90 langues. Les langues appartenaient à 30 familles différentes. La recherche a utilisé un seul encodeur BiLSTM avec un vocabulaire BPE (Byte Pair Encoding) partagé, couplé à un décodeur auxiliaire et entraîné sur des corpus parallèles. Ils apprennent un classificateur en utilisant uniquement des données annotées en anglais et le transfèrent à toute langue sans modification. La recherche s'est principalement concentrée sur les représentations vectorielles de phrases qui sont générales pour la langue d'entrée et la tâche de TAL.
Alabi et al. (2019) worked on massive vs. curated embeddings for low-resourced languages: the case of Yorùbá and Twi. Authors compare two types of word embeddings obtained from curated corpora and a language-dependent processing. They move further to collect high quality and noisy data for the two languages. They quantify that improvements that is based on the quality of data and not only on the amount of data. In their experiments, they use different architectures to learn word representations both from characters and surface forms. They evaluate multilingual BERT on a down stream task, specifically named entity recognition and WordSim-353 word pairs dataset.
Alabi et al. (2019) ont travaillé sur les embeddings massifs vs. curatés pour les langues sous-dotées : le cas du Yorùbá et du Twi. Les auteurs comparent deux types d'embeddings de mots obtenus à partir de corpus curatés et d'un traitement dépendant de la langue. Ils vont plus loin pour collecter des données de haute qualité et bruyantes pour les deux langues. Ils quantifient ces améliorations qui sont basées sur la qualité des données et pas seulement sur la quantité de données. Dans leurs expériences, ils utilisent différentes architectures pour apprendre les représentations de mots à partir de caractères et de formes de surface. Ils évaluent le BERT multilingue sur une tâche aval, spécifiquement la reconnaissance d'entités nommées et le jeu de données de paires de mots WordSim-353.
Feng et al. (2018) investigates a cross-lingual knowledge transfer technique to improve the semantic representation of low-resourced languages and improving low resource named-entity recognition. In their research, neural networks are used to do knowledge transfer from high resource language using bilingual lexicons to improve low resource word representation. They automatically learn semantic projections using a lexicon extension strategy that is designed to address out-of lexicon problem. Finally, they regard word-level entity type distribution features as an external language independent knowledge and incorporate them into their neural architecture. The experiment is done on two low resource languages (Dutch and Spanish) to demonstrate the effectiveness of these additional semantic representations.
Feng et al. (2018) étudient une technique de transfert de connaissances interlingue pour améliorer la représentation sémantique des langues peu dotées et améliorer la reconnaissance d'entités nommées pour les langues peu dotées. Dans leurs recherches, des réseaux de neurones sont utilisés pour effectuer un transfert de connaissances à partir d'une langue riche en ressources en utilisant des lexiques bilingues pour améliorer la représentation des mots à faible ressource. Ils apprennent automatiquement des projections sémantiques en utilisant une stratégie d'extension de lexique conçue pour résoudre le problème de hors-lexique. Enfin, ils considèrent les caractéristiques de distribution des types d'entités au niveau des mots comme une connaissance externe indépendante de la langue et les intègrent dans leur architecture neuronale. L'expérience est réalisée sur deux langues à faibles ressources (le néerlandais et l'espagnol) pour démontrer l'efficacité de ces représentations sémantiques additionnelles.
Banerjee et al. (2021) show that initialising the embedding layer of Unsupervised Neural Machine Translation (UNMT) models with cross-lingual embeddings shows significant improvements in BLEU score. Authors show that freezing the embedding layer weights lead to better gains compared to updating the embedding layer weights during training. They experimented using Denoising Autoencoder (DAE) and Masked Sequence to Sequence (MASS) for three different unrelated language pairs (for English-Hindi, English-Bengali, and English-Gujarati). The analysis shows the importance of using cross-lingual embedding as compared to other techniques.
Banerjee et al. (2021) montrent que l'initialisation de la couche de plongement des modèles de traduction automatique neuronale non supervisée (UNMT) avec des plongements interlingues montre des améliorations significatives du score BLEU. Les auteurs montrent que le gel des poids de la couche de plongement conduit à de meilleurs gains par rapport à la mise à jour des poids de la couche de plongement pendant l'entraînement. Ils ont expérimenté en utilisant un autoencodeur débruitant (DAE) et un modèle séquence à séquence masquée (MASS) pour trois paires de langues différentes non apparentées (anglais-hindi, anglais-bengali et anglais-gujarati). L'analyse montre l'importance d'utiliser un plongement interlingue par rapport à d'autres techniques.
The literature shows that there is a substantial amount of work done on cross-lingual transfer and empirical proof that the method improves the performance of models. The literature does not relay solely on intrinsic evaluation but the solutions are applied to some downstream tasks. In the next section, we detail the data used for conducting experiments.
La littérature montre qu'il existe une quantité substantielle de travaux sur le transfert interlingue et une preuve empirique que la méthode améliore les performances des modèles. La littérature ne se concentre pas uniquement sur l'évaluation intrinsèque, mais les solutions sont appliquées à certaines tâches en aval. Dans la section suivante, nous détaillons les données utilisées pour mener les expériences.
3 Data collection
3 Collecte des données
Training data is very important for implementing powerful and accurate models, and clean training data can make a difference between a good and great model. The data needs to be very imperative because the quality of the alignment depends on the quality of the monolingual embeddings, i.e. data used to create the initial monolingual embeddings before mapping.
Les données d'entraînement sont très importantes pour mettre en œuvre des modèles puissants et précis, et des données d'entraînement propres peuvent faire la différence entre un bon modèle et un excellent modèle. Les données doivent être très impératives car la qualité de l'alignement dépend de la qualité des embeddings monolingues, c'est-à-dire des données utilisées pour créer les embeddings monolingues initiaux avant le mappage.
We use data collected from different domains for training word vectors:
Nous utilisons des données collectées dans différents domaines pour l'entraînement de vecteurs de mots :
JW300 bible (Agić & Vulić 2019): A biblical-domain data set containing parallel corpus for low-resourced languages.
Wikipedia
Wikipedia
National Centre for Human Language Technology (NCHLT) text corpus (Eiselen & Puttkammer 2014): The dataset contains clean textual data in Sepedi and Setswana. The data set was constructed by harvesting existing data such as online publications, online news, web crawling and crowd-sourcing.
Centre national pour la technologie du langage humain (NCHLT) corpus de texte (Eiselen & Puttkammer 2014): L'ensemble de données contient des données textuelles propres en Sepedi et Setswana. L’ensemble de données a été construit en recueillant des données existantes telles que les publications en ligne, les nouvelles en ligne, le crawling web et le crowd-sourcing.
SABC News Data in Setswana and Sepedi (Marivate et al. 2020, Marivate & Sefara 2020b): The data set contains news titles collected from online social media.
Données de SABC News en Setswana et Sepedi (Marivate et al. 2020, Marivate & Sefara 2020b): L’ensemble de données contient des titres d’actualités collectés sur les médias sociaux en ligne.
National Centre for Human Language Technology (NCHLT) data is used for training monolingual word vectors. For preprocessing, we changed all words to lowercase, removing brackets, digits, punctuations, and white spaces.
Les données du Centre national de technologie du langage humain (NCHLT) sont utilisées pour l'entraînement de vecteurs de mots monolingues. Pour le prétraitement, nous avons changé tous les mots en minuscules, en supprimant les crochets, les chiffres, la ponctuation et les espaces blancs.
Table 1: Corpus size for the Setswana and Sepedi Datasets
Tableau 1: Taille du corpus pour les ensembles de données Setswana et Sepedi

In this section we dealt with how we collected the data used to training our monolingual embeddings for both languages and what approach we took to pre-process the data before training the models. In the next section we discuss the approach taken to train the monolingual embeddings and how VecMap was used to training the cross-lingual embeddings.
Dans cette section, nous avons traité de la manière dont nous avons collecté les données utilisées pour l'entraînement de nos embeddings monolingues pour les deux langues et de l'approche que nous avons adoptée pour prétraiter les données avant l'entraînement des modèles. Dans la section suivante, nous discutons de l'approche adoptée pour entraîner les plongements monolingues et de la manière dont VecMap a été utilisé pour entraîner les plongements interlingues.
4 Training monolingual and cross-lingual embeddings (VecMap)
4 Entraînement de plongements monolingues et interlingues (VecMap)
In this section, we present the methods (frameworks) used to train monolingual and cross-lingual embeddings. We describe the parameters used to train word2Vec and fastText embeddings. We also look into VecMap, the framework that we used to align monolingual embeddings.
Dans cette section, nous présentons les méthodes (cadres) utilisées pour entraîner des plongements monolingues et interlingues. Nous décrivons les paramètres utilisés pour entraîner les embeddings word2Vec et fastText. Nous examinons également VecMap, le cadre que nous avons utilisé pour aligner les embeddings monolingues.
CLWEs have proved to perform very well for low-resourced languages. The main idea is to do a cross-lingual transfer from the source language to the target, such that we have a single representation for a pair of languages where semantically similar words are closer to one another. In order to use VecMap two monolingual embeddings are required, we train fastText and word2Vec vectors. We use the following parameters for fastText and word2Vec in Table 2. The definition of the parameters are as follows: skip-Gram - training method, dim - size of word vectors, minCount - minimal number of word occurrences, ws - size of the context window, and epoch - number of epochs or iterations.
Les CLWE se sont révélés très performants pour les langues à faibles ressources. L'idée principale est d'effectuer un transfert interlingue de la langue source vers la cible, de sorte que nous ayons une représentation unique pour une paire de langues où les mots sémantiquement similaires sont plus proches les uns des autres. Pour utiliser VecMap, deux embeddings monolingues sont nécessaires, nous entraînons des vecteurs fastText et word2Vec. Nous utilisons les paramètres suivants pour fastText et word2Vec dans le tableau 2. La définition des paramètres est la suivante : skip-Gram - méthode d'entraînement, dim - taille des vecteurs de mots, minCount - nombre minimal d'occurrences de mots, ws - taille de la fenêtre de contexte, et epoch - nombre d'époques ou d'itérations.
4.1 Word2Vec
4.1 Word2Vec
The word2Vec (Mikolov et al. 2013) algorithm is a two-layer neural network that vectorises words to processes text. The algorithm takes as input a text corpus and returns feature vectors that represent words in that corpus as a set of vectors. Word2Vec trains words against neighbouring words based on a window size context. It trains the words using two methods: skip-gram or continuous bag of words (CBOW), skip-gram uses a word to predict a target context and CBOW uses context to predict a target word. The experiment uses skip-gram to train monolingual embeddings. We use word vectors that were trained using Word2Vec. These correspond to monolingual embeddings of dimension 300 trained on Sepedi and Setswana corpora.
L'algorithme word2Vec (Mikolov et al. 2013) est un réseau neuronal à deux couches qui vectorise les mots pour traiter le texte. L'algorithme prend en entrée un corpus de texte et retourne des vecteurs de caractéristiques qui représentent les mots de ce corpus sous forme d'un ensemble de vecteurs. Word2Vec entraîne les mots contre les mots voisins en fonction d'un contexte de taille de fenêtre. Il entraîne les mots en utilisant deux méthodes : skip-gram ou sac de mots continu (CBOW), skip-gram utilise un mot pour prédire un contexte cible et CBOW utilise le contexte pour prédire un mot cible. L'expérience utilise skip-gram pour entraîner des embeddings monolingues. Nous utilisons des vecteurs de mots qui ont été entraînés avec Word2Vec. Ceux-ci correspondent à des embeddings monolingues de dimension 300 entraînés sur des corpus Sepedi et Setswana.
Table 2: Parameters for FastText and Word2Vec
Tableau 2 : Paramètres pour FastText et Word2Vec

4.2 FastText
4.2 FastText
FastText (Bojanowski et al. 2016) is a supervised prediction-based technique based on the word2Vec family of algorithms (Mikolov et al. 2013). It predicts tags through context and represents each word as an n-gram of characters, instead of learning vectors for words directly. The fastText model has three layers: input layer, hidden layer, and output layer. Input is a number of words and their n-gram features, these features are used to represent a single document. The hidden layer is the superimposed average of multiple feature vectors. The hidden layer solves the maximum likelihood function, then constructs a Huffman tree according to the weights and model parameters of each category, and uses the Huffman tree as the output.
FastText (Bojanowski et al. 2016) est une technique de prédiction supervisée basée sur la famille d'algorithmes word2Vec (Mikolov et al. 2013). Il prédit les étiquettes à travers le contexte et représente chaque mot comme un n-gramme de caractères, au lieu d'apprendre directement des vecteurs pour les mots. Le modèle fastText a trois couches: couche d'entrée, couche cachée et couche de sortie. L'entrée est un certain nombre de mots et leurs caractéristiques de n-grammes, ces caractéristiques sont utilisées pour représenter un seul document. La couche cachée est la moyenne superposée de plusieurs vecteurs de caractéristiques. La couche cachée résout la fonction de vraisemblance maximale, puis construit un arbre de Huffman selon les poids et les paramètres du modèle de chaque catégorie, et utilise l'arbre de Huffman comme sortie.
4.3 VecMap
4.3 VecMap
VecMap (Artetxe et al. 2020) is an open-source framework to learn CLWEs written in Python.
VecMap (Artetxe et al. 2020) est un framework open-source pour l’apprentissage des CLWEs écrit en Python.
There are two techniques to do cross-lingual embeddings with VecMap, supervised (recommended if you have a large training dictionary) and unsupervised (recommended if you have no seed dictionary and do not want to rely on identical words). In this work, we align word embedding using VecMap[1]. The approach is fully unsupervised. The steps we followed to build our cross-lingual word embeddings model are motivated by the authors of VecMap Artetxe et al. (2020). The assumption is that we have a monolingual corpus for source and target languages. The word representations is learned independently for each language (monolingual embeddings for each language), and then mapped to a common vector space.
Il existe deux techniques pour réaliser des plongements interlingues avec VecMap, supervisée (recommandée si vous disposez d'un grand dictionnaire d'entraînement) et non supervisée (recommandée si vous n'avez pas de dictionnaire d'amorçage et ne souhaitez pas vous appuyer sur des mots identiques). Dans ce travail, nous alignons les embeddings de mots en utilisant VecMap[1]. L'approche est entièrement non supervisée. Les étapes que nous avons suivies pour construire notre modèle de plongements lexicaux interlingues sont motivées par les auteurs de VecMap Artetxe et al. (2020). L'hypothèse est que nous disposons d'un corpus monolingue pour les langues source et cible. Les représentations de mots sont apprises indépendamment pour chaque langue (embeddings monolingues pour chaque langue), puis mappées dans un espace vectoriel commun.
In this section, we presented word2Vec, fastText and VecMap. We also described the parameters used to train word2Vec and fastText embeddings. In the next section, we present experimental results and perform some analyses.
Dans cette section, nous avons présenté word2Vec, fastText et VecMap. Nous avons également décrit les paramètres utilisés pour entraîner les embeddings word2Vec et fastText. Dans la section suivante, nous présentons les résultats expérimentaux et effectuons quelques analyses.
5 Evaluation
5 Évaluation
We evaluate the quality of Setswana and Sepedi word vector representations on two different benchmarks Simlex and WordSim. The datasets (Simlex and WordSim) contain pairs of Setswana and Sepedi words that have been assigned similarity ratings by humans. They give a similarity score between a pair of words corresponding to their relatedness. Cosine similarity is used to collect a score from the model in order to check how close the score is to the human score, we use Spearman to measure correlation. Spearman index measure the dependence of two variables, the correlation of two statistical variables is evaluated using monotonic equation. We manually translate the WordSim and Simlex word pairs dataset from English into Setswana and Sepedi. We are releasing a dataset of Setswana and Sepedi translated WordSim and Simlex as part of this project at https://github.com/dsfsi/embedding-eval-data and archived on Zenodo at https://zenodo.org/record/5673974.
Nous évaluons la qualité des représentations vectorielles de mots Setswana et Sepedi sur deux benchmarks différents Simlex et WordSim. Les ensembles de données (Simlex et WordSim) contiennent des paires de mots Setswana et Sepedi auxquels des humains ont attribué des cotes de similarité. Ils donnent un score de similitude entre une paire de mots correspondant à leur parenté. La similarité cosinus est utilisée pour collecter un score à partir du modèle afin de vérifier à quel point le score est proche du score humain, nous utilisons Spearman pour mesurer la corrélation. L'indice de Spearman mesure la dépendance de deux variables, la corrélation de deux variables statistiques est évaluée à l'aide d'une équation monotone. Nous traduisons manuellement l'ensemble de données des paires de mots WordSim et Simlex de l'anglais vers le Setswana et le Sepedi. Nous publions un ensemble de données de WordSim et Simlex traduits en Setswana et Sepedi dans le cadre de ce projet à l'adresse https://github.com/dsfsi/embedding-eval-data et archivé sur Zenodo à https://zenodo.org/record/5673974.
Table 3: FastText Monolingual Results
Tableau 3 : Résultats monolingues de FastText

Table 4: Word2Vec Monolingual Results
Tableau 4 : Résultats monolingues de Word2Vec

5.1 Results
5.1 Résultats
This section presents the results of the experiments conducted to show the efficiency of the proposed technique with a couple of experiments. We first present the monolingual evaluation task for word2Vec and fastText and then present the cross-lingual evaluation task for Setswana and Sepedi. The evaluations of cross-lingual evaluation task is based on two embedding methods fastText and word2Vec.
Cette section présente les résultats des expériences menées pour montrer l'efficacité de la technique proposée avec quelques expériences. Nous présentons d'abord la tâche d'évaluation monolingue pour word2Vec et fastText, puis la tâche d'évaluation interlingue pour le setswana et le sepedi. Les évaluations de la tâche d'évaluation interlingue reposent sur deux méthodes de plongement, fastText et word2Vec.
In Table 3 and Table 4, we show the Spearman's correlation for word vectors trained on fastText and word2vec. The correlation scores calculate the similarity between word vectors. Table 5 and Table 6 scores are obtained from using Setswana and Sepedi monolingual vectors and using VecMap to align the two vectors to the same vector space.
Dans le tableau 3 et le tableau 4, nous montrons la corrélation de Spearman pour les vecteurs de mots entraînés sur fastText et word2vec. Les scores de corrélation calculent la similitude entre les vecteurs de mots. Les scores des tableaux 5 et 6 sont obtenus en utilisant les vecteurs monolingues Setswana et Sepedi et en utilisant VecMap pour aligner les deux vecteurs sur le même espace vectoriel.
The results at Table 3 and Table 4 show the coverage and Spearman results. Coverage refers to the total number of in vocabulary words (words that are found both in the model and evaluation dataset). We can see that the coverage is lower for word2Vec but a little higher for fastText (we expected coverage for fastText to be 100 percent). The Simlex and WordSim similarity score for monolingual fastText embeddings in Table 3 is higher, this is expected due to the coverage percentage also being very high as compared to the coverage value in Table 4.
Les résultats du tableau 3 et du tableau 4 montrent la couverture et les résultats de Spearman. La couverture fait référence au nombre total de mots de vocabulaire (mots qui se trouvent à la fois dans le modèle et dans l'ensemble de données d'évaluation). On peut voir que la couverture est plus faible pour word2Vec mais un peu plus élevée pour fastText (nous nous attendions à ce que la couverture de fastText soit de 100 pour cent). Le score de similarité Simlex et WordSim pour les embeddings monolingues fastText dans le tableau 3 est plus élevé, ce qui est attendu en raison du pourcentage de couverture étant également très élevé comparé à la valeur de couverture dans le tableau 4.
Table 5: Word2Vec Cross-lingual Results
Tableau 5 : Résultats interlingues Word2Vec

Table 6: FastText Cross-lingual Results
Tableau 6 : Résultats interlingues FastText

6 Discussion
6 Discussion
The main purpose of this research is to show that it is possible to do cross-lingual transfer from the source language to the target. In essence we wanted to check if cross-lingual alignment can improve the word representation for the target language. The results on Table 4 shows that the Spearman's correlation value for the target language when using word2Vec is low, this is also due to coverage percentage, but fastText based-embeddings perform better on Table 3 and has a higher coverage percentage, as stated upove we expected 100 percent coverage. Table 5 shows that we improved the representation of words after cross-lingual alignment for word2Vec based-embeddings. The Spearman's value has increased for both Simlex and Wordsim. We expected to improve the results for fastText embeddings but in this case word2Vec actually yielded better results.
L'objectif principal de cette recherche est de montrer qu'il est possible d'effectuer un transfert interlingue de la langue source vers la langue cible. Essentiellement, nous voulions vérifier si l'alignement interlingue peut améliorer la représentation des mots pour la langue cible. Les résultats du tableau 4 montrent que la valeur de corrélation de Spearman pour la langue cible lors de l'utilisation de word2Vec est faible, cela est également dû au pourcentage de couverture, mais les plongements basés sur fastText fonctionnent mieux sur le tableau 3 et ont un pourcentage de couverture plus élevé, comme indiqué plus haut, nous nous attendions à une couverture de 100 %. Le tableau 5 montre que nous avons amélioré la représentation des mots après l'alignement interlingue pour les plongements basés sur word2Vec. La valeur du Spearman a augmenté pour Simlex et Wordsim. Nous nous attendions à améliorer les résultats pour les embeddings fastText mais dans ce cas, word2Vec a donné de meilleurs résultats.
7 Conclusion
7 Conclusion
In this paper, VecMap was used to align Setswana-Sepedi to the same vector space. Through this work, we wanted to use cross-lingual (VecMap) technique to enable knowledge transfer between languages with rich resources and low resources. The results show that it is possible to align two monolingual embeddings to get cross-lingual embeddings. We mapped Setswana to Sepedi and used Spearman's to check correlation. Interestingly we get different results on fastText and word2Vec-based embeddings though we used the same data to train the embeddings.
Dans cet article, VecMap a été utilisé pour aligner Setswana-Sepedi sur le même espace vectoriel. Grâce à ce travail, nous avons voulu utiliser la technique interlingue (VecMap) pour permettre le transfert de connaissances entre les langues disposant de ressources riches et celles disposant de ressources faibles. Les résultats montrent qu'il est possible d'aligner deux plongements monolingues pour obtenir des plongements interlingues. Nous avons aligné le setswana sur le sepedi et utilisé le coefficient de Spearman pour vérifier la corrélation. Fait intéressant, nous obtenons des résultats différents sur les plongements basés sur fastText et word2Vec bien que nous ayons utilisé les mêmes données pour entraîner les plongements.
In future work, it would be interesting to use the cross-lingual embedding on a downstream task like translation or sentiment analysis specifically for low-resourced languages.
Dans des travaux futurs, il serait intéressant d'utiliser le plongement interlingue sur une tâche en aval comme la traduction ou l'analyse de sentiments, spécifiquement pour les langues à faibles ressources.
8 Acknowledgements
8 Remerciements
We would like to acknowledge ABSA for sponsoring the industry chair and it's related activities to the project.
Nous aimerions remercier ABSA pour le parrainage de la chaire industrielle et de ses activités liées au projet.
References
Références
Abbott, J. & Martinus, L. (2019), Benchmarking neural machine translation for southern african languages, in 'Proceedings of the 2019 Workshop on Widening NLP', pp. 98-101.
Adams, O., Makarucha, A., Neubig, G., Bird, S. & Cohn, T. (2017), Cross-lingual word embeddings for low-resource language modeling, in 'Proceedings of the 15th Conference of the European Chapter of the Association for Computational Linguistics: Volume 1, Long Papers', pp. 937-947.
Agić, Ž. & Vulić, I. (2019), JW300: A wide-coverage parallel corpus for low-resource languages, in 'Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics', Association for Computational Linguistics, Florence, Italy, pp. 3204-3210. URL: https://aclanthology.org/P19-1310
Alabi, J. O., Amponsah-Kaakyire, K., Adelani, D. I. & España-Bonet, C. (2019), 'Massive vs. curated word embeddings for low-resourced languages. the case of yor\ub\'a and twi', arXiv preprint arXiv:1912.02481.
Artetxe, M., Labaka, G. & Agirre, E. (2018), A robust self-learning method for fully unsupervised cross-lingual mappings of word embeddings, in 'Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)', pp. 789-798.
Artetxe, M., Ruder, S. & Yogatama, D. (2020), On the cross-lingual transferability of monolingual representations, in 'Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics', pp. 4623-4637.
Artetxe, M. & Schwenk, H. (2019), 'Massively multilingual sentence embeddings for zero-shot cross-lingual transfer and beyond', Transactions of the Association for Computational Linguistics 7,597-610.
Bakarov, A. (2018), 'A survey of word embeddings evaluation methods', arXiv preprint arXiv:1801.09536.
Banerjee, T., au2, R. M. V. & Bhattacharyya, P. (2021), 'Cross-lingual embeddings are essential in unmt for distant languages: An english to indoaryan case study'.
Bojanowski, P., Grave, E., Joulin, A. & Mikolov, T. (2016), 'Enriching word vectors with subword information', arXiv preprint arXiv:1607.04606.
Cho, K., Van Merriënboer, B., Gulcehre, C., Bahdanau, D., Bougares, F., Schwenk, H. & Bengio, Y. (2014), 'Learning phrase representations using rnn encoder-decoder for statistical machine translation', arXiv preprint arXiv:1406.1078.
Conneau, A., Lample, G., Ranzato, M., Denoyer, L. & Jégou, H. (2018), 'Word translation without parallel data'.
Devlin, J., Chang, M.-W., Lee, K. & Toutanova, K. (2018), 'Bert: Pre-training of deep bidirectional transformers for language understanding', arXiv preprint arXiv:1810.04805.
Dinu, G., Lazaridou, A. & Baroni, M. (2015), 'Improving zero-shot learning by mitigating the hubness problem'.
Eiselen, R. & Puttkammer, M. J. (2014), Developing text resources for ten south african languages., in 'LREC', pp. 3698-3703.
Feng, X., Feng, X., Qin, B., Feng, Z. & Liu, T. (2018), Improving low resource named entity recognition using cross-lingual knowledge transfer, in 'Proceedings of the Twenty-Seventh International Joint Conference on Artificial Intelligence, IJCAI-18', International Joint Conferences on Artificial Intelligence Organization, pp. 4071-4077. URL: https://doi.org/10.24963/ijcai.2018/566
Finkelstein, L., Gabrilovich, E., Matias, Y., Rivlin, E., Solan, Z., Wolfman, G. & Ruppin, E. (2001), Placing search in context: The concept revisited, in 'Proceedings of the 10th international conference on World Wide Web', pp. 406-414.
Guo, J., Che, W., Wang, H. & Liu, T. (2014), Revisiting embedding features for simple semisupervised learning, in 'Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing (EMNLP)', pp. 110-120.
Hedderich, M. A., Adelani, D., Zhu, D., Alabi, J., Markus, U. & Klakow, D. (2020), Transfer learning and distant supervision for multilingual transformer models: A study on african languages, in 'Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP)', pp. 2580-2591.
Hill, F., Reichart, R. & Korhonen, A. (2015), 'Simlex-999: Evaluating semantic models with (genuine) similarity estimation', Computational Linguistics 41(4), 665-695.
Hochreiter, S. & Schmidhuber, J. (1997), 'Long short-term memory', Neural Computation 9, 1735-1780.
Howard, J. & Ruder, S. (2018), Universal language model fine-tuning for text classification, in 'Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)', pp. 328-339.
Kwiatkowski, T., Palomaki, J., Redfield, O., Collins, M., Parikh, A., Alberti, C., Epstein, D., Polosukhin, I., Devlin, J., Lee, K. et al. (2019), 'Natural questions: a benchmark for question answering research', Transactions of the Association for Computational Linguistics 7,453-466.
Lample, G., Conneau, A., Ranzato, M., Denoyer, L. & Jégou, H. (2018), Word translation without parallel data, in 'International Conference on Learning Representations'.
Marivate, V. & Sefara, T. (2020a), Improving short text classification through global augmentation methods, in 'International Cross-Domain Conference for Machine Learning and Knowledge Extraction', Springer, pp. 385-399.
Marivate, V. & Sefara, T. (2020b), 'South african news data'. URL: https://doi.org/10.5281/zenodo.3668495
Marivate, V., Sefara, T., Chabalala, V., Makhaya, K., Mokgonyane, T., Mokoena, R. & Modupe, A. (2020), Investigating an approach for low resource language dataset creation, curation and classification: Setswana and sepedi, in 'Proceedings of the first workshop on Resources for African Indigenous Languages', pp. 15-20.
Martinus, L. & Abbott, J. Z. (2019), 'A focus on neural machine translation for african languages', arXiv preprint arXiv:1906.05685.
Mikolov, T., Sutskever, I., Chen, K., Corrado, G. S. & Dean, J. (2013), Distributed representations of words and phrases and their compositionality, in 'Advances in neural information processing systems', pp. 3111-3119.
Nekoto, W., Marivate, V., Matsila, T., Fasubaa, T., Fagbohungbe, T., Akinola, S. O., Muhammad, S., Kabenamualu, S. K., Osei, S., Sackey, F. et al. (2020), Participatory research for low-resourced machine translation: A case study in african languages, in 'Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing: Findings', pp. 2144-2160.
Pennington, J., Socher, R. & Manning, C. (2014), Glove: Global vectors for word representation, Vol. 14, pp. 1532-1543.
Ranathunga, S., Lee, E.-S. A., Skenduli, M. P., Shekhar, R., Alam, M. & Kaur, R. (2021), 'Neural machine translation for low-resource languages: A survey', arXiv preprint arXiv:2106.15115.
Ruder, S., Peters, M. E., Swayamdipta, S. & Wolf, T. (2019), Transfer learning in natural language processing, in 'Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Tutorials', pp. 15-18.
Sefara, T. J., Zwane, S. G., Gama, N., Sibisi, H., Senoamadi, P. N. & Marivate, V. (2021), Transformer-based machine translation for low-resourced languages embedded with language identification, in '2021 Conference on Information Communications Technology and Society (ICTAS)', IEEE, pp. 127-132.
Socher, R., Perelygin, A., Wu, J., Chuang, J., Manning, C. D., Ng, A. Y. & Potts, C. (2013), Recursive deep models for semantic compositionality over a sentiment treebank, in 'Proceedings of the 2013 conference on empirical methods in natural language processing', pp. 1631-1642.
Training Cross-Lingual embeddings for Setswana and Sepedi
Mafunzo ya ujumuishaji wa lugha kwa lugha za Setswana na Sepedi
Affiliations
Makgatho, Mack
Dept. of Computer Science, University of Pretoria
Marivate, Vukosi
Dept. of Computer Science, University of Pretoria
Sefara, Tshephisho
Council for Scientific and Industrial Research
Wagner, Valencia
Sol Plaatje University
Taasisi
Makgatho, Mack
Dept. of Computer Science, University of Pretoria
Marivate, Vukosi
Dept. of Computer Science, University of Pretoria
Sefara, Tshephisho
Council for Scientific and Industrial Research
Wagner, Valencia
Sol Plaatje University
Abstract
Muhtasari
African languages still lag in the advances of Natural Language Processing techniques, one reason being the lack of representative data, having a technique that can transfer information between languages can help mitigate against the lack of data problem. This paper trains Setswana and Sepedi monolingual word vectors and uses VecMap to create cross-lingual embeddings for Setswana-Sepedi in order to do a cross-lingual transfer.
Lugha za Afrika bado ziko nyuma katika maendeleo ya mbinu za uchakataji wa lugha asilia, sababu moja ikiwa ni ukosefu wa data wakilishi, kuwa na mbinu inayoweza kuhamisha taarifa kati ya lugha kunaweza kusaidia kupunguza tatizo la ukosefu wa data. Karatasi hii inafunza vekta za neno za lugha moja za Setswana na Sepedi na kutumia VecMap kuunda viambatanisho vya kati ya lugha kwa Setswana-Sepedi ili kufanya uhamishaji wa kati ya lugha.
Word embeddings are word vectors that represent words as continuous floating numbers where semantically similar words are mapped to nearby points in n-dimensional space. The idea of word embeddings is based on the distribution hypothesis that states, semantically similar words are distributed in similar contexts (Harris, 1954).
Viambatanisho vya neno ni vekta za neno zinazowakilisha maneno kama nambari elezi zinazoendelea ambapo maneno yanayofanana kimaana huwekwa kwenye pointi zilizo karibu katika nafasi ya n-dimensional. Wazo la viambatanisho vya neno linatokana na dhana ya usambazaji inayosema kwamba, maneno yanayofanana kimaana yanasambazwa katika miktadha inayofanana (Harris, 1954).
Cross-lingual embeddings leverages monolingual embeddings by learning a shared vector space for two separately trained monolingual vectors such that words with similar meaning are represented by similar vectors. In this paper, we investigate cross-lingual embeddings for Setswana-Sepedi monolingual word vector. We use the unsupervised cross lingual embeddings in VecMap to train the Setswana-Sepedi cross-language word embeddings. We evaluate the quality of the Setswana-Sepedi cross-lingual word representation using a semantic evaluation task. For the semantic similarity task, we translated the WordSim and SimLex tasks into Setswana and Sepedi. We release this dataset as part of this work for other researchers. We evaluate the intrinsic quality of the embeddings to determine if there is improvement in the semantic representation of the word embeddings.
Viingizaji vya lugha mbalimbali hutumia viingizaji vya lugha moja kwa kujifunza nafasi ya vekta inayoshirikiwa kwa ajili ya vekta mbili za lugha moja zilizofundishwa peke yake ili neno lenye maana inayofanana liwakilishwe na vekta zinazofanana. Katika karatasi hii, tunachunguza viingilio vya lugha mbalimbali kwa vekta ya neno la Setswana-Sepedi la lugha moja. Tunatumia viambatanisho vya kati ya lugha visivyo na usimamiaji katika VecMap kufunza viambatanisho vya neno vya lugha tofauti vya Setswana-Sepedi. Tunathibitisha ubora wa uwakilishi wa maneno ya kati ya lugha za Setswana-Sepedi kwa kutumia kazi ya tathmini ya maana. Kwa kazi ya kulinganisha maana, tulitafsiri kazi za WordSim na SimLex katika lugha za Setswana na Sepedi. Tunatoa seti hii ya data kama sehemu ya kazi hii kwa watafiti wengine. Tunathibitisha ubora wa ndani wa viingizaji ili kubaini kama kuna uboreshaji katika uwakilishi wa maana wa viingizaji vya maneno.
Keywords
Maneno Muhimu
cross-lingual embeddings, word embeddings, intrinsic evaluation
embeddings kati ya lugha, embeddings za neno, tathmini ya ndani
1 Introduction
1 Utangulizi
Many African languages have insufficient language resources (data, tools, people) (Abbott & Martinus 2019, Martinus & Abbott 2019, Nekoto et al. 2020, Sefara et al. 2021) and fall into the classification of low resource languages (Ranathunga et al. 2021) in the Natural Language Processing (NLP) field. This lack of resources makes it harder to capitalise on the recent advances in many NLP downstream tasks such as Neural Machine Translation (Cho et al. 2014), Large Language Models (Devlin et al. 2018, Howard & Ruder 2018), Q&A systems (Kwiatkowski et al. 2019), etc. There may be more downstream approaches to deal with some of these challenges such as Transfer Learning (Ruder et al. 2019), Data Augmentation (Marivate & Sefara 2020a), Multilingual Models (Hedderich et al. 2020), etc. Additionally, the lack of research attention to existing NLP techniques results in difficulties finding a benchmark (Abbott & Martinus 2019). In this work, we focus on word representations through word embeddings and how we can leverage one language to assist in the representation of another related language. These embeddings can then be used to develop tools for other downstream tasks.
Lugha nyingi za Afrika hazina rasilimali za kutosha za lugha (data, zana, watu) (Abbott & Martinus 2019, Martinus & Abbott 2019, Nekoto et al. 2020, Sefara et al. 2021) na kuanguka katika uainishaji wa lugha za rasilimali za chini (Ranathunga et al. 2021) katika uwanja wa Natural Language Processing (NLP). Ukosefu huu wa rasilimali hufanya iwe vigumu kuwekeza katika maendeleo ya hivi karibuni katika kazi nyingi za NLP kama vile Neural Machine Translation (Cho et al. 2014), Large Language Models (Devlin et al. 2018, Howard & Ruder 2018), Q&A systems (Kwiatkowski et al. 2019), nk. Kunaweza kuwa na mbinu zaidi za kushughulikia baadhi ya changamoto hizi kama vile Uhamisho wa Kujifunza (Ruder et al. 2019), Upanuzi wa Takwimu (Marivate & Sefara 2020a), Mifano ya Lugha Nyingi (Hedderich et al. 2020), nk. Zaidi ya hayo, ukosefu wa umakini wa utafiti kwa mbinu zilizopo za NLP husababisha ugumu wa kupata kigezo (Abbott & Martinus 2019). Katika kazi hii, tunalenga katika uwakilishi wa maneno kwa njia ya maneno ya kuingizwa na jinsi tunavyoweza kutumia lugha moja kusaidia katika uwakilishi wa lugha nyingine inayohusiana. Upachikaji huu wa maneno unaweza kisha kutumika kutengeneza zana kwa ajili ya kazi nyingine za mkondo wa chini.
Word Embeddings are a mathematical technique to learn general language vector representations from a large amount of unlabelled text using co-occurring statistics. In recent years, monolingual word embeddings techniques are increasingly becoming an important resource in NLP. Word embeddings are widely used in NLP problems such as sentiment analysis (Socher et al. 2013), named-entity-recognition (Guo et al. 2014), parts-of-speech tagging, and document retrieval. Word2Vec is a vector training model proposed by Mikolov et al. (2013). Word2Vec produces a low-dimensional real-value vector representing the meaning of a word. The word vector represents grammatical and semantic properties, which results in words with similar semantic relations being close to each other. The word vector representation method incorporates the semantic relationship between words which is not possible through representations such as BagOf-Words of TFIDF. Word embeddings are better than both methods because they map all the words in a language into a vector space of a given dimension, the words are converted into vectors and allow multiple linear operations and have the property of preserving analogies (Mikolov et al. 2013, Pennington et al. 2014).
Word Embeddings ni mbinu ya kihisabati ya kujifunza uwakilishi wa jumla wa vekta za lugha kutoka kwa kiasi kikubwa cha maandishi yasiyo na lebo kwa kutumia takwimu za utokeaji-pamoja. Katika miaka ya hivi karibuni, mbinu za uingizaji wa neno la lugha moja zimezidi kuwa rasilimali muhimu katika NLP. Kuingizwa kwa neno hutumiwa sana katika matatizo ya NLP kama vile uchambuzi wa hisia (Socher et al. 2013), kutambuliwa kwa kiumbe kilichotajwa (Guo et al. 2014), sehemu za maneno, na utafutaji wa hati. Word2Vec ni modeli ya mafunzo ya vekta iliyopendekezwa na Mikolov et al. (2013). Word2Vec huzalisha vekta ya thamani halisi ya vipimo vya chini inayowakilisha maana ya neno. Vekta ya neno inawakilisha sifa za kisarufi na kisemantiki, jambo linalosababisha maneno yenye mahusiano ya kisemantiki yanayofanana kuwa karibu. Mbinu ya uwakilishi wa vekta ya neno inajumuisha uhusiano wa kisemantiki kati ya maneno ambao hauwezekani kupitia uwakilishi kama vile BagOf-Words ya TFIDF. Upachikaji wa maneno ni bora kuliko mbinu zote mbili kwa sababu hupanga maneno yote katika lugha ndani ya nafasi ya vekta ya kipimo fulani, maneno hubadilishwa kuwa vekta na kuruhusu operesheni nyingi za mstari na kuwa na sifa ya kuhifadhi mlinganisho (Mikolov et al. 2013, Pennington et al. 2014).
Cross-lingual word embeddings have been receiving more and more attention from the NLP community, mainly because it has provided a path to effectively align two disjoint monolingual embeddings with no bilingual dictionary for unsupervised techniques or no more than a small bilingual dictionary for supervised techniques (Lample et al. 2018, Artetxe et al. 2020). Cross-lingual techniques also enable knowledge transfer between languages with rich resources and low resources. For languages lacking bilingual parallel corpus with other languages, cross-lingual embeddings can be utilised to train high-quality cross-lingual embeddings (Lample et al. 2018). This can aid in accelerating the progress of applying NLP to low-resourced languages. Artetxe et al. (2018) created the cross-lingual unsupervised or supervised word embedding (VecMap library) approach for training cross-lingual word embedding models. The approaches can be used to construct cross-language word vectors with or without a bilingual dictionary.
Upachikaji wa maneno kati ya lugha umekuwa ukipokea uangalifu zaidi na zaidi kutoka kwa jumuiya ya NLP, hasa kwa sababu umetoa njia ya kupatanisha kwa ufanisi upachikaji wa lugha moja uliotengana bila kamusi ya lugha mbili kwa mbinu zisizo na usimamizi au si zaidi ya kamusi ndogo ya lugha mbili kwa mbinu zenye usimamizi (Lample et al. 2018, Artetxe et al. 2020). Mbinu za kubadilishana lugha pia huwezesha uhamisho wa maarifa kati ya lugha zenye rasilimali nyingi na zile zenye rasilimali chache. Kwa lugha zinazokosa korpusi sambamba ya bililingual na lugha nyingine, viingizaji vya kati ya lugha vinaweza kutumika kufunza viingizaji vya kati ya lugha vya ubora wa juu (Lample et al. 2018). Hili linaweza kusaidia katika kuharakisha maendeleo ya kutumia NLP kwa lugha zenye rasilimali chache. Artetxe et al. (2018) waliunda mbinu ya kuunganisha maneno ya lugha mbalimbali bila usimamizi au usimamizi (VecMap library) kwa ajili ya mafunzo ya mifano ya kuunganisha maneno ya lugha mbalimbali. Mbinu hizo zinaweza kutumika kuunda vekta za maneno kati ya lugha kwa kutumia au bila kutumia kamusi ya lugha mbili.
The majority of South African languages lag bilingual parallel corpus with other languages. In this work, we aim to investigate how cross-lingual embeddings could be used to improve the state of one or both languages. We used data (corpus) from different domains to train Word2Vec and fastText (Bojanowski et al. 2016) monolingual embeddings. When using VecMap, the two embeddings are aligned. VecMap requires two monolingual word vectors from source and target (Artetxe et al. 2018). To evaluate the effectiveness of the cross-lingual embedding for Setswana and Sepedi, we use intrinsic evaluation (Bakarov 2018) through Setswana and Sepedi versions of WordSim (Finkelstein et al. 2001) and Simlex (Hill et al. 2015). This is following on an approach that has been used for Yoruba and Twi (Alabi et al. 2019). We also release the dataset for this benchmark of human semantic similarity task.
Lugha nyingi za Afrika Kusini zinafuata korpusi ya pamoja ya lugha mbili na lugha nyingine. Katika kazi hii, tunalenga kuchunguza jinsi viingizo vya kati ya lugha vinavyoweza kutumika kuboresha hali ya lugha moja au zote mbili. Tumetumia data (korpusi) kutoka kwa maeneo tofauti kufunza viingizo vya monolingual vya Word2Vec na fastText (Bojanowski et al. 2016). Wakati wa kutumia VecMap, viingizo viwili vinalinganishwa. VecMap inahitaji vekta mbili za maneno za lugha moja kutoka chanzo na lengwa (Artetxe et al. 2018). Ili kutathmini ufanisi wa viingizo vya kati ya lugha kwa Setswana na Sepedi, tunatumia tathmini ya ndani (Bakarov 2018) kupitia toleo la Setswana na Sepedi la WordSim (Finkelstein et al. 2001) na Simlex (Hill et al. 2015). Hii inafuata njia ambayo imetumika kwa Yoruba na Twi (Alabi et al. 2019). Pia tunatoa seti ya data kwa ajili ya kigezo hiki cha kazi ya ulinganifu wa semantiki ya binadamu.
This paper is structured as follows; the next section is a review of related work that is done on cross-lingual word vectors. Followed by data collection in Section 3. Section 4 discusses methodology followed to train cross-lingual word vectors using VecMap. The evaluation of the word vectors is discussed in Section 5. Section 5.1 explains the results while Section 6 discusses the findings and finally, conclusions and future work can be found in Section 7.
Karatasi hii imeundwa kama ifuatavyo; sehemu inayofuata ni mapitio ya kazi husika ambayo imefanywa kuhusu vekta za maneno kati ya lugha. Ikifuatiwa na ukusanyaji wa data katika Sehemu ya 3. Sehemu ya 4 inazungumzia mbinu zilizofuatwa katika kufundisha vektor za maneno ya lugha mbalimbali kwa kutumia VecMap. Tathmini ya vekta za maneno inajadiliwa katika Sehemu 5. Sehemu ya 5.1 inaeleza matokeo huku Sehemu ya 6 ikijadili matokeo na hatimaye, hitimisho na kazi za baadaye zinaweza kupatikana katika Sehemu ya 7.
2 Background and Related Work
2 Usuli na Kazi Zinazohusiana
Cross-lingual word embeddings (CLWEs) are becoming popular in NLP for two reasons: Cross-lingual word embeddings can transfer knowledge from rich-resourced languages to low-resourced; The technique can also infer the semantics of words in a multiple language environment. Conneau et al. (2018) show that word embeddings spaces can be aligned without any cross-lingual supervision. The alignment is based on solely unaligned datasets of each language. Using adversarial training, they were able to initialise a linear mapping between a source and a target space, which they use to create a synthetic parallel dictionary. First, they propose a simple criterion that is used as an unsupervised validation matric. Second, they propose the similarity measure cross-domain similarity local scaling (CSLS), which mitigates the hubness problem and increases the word translation accuracy. The hubness problem is defined by Dinu et al. (2015) as:
Uwekaji wa maneno kati ya lugha (CLWEs) unazidi kuwa maarufu katika NLP kwa sababu mbili: Uwekaji wa maneno kati ya lugha unaweza kuhamisha maarifa kutoka lugha zenye rasilimali nyingi hadi zile zenye rasilimali chache; Mbinu hiyo pia inaweza kukisia semantiki ya maneno katika mazingira ya lugha nyingi. Conneau et al. (2018) wanaonyesha kuwa nafasi za uwekaji wa maneno zinaweza kupangiliwa bila usimamizi wowote wa kati ya lugha. Ulinganishaji huo unategemea seti za data zisizolinganishwa za kila lugha pekee. Kwa kutumia mafunzo ya kishindani, waliweza kuanzisha ramani ya mstari kati ya nafasi ya chanzo na nafasi lengwa, ambayo wanaitumia kuunda kamusi sambamba ya sanisi. Kwanza, wanapendekeza kigezo rahisi kinachotumika kama kipimo cha uthibitishaji kisichosimamiwa. Pili, wanapendekeza kipimo cha ufanano cha cross-domain similarity local scaling (CSLS), ambacho kinapunguza tatizo la hubness na kuongeza Usahihi wa tafsiri ya neno. Tatizo la hubness linafafanuliwa na Dinu et al. (2015) kama:
"neighbourhoods of the mapped elements are strongly polluted by hubs, vectors that tend to be near a high proportion of items, pushing their correct labels down the neighbour list."
"maeneo ya jirani ya vipengele ramani ni sana uchafuzi na hubs, vectors kwamba huwa karibu na uwiano wa juu wa vitu, kushinikiza yao sahihi lebo chini ya orodha ya jirani."
In the work done by Adams et al. (2017), the research looked at applying CLWEs to Yongning Na, a Sino-Tibetan language. The research focused on determining if the quality of CLWEs depends on having large amounts of data in multiple languages and if initialising the parameters of neural network language models (NMLM) can improve language modelling in a low-resourced context. The research scaled down the available monolingual data of the target language to about 1000 sentences. The quality of intrinsic embedding was assessed by taking into consideration correlation with human judgement on the WordSim353 (Finkelstein et al. 2001) test set. They went further to perform language modelling experiments by initialising the parameters for long short-term memory (LSTM) (Hochreiter & Schmidhuber 1997) by training across different language pairs. The research showed that CLWEs are resilient even when target language training data is scaled-down and that initialisation of NMLM parameters leads to good performance.
Katika kazi iliyofanywa na Adams et al. (2017), utafiti uliangalia matumizi ya CLWEs kwa Yongning Na, lugha ya Sino-Tibetan. Utafiti ulilenga kubainisha ikiwa ubora wa CLWEs unategemea kuwa na kiasi kikubwa cha data katika lugha nyingi na ikiwa kuanzisha vigezo vya miundo ya lugha ya mtandao wa neva (NMLM) kunaweza kuboresha uundaji wa lugha katika muktadha wenye rasilimali chache. Utafiti ulipunguza data ya monolingual iliyopatikana ya lugha lengwa hadi takriban sentensi 1000. Ubora wa uingizaji wa ndani ulitathminiwa kwa kuzingatia uhusiano na hukumu ya binadamu kwenye seti ya majaribio ya WordSim353 (Finkelstein et al. 2001). Waliendelea zaidi kufanya majaribio ya uundaji wa lugha kwa kuanzisha vigezo vya kumbukumbu fupi ya muda mrefu (LSTM) (Hochreiter & Schmidhuber 1997) kwa kufunza katika jozi tofauti za lugha. Utafiti ulionyesha kwamba CLWEs ni thabiti hata wakati data ya mafunzo ya lugha lengwa imepunguzwa na kwamba uanzishaji wa vigezo vya NMLM husababisha utendaji mzuri.
Artetxe & Schwenk (2019) introduced an architecture that can be used to learn multilingual sentence representations for more than 90 languages. The languages belonged to 30 different families. The research used a single BiLSTM encoder with a shared Byte Pair Encoding (BPE) vocabulary coupled with an auxiliary decoder and trained on parallel corpora. They learn a classifier using English annotated data only and transfer it to any language without modification. The research mainly focused on vector representations of sentences that are general for the input language and the NLP task.
Artetxe & Schwenk (2019) walianzisha usanifu ambao unaweza kutumika kujifunza uwakilishi wa sentensi za lugha nyingi kwa zaidi ya lugha 90. Lugha hizo zilikuwa za familia 30 tofauti. Utafiti ulitumia enkodi ya BiLSTM moja yenye msamiati wa Byte Pair Encoding (BPE) ulioshirikiwa pamoja na dekodi ya msaada na kufundishwa kwenye maktaba za parallel. Wanajifunza kiainishaji kwa kutumia data ya Kiingereza iliyofafanuliwa pekee na kukihamishia kwa lugha yoyote bila marekebisho. Utafiti hasa umelenga katika uwakilishi wa vector wa sentensi ambazo ni za jumla kwa ajili ya lugha ya kuingia na kazi ya NLP.
Alabi et al. (2019) worked on massive vs. curated embeddings for low-resourced languages: the case of Yorùbá and Twi. Authors compare two types of word embeddings obtained from curated corpora and a language-dependent processing. They move further to collect high quality and noisy data for the two languages. They quantify that improvements that is based on the quality of data and not only on the amount of data. In their experiments, they use different architectures to learn word representations both from characters and surface forms. They evaluate multilingual BERT on a down stream task, specifically named entity recognition and WordSim-353 word pairs dataset.
Alabi et al. (2019) walifanya kazi juu ya uingizaji mkubwa dhidi ya uingizaji uliochaguliwa kwa lugha zenye rasilimali ndogo: kesi ya Yorùbá na Twi. Waandishi wanalinganisha aina mbili za embeddings za maneno zilizopatikana kutoka kwa korpusi zilizochaguliwa na usindikaji unaotegemea lugha. Wanaendelea zaidi kukusanya data za ubora wa juu na zenye kelele kwa lugha hizo mbili. Wanapima uboreshaji ambao unategemea ubora wa data na si kiasi cha data pekee. Katika majaribio yao, wanatumia usanifu tofauti kujifunza uwakilishi wa neno kutoka kwa herufi na maumbo ya uso. Wanatathmini BERT ya lugha nyingi kwenye kazi ya mkondo wa chini, haswa utambuzi wa huluki zilizotajwa na seti ya data ya jozi za maneno ya WordSim-353.
Feng et al. (2018) investigates a cross-lingual knowledge transfer technique to improve the semantic representation of low-resourced languages and improving low resource named-entity recognition. In their research, neural networks are used to do knowledge transfer from high resource language using bilingual lexicons to improve low resource word representation. They automatically learn semantic projections using a lexicon extension strategy that is designed to address out-of lexicon problem. Finally, they regard word-level entity type distribution features as an external language independent knowledge and incorporate them into their neural architecture. The experiment is done on two low resource languages (Dutch and Spanish) to demonstrate the effectiveness of these additional semantic representations.
Feng et al. (2018) wanachunguza mbinu ya uhamishaji wa maarifa kati ya lugha ili kuboresha uwakilishi wa semantiki wa lugha zenye rasilimali chache na kuboresha utambuzi wa huluki zilizotajwa kwa rasilimali chache. Katika utafiti wao, mitandao ya neva hutumika kufanya uhamisho wa maarifa kutoka kwa lugha yenye rasilimali nyingi kwa kutumia kamusi za bilugha ili kuboresha uwakilishi wa maneno ya lugha zenye rasilimali chache. Wanajifunza kiotomatiki makadirio ya semantiki kwa kutumia mkakati wa upanuzi wa leksika ambao umeundwa kushughulikia tatizo la nje ya leksika. Hatimaye, wanachukulia vipengele vya usambazaji wa aina ya huluki katika kiwango cha neno kama maarifa ya nje yasiyotegemea lugha na kuyajumuisha katika usanifu wao wa neva. Jaribio linafanywa kwenye lugha mbili zenye rasilimali chache (Kiholanzi na Kihispania) ili kuonyesha ufanisi wa uwakilishi huu wa ziada wa maana.
Banerjee et al. (2021) show that initialising the embedding layer of Unsupervised Neural Machine Translation (UNMT) models with cross-lingual embeddings shows significant improvements in BLEU score. Authors show that freezing the embedding layer weights lead to better gains compared to updating the embedding layer weights during training. They experimented using Denoising Autoencoder (DAE) and Masked Sequence to Sequence (MASS) for three different unrelated language pairs (for English-Hindi, English-Bengali, and English-Gujarati). The analysis shows the importance of using cross-lingual embedding as compared to other techniques.
Banerjee et al. (2021) wanaonyesha kwamba kuanzisha safu ya upachikaji ya miundo ya Tafsiri ya Mashine ya Neva Isiyosimamiwa (UNMT) kwa upachikaji kati ya lugha kunaonyesha maboresho makubwa katika alama ya BLEU. Waandishi wanaonyesha kwamba kugandisha uzani wa safu ya upachikaji kunaleta faida bora ikilinganishwa na kusasisha uzani wa safu ya upachikaji wakati wa mafunzo. Walifanya majaribio kwa kutumia Denoising Autoencoder (DAE) na Masked Sequence to Sequence (MASS) kwa jozi tatu tofauti za lugha zisizohusiana (kwa Kiingereza-Kihindi, Kiingereza-Kibengali, na Kiingereza-Kigujarati). Uchambuzi unaonyesha umuhimu wa kutumia upachikaji kati ya lugha ikilinganishwa na mbinu nyingine.
The literature shows that there is a substantial amount of work done on cross-lingual transfer and empirical proof that the method improves the performance of models. The literature does not relay solely on intrinsic evaluation but the solutions are applied to some downstream tasks. In the next section, we detail the data used for conducting experiments.
Fasihi inaonyesha kuwa kuna kiasi kikubwa cha kazi iliyofanywa kuhusu uhamishaji kati ya lugha na uthibitisho wa kijarabati kuwa mbinu hiyo inaboresha utendaji wa modeli. Fasihi haitegemei tathmini ya ndani pekee bali suluhu hizo hutumika kwa baadhi ya kazi za mkondo wa chini. Katika sehemu inayofuata, tunafafanua kwa kina data iliyotumika kufanya majaribio.
3 Data collection
3 Ukusanyaji wa Data
Training data is very important for implementing powerful and accurate models, and clean training data can make a difference between a good and great model. The data needs to be very imperative because the quality of the alignment depends on the quality of the monolingual embeddings, i.e. data used to create the initial monolingual embeddings before mapping.
Data ya mafunzo ni muhimu sana kwa kutekeleza modeli zenye nguvu na sahihi, na data safi ya mafunzo inaweza kuleta tofauti kati ya modeli nzuri na bora. Data inahitaji kuwa muhimu sana kwa sababu ubora wa upatanishi unategemea ubora wa viambatanisho vya lugha moja, yaani data iliyotumika kuunda viambatanisho vya awali vya lugha moja kabla ya uchoraji.
We use data collected from different domains for training word vectors:
Tunatumia data iliyokusanywa kutoka nyanja tofauti kwa ajili ya kufunza vekta za maneno:
JW300 bible (Agić & Vulić 2019): A biblical-domain data set containing parallel corpus for low-resourced languages.
Wikipedia
Wikipedia
National Centre for Human Language Technology (NCHLT) text corpus (Eiselen & Puttkammer 2014): The dataset contains clean textual data in Sepedi and Setswana. The data set was constructed by harvesting existing data such as online publications, online news, web crawling and crowd-sourcing.
National Centre for Human Language Technology (NCHLT) text corpus (Eiselen & Puttkammer 2014): Seti ya data ina maandishi safi ya data kwa lugha ya Sepedi na Setswana. Seti ya data ilijengwa kwa kuvuna data iliyopo kama vile machapisho ya mtandaoni, habari za mtandaoni, utambazaji wa wavuti na umati wa kompyuta.
SABC News Data in Setswana and Sepedi (Marivate et al. 2020, Marivate & Sefara 2020b): The data set contains news titles collected from online social media.
SABC News Data in Setswana and Sepedi (Marivite et al. 2020, Marivate & Sefana 2020b): Habari zilizowekwa zina vichwa vya habari vilivyokusanywa kutoka kwenye mitandao ya kijamii ya mtandaoni.
National Centre for Human Language Technology (NCHLT) data is used for training monolingual word vectors. For preprocessing, we changed all words to lowercase, removing brackets, digits, punctuations, and white spaces.
Data ya Kituo cha Kitaifa cha Teknolojia ya Lugha ya Kibinadamu (NCHLT) inatumika kufunza vekta za maneno za lugha moja. Kwa ajili ya uchakataji wa awali, tulibadilisha maneno yote kuwa herufi ndogo, tukiondoa mabano, tarakimu, alama za uakifishaji, na nafasi nyeupe.
Table 1: Corpus size for the Setswana and Sepedi Datasets
Jedwali 1: Ukubwa wa korpusi kwa Seti za Data za Setswana na Sepedi

In this section we dealt with how we collected the data used to training our monolingual embeddings for both languages and what approach we took to pre-process the data before training the models. In the next section we discuss the approach taken to train the monolingual embeddings and how VecMap was used to training the cross-lingual embeddings.
Katika sehemu hii tulishughulikia jinsi tulivyokusanya data iliyotumika kufunza upachikaji wetu wa lugha moja kwa lugha zote mbili na mbinu gani tuliyochukua kuchakata data kabla ya kufunza modeli. Katika sehemu inayofuata tunajadili mbinu iliyochukuliwa kufunza upachikaji wa lugha moja na jinsi VecMap ilivyotumika kufunza upachikaji wa kati ya lugha.
4 Training monolingual and cross-lingual embeddings (VecMap)
4 Kufunza upachikaji wa lugha moja na wa kati ya lugha (VecMap)
In this section, we present the methods (frameworks) used to train monolingual and cross-lingual embeddings. We describe the parameters used to train word2Vec and fastText embeddings. We also look into VecMap, the framework that we used to align monolingual embeddings.
Katika sehemu hii, tunawasilisha mbinu (mifumo) inayotumika kufundisha uingizaji wa lugha moja na uingizaji wa lugha mbalimbali. Tunaelezea vigezo vilivyotumika kufunza viingilio vya word2Vec na fastText. Pia tunaangalia VecMap, muundo uliotumika kusawazisha viingilio vya lugha moja.
CLWEs have proved to perform very well for low-resourced languages. The main idea is to do a cross-lingual transfer from the source language to the target, such that we have a single representation for a pair of languages where semantically similar words are closer to one another. In order to use VecMap two monolingual embeddings are required, we train fastText and word2Vec vectors. We use the following parameters for fastText and word2Vec in Table 2. The definition of the parameters are as follows: skip-Gram - training method, dim - size of word vectors, minCount - minimal number of word occurrences, ws - size of the context window, and epoch - number of epochs or iterations.
CLWEs zimethibitika kufanya vizuri sana kwa lugha zenye rasilimali chache. Wazo kuu ni kufanya uhamishaji kati ya lugha kutoka lugha chanzo hadi lengwa, ili tuwe na uwakilishi mmoja kwa jozi ya lugha ambapo maneno yanayofanana kimaana yako karibu zaidi. Ili kutumia VecMap embeddings mbili za lugha moja zinahitajika, tunafunza vekta za fastText na word2Vec. Tunatumia vigezo vifuatavyo kwa fastText na word2Vec katika Jedwali la 2. Ufafanuzi wa vigezo ni kama ifuatavyo: skip-Gram - njia ya mafunzo, dim - ukubwa wa vekta za maneno, minCount - idadi ya chini ya matukio ya maneno, ws - ukubwa wa dirisha la muktadha, na epoch - idadi ya epoch au mizunguko.
4.1 Word2Vec
4.1 Word2Vec
The word2Vec (Mikolov et al. 2013) algorithm is a two-layer neural network that vectorises words to processes text. The algorithm takes as input a text corpus and returns feature vectors that represent words in that corpus as a set of vectors. Word2Vec trains words against neighbouring words based on a window size context. It trains the words using two methods: skip-gram or continuous bag of words (CBOW), skip-gram uses a word to predict a target context and CBOW uses context to predict a target word. The experiment uses skip-gram to train monolingual embeddings. We use word vectors that were trained using Word2Vec. These correspond to monolingual embeddings of dimension 300 trained on Sepedi and Setswana corpora.
Algoriti ya word2Vec (Mikolov et al. 2013) ni mtandao wa neva wa tabaka mbili ambao hufanya maneno kuwa vekta ili kuchakata maandishi. Algorithmu hii inachukua kama ingizo korpusi ya maandishi na kurudisha vekta za sifa zinazowakilisha maneno katika korpusi hiyo kama seti ya vekta. Word2Vec hufunza maneno dhidi ya maneno jirani kulingana na muktadha wa ukubwa wa dirisha. Hufunza maneno kwa kutumia mbinu mbili: skip-gram au mfuko wa maneno endelevu (CBOW), skip-gram hutumia neno kutabiri muktadha lengwa na CBOW hutumia muktadha kutabiri neno lengwa. Jaribio linatumia skip-gram kufunza upachikaji wa lugha moja. Tunatumia vekta za maneno ambazo zilifunzwa kwa kutumia Word2Vec. Hizi zinalingana na embeddings ya lugha moja ya vipimo 300 iliyofunzwa kwenye korpusi za Sepedi na Setswana.
Table 2: Parameters for FastText and Word2Vec
Jedwali 2: Vigezo vya FastText na Word2Vec

4.2 FastText
4.2 FastText
FastText (Bojanowski et al. 2016) is a supervised prediction-based technique based on the word2Vec family of algorithms (Mikolov et al. 2013). It predicts tags through context and represents each word as an n-gram of characters, instead of learning vectors for words directly. The fastText model has three layers: input layer, hidden layer, and output layer. Input is a number of words and their n-gram features, these features are used to represent a single document. The hidden layer is the superimposed average of multiple feature vectors. The hidden layer solves the maximum likelihood function, then constructs a Huffman tree according to the weights and model parameters of each category, and uses the Huffman tree as the output.
FastText (Bojanowski et al. 2016) ni mbinu inayotegemea utabiri iliyosimamiwa inayotegemea familia ya algorithms ya word2Vec (Mikolov et al. 2013). Inatabiri lebo kupitia muktadha na inawakilisha kila neno kama n-gramu ya herufi, badala ya kujifunza vekta za maneno moja kwa moja. Mfano wa fastText una tabaka tatu: tabaka ya ingizo, tabaka iliyofichwa, na tabaka ya pato. Ingizo ni idadi ya maneno na sifa zao za n-gram, sifa hizi hutumika kuwakilisha hati moja. Tabaka lililofichwa ni wastani uliowekwa juu ya vekta nyingi za vipengele. Sehemu ya siri husuluhisha kazi ya uwezekano wa juu, kisha hujenga mti wa Huffman kulingana na uzito na vigezo vya mfano wa kila aina, na hutumia mti wa Huffman kama matokeo.
4.3 VecMap
4.3 VecMap
VecMap (Artetxe et al. 2020) is an open-source framework to learn CLWEs written in Python.
VecMap (Artetxe et al. 2020) ni mfumo wa chanzo wazi wa kujifunza CLWEs iliyoandikwa katika Python.
There are two techniques to do cross-lingual embeddings with VecMap, supervised (recommended if you have a large training dictionary) and unsupervised (recommended if you have no seed dictionary and do not want to rely on identical words). In this work, we align word embedding using VecMap[1]. The approach is fully unsupervised. The steps we followed to build our cross-lingual word embeddings model are motivated by the authors of VecMap Artetxe et al. (2020). The assumption is that we have a monolingual corpus for source and target languages. The word representations is learned independently for each language (monolingual embeddings for each language), and then mapped to a common vector space.
Kuna mbinu mbili za kufanya upachikaji kati ya lugha kwa VecMap, inayosimamiwa (inapendekezwa ikiwa una kamusi kubwa ya mafunzo) na isiyosimamiwa (inapendekezwa ikiwa huna kamusi ya awali na hutaki kutegemea maneno yanayofanana). Katika kazi hii, tunaangalia uingizaji wa maneno kwa kutumia VecMap[1]. Njia hii ni isiyo na usimamizi kabisa. Hatua tulizofuata ili kujenga mfano wetu wa uingizaji wa maneno katika lugha mbalimbali zimechochewa na waandishi wa VecMap Artetxe et al. (2020). Dhana ni kwamba tuna korpusi ya lugha moja kwa lugha za chanzo na lengo. Uwakilishaji wa neno hujifunzwa kwa kujitegemea kwa kila lugha (upachikaji wa lugha moja kwa kila lugha), na kisha kupangwa kwenye nafasi ya vekta ya pamoja.
In this section, we presented word2Vec, fastText and VecMap. We also described the parameters used to train word2Vec and fastText embeddings. In the next section, we present experimental results and perform some analyses.
Katika sehemu hii, tuliwasilisha word2Vec, fastText na VecMap. Pia tulielezea vigezo vilivyotumika kufunza viingizo vya word2Vec na fastText. Katika sehemu inayofuata, tunawasilisha matokeo ya majaribio na kufanya baadhi ya uchambuzi.
5 Evaluation
5 Tathmini
We evaluate the quality of Setswana and Sepedi word vector representations on two different benchmarks Simlex and WordSim. The datasets (Simlex and WordSim) contain pairs of Setswana and Sepedi words that have been assigned similarity ratings by humans. They give a similarity score between a pair of words corresponding to their relatedness. Cosine similarity is used to collect a score from the model in order to check how close the score is to the human score, we use Spearman to measure correlation. Spearman index measure the dependence of two variables, the correlation of two statistical variables is evaluated using monotonic equation. We manually translate the WordSim and Simlex word pairs dataset from English into Setswana and Sepedi. We are releasing a dataset of Setswana and Sepedi translated WordSim and Simlex as part of this project at https://github.com/dsfsi/embedding-eval-data and archived on Zenodo at https://zenodo.org/record/5673974.
Tunatathmini ubora wa uwakilishi wa vekta za maneno za Setswana na Sepedi kwenye vigezo viwili tofauti Simlex na WordSim. Seti za data (Simlex na WordSim) zina jozi za maneno ya Setswana na Sepedi ambayo yamepewa viwango vya ufanano na binadamu. Zinatoa alama ya ufanano kati ya jozi ya maneno inayolingana na uhusiano wake. Ufanano wa kosini hutumika kukusanya alama kutoka kwa modeli ili kuangalia jinsi alama hiyo ilivyo karibu na alama ya binadamu, tunatumia Spearman kupima uwiano. Kielezo cha Spearman hupima utegemezi wa vigezo viwili, uwiano wa vigezo viwili vya kitakwimu hutathminiwa kwa kutumia mlinganyo wa monotoni. Tunatafsiri kwa mikono seti ya data ya jozi za maneno ya WordSim na Simlex kutoka Kiingereza hadi Setswana na Sepedi. Tunatoa seti ya data ya WordSim na Simlex iliyotafsiriwa kwa Setswana na Sepedi kama sehemu ya mradi huu katika https://github.com/dsfsi/embedding-eval-data na kuhifadhiwa kwenye Zenodo katika https://zenodo.org/record/5673974.
Table 3: FastText Monolingual Results
Jedwali 3: FastText Monolingual Matokeo

Table 4: Word2Vec Monolingual Results
Jedwali la 4: Matokeo ya Word2Vec ya Lugha Moja

5.1 Results
5.1 Matokeo
This section presents the results of the experiments conducted to show the efficiency of the proposed technique with a couple of experiments. We first present the monolingual evaluation task for word2Vec and fastText and then present the cross-lingual evaluation task for Setswana and Sepedi. The evaluations of cross-lingual evaluation task is based on two embedding methods fastText and word2Vec.
Sehemu hii inawasilisha matokeo ya majaribio yaliyofanywa ili kuonyesha ufanisi wa mbinu iliyopendekezwa kwa majaribio kadhaa. Kwanza tunawasilisha kazi ya tathmini ya lugha moja kwa ajili ya word2Vec na fastText na kisha tunawasilisha kazi ya tathmini ya lugha mbili kwa ajili ya Setswana na Sepedi. Uchambuzi wa kazi ya tathmini ya msalaba-lugha unategemea mbinu mbili za fastText na word2Vec.
In Table 3 and Table 4, we show the Spearman's correlation for word vectors trained on fastText and word2vec. The correlation scores calculate the similarity between word vectors. Table 5 and Table 6 scores are obtained from using Setswana and Sepedi monolingual vectors and using VecMap to align the two vectors to the same vector space.
Katika Jedwali la 3 na Jedwali la 4, tunaonyesha uwiano wa Spearman kwa vekta za maneno zilizofunzwa kwenye fastText na word2vec. Alama za uhusiano zinahesabu mfanano kati ya vekta za maneno. Alama za Jedwali 5 na Jedwali 6 zimepatikana kutokana na kutumia vekta za lugha moja za Setswana na Sepedi na kutumia VecMap kurekebisha vekta hizo mbili katika nafasi moja ya vekta.
The results at Table 3 and Table 4 show the coverage and Spearman results. Coverage refers to the total number of in vocabulary words (words that are found both in the model and evaluation dataset). We can see that the coverage is lower for word2Vec but a little higher for fastText (we expected coverage for fastText to be 100 percent). The Simlex and WordSim similarity score for monolingual fastText embeddings in Table 3 is higher, this is expected due to the coverage percentage also being very high as compared to the coverage value in Table 4.
Matokeo kwenye Jedwali 3 na Jedwali 4 yanaonyesha matokeo ya kufunika na Spearman. Ufunikaji unarejelea jumla ya idadi ya maneno yaliyo katika msamiati (maneno ambayo yanapatikana katika modeli na seti ya data ya tathmini). Tunaweza kuona kwamba ufunikaji ni wa chini kwa word2Vec lakini juu kidogo kwa fastText (tulitarajia ufunikaji kwa fastText kuwa asilimia 100). Alama ya ufanano ya Simlex na WordSim kwa upachikaji wa lugha moja wa fastText katika Jedwali 3 ni ya juu, hii inatarajiwa kwa sababu asilimia ya ufunikaji pia ni ya juu sana ikilinganishwa na thamani ya ufunikaji katika Jedwali 4.
Table 5: Word2Vec Cross-lingual Results
Jedwali la 5: Matokeo ya Word2Vec kati ya lugha

Table 6: FastText Cross-lingual Results
Jedwali la 6: Matokeo ya FastText kati ya lugha

6 Discussion
6 Mjadala
The main purpose of this research is to show that it is possible to do cross-lingual transfer from the source language to the target. In essence we wanted to check if cross-lingual alignment can improve the word representation for the target language. The results on Table 4 shows that the Spearman's correlation value for the target language when using word2Vec is low, this is also due to coverage percentage, but fastText based-embeddings perform better on Table 3 and has a higher coverage percentage, as stated upove we expected 100 percent coverage. Table 5 shows that we improved the representation of words after cross-lingual alignment for word2Vec based-embeddings. The Spearman's value has increased for both Simlex and Wordsim. We expected to improve the results for fastText embeddings but in this case word2Vec actually yielded better results.
Lengo kuu la utafiti huu ni kuonyesha kwamba inawezekana kufanya uhamisho wa lugha kutoka lugha ya chanzo hadi lugha inayolengwa. Kimsingi tulitaka kuangalia ikiwa upatanishi wa kati ya lugha unaweza kuboresha uwakilishaji wa neno kwa lugha lengwa. Matokeo kwenye Jedwali 4 yanaonyesha kwamba thamani ya uwiano wa Spearman kwa lugha lengwa wakati wa kutumia word2Vec ni ya chini, hii pia inatokana na asilimia ya ufunikaji, lakini upachikaji unaotegemea fastText unafanya vizuri zaidi kwenye Jedwali 3 na una asilimia ya juu ya ufunikaji, kama ilivyoelezwa hapo juu tulitarajia ufunikaji wa asilimia 100. Jedwali la 5 linaonyesha kwamba tuliboresha uwakilishi wa maneno baada ya upatanishi kati ya lugha kwa upachikaji unaotegemea word2Vec. Thamani ya Spearman imeongezeka kwa Simlex na Wordsim zote mbili. Tulitarajia kuboresha matokeo ya upachikaji wa fastText lakini katika hali hii word2Vec kwa kweli ilitoa matokeo bora zaidi.
7 Conclusion
7 Hitimisho
In this paper, VecMap was used to align Setswana-Sepedi to the same vector space. Through this work, we wanted to use cross-lingual (VecMap) technique to enable knowledge transfer between languages with rich resources and low resources. The results show that it is possible to align two monolingual embeddings to get cross-lingual embeddings. We mapped Setswana to Sepedi and used Spearman's to check correlation. Interestingly we get different results on fastText and word2Vec-based embeddings though we used the same data to train the embeddings.
Katika karatasi hii, VecMap ilitumika kupatanisha Setswana-Sepedi kwenye nafasi ya vekta sawa. Kupitia kazi hii, tulitaka kutumia mbinu ya kati ya lugha (VecMap) kuwezesha uhamishaji wa maarifa kati ya lugha zenye rasilimali nyingi na zenye rasilimali chache. Matokeo yanaonyesha kwamba inawezekana kupatanisha upachikaji wa lugha moja mbili ili kupata upachikaji wa kati ya lugha. Tulichora ramani ya Setswana hadi Sepedi na kutumia Spearman's kuchunguza uhusiano. Kwa kuvutia tunapata matokeo tofauti kwenye upachikaji unaotegemea fastText na word2Vec ingawa tulitumia data sawa kufunza upachikaji huo.
In future work, it would be interesting to use the cross-lingual embedding on a downstream task like translation or sentiment analysis specifically for low-resourced languages.
Katika kazi za baadaye, itakuwa ya kuvutia kutumia upachikaji kati ya lugha kwenye kazi ya mkondo wa chini kama vile tafsiri au uchambuzi wa hisia hasa kwa lugha zenye rasilimali chache.
8 Acknowledgements
8 Shukrani
We would like to acknowledge ABSA for sponsoring the industry chair and it's related activities to the project.
Tunapenda kuwashukuru ABSA kwa kudhamini kiti cha sekta na shughuli zake zinazohusiana na mradi huu.
References
Marejeo
Abbott, J. & Martinus, L. (2019), Benchmarking neural machine translation for southern african languages, in 'Proceedings of the 2019 Workshop on Widening NLP', pp. 98-101.
Adams, O., Makarucha, A., Neubig, G., Bird, S. & Cohn, T. (2017), Cross-lingual word embeddings for low-resource language modeling, in 'Proceedings of the 15th Conference of the European Chapter of the Association for Computational Linguistics: Volume 1, Long Papers', pp. 937-947.
Agić, Ž. & Vulić, I. (2019), JW300: A wide-coverage parallel corpus for low-resource languages, in 'Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics', Association for Computational Linguistics, Florence, Italy, pp. 3204-3210. URL: https://aclanthology.org/P19-1310
Alabi, J. O., Amponsah-Kaakyire, K., Adelani, D. I. & España-Bonet, C. (2019), 'Massive vs. curated word embeddings for low-resourced languages. the case of yor\ub\'a and twi', arXiv preprint arXiv:1912.02481.
Artetxe, M., Labaka, G. & Agirre, E. (2018), A robust self-learning method for fully unsupervised cross-lingual mappings of word embeddings, in 'Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)', pp. 789-798.
Artetxe, M., Ruder, S. & Yogatama, D. (2020), On the cross-lingual transferability of monolingual representations, in 'Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics', pp. 4623-4637.
Artetxe, M. & Schwenk, H. (2019), 'Massively multilingual sentence embeddings for zero-shot cross-lingual transfer and beyond', Transactions of the Association for Computational Linguistics 7,597-610.
Bakarov, A. (2018), 'A survey of word embeddings evaluation methods', arXiv preprint arXiv:1801.09536.
Banerjee, T., au2, R. M. V. & Bhattacharyya, P. (2021), 'Cross-lingual embeddings are essential in unmt for distant languages: An english to indoaryan case study'.
Bojanowski, P., Grave, E., Joulin, A. & Mikolov, T. (2016), 'Enriching word vectors with subword information', arXiv preprint arXiv:1607.04606.
Cho, K., Van Merriënboer, B., Gulcehre, C., Bahdanau, D., Bougares, F., Schwenk, H. & Bengio, Y. (2014), 'Learning phrase representations using rnn encoder-decoder for statistical machine translation', arXiv preprint arXiv:1406.1078.
Conneau, A., Lample, G., Ranzato, M., Denoyer, L. & Jégou, H. (2018), 'Word translation without parallel data'.
Devlin, J., Chang, M.-W., Lee, K. & Toutanova, K. (2018), 'Bert: Pre-training of deep bidirectional transformers for language understanding', arXiv preprint arXiv:1810.04805.
Dinu, G., Lazaridou, A. & Baroni, M. (2015), 'Improving zero-shot learning by mitigating the hubness problem'.
Eiselen, R. & Puttkammer, M. J. (2014), Developing text resources for ten south african languages., in 'LREC', pp. 3698-3703.
Feng, X., Feng, X., Qin, B., Feng, Z. & Liu, T. (2018), Improving low resource named entity recognition using cross-lingual knowledge transfer, in 'Proceedings of the Twenty-Seventh International Joint Conference on Artificial Intelligence, IJCAI-18', International Joint Conferences on Artificial Intelligence Organization, pp. 4071-4077. URL: https://doi.org/10.24963/ijcai.2018/566
Finkelstein, L., Gabrilovich, E., Matias, Y., Rivlin, E., Solan, Z., Wolfman, G. & Ruppin, E. (2001), Placing search in context: The concept revisited, in 'Proceedings of the 10th international conference on World Wide Web', pp. 406-414.
Guo, J., Che, W., Wang, H. & Liu, T. (2014), Revisiting embedding features for simple semisupervised learning, in 'Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing (EMNLP)', pp. 110-120.
Hedderich, M. A., Adelani, D., Zhu, D., Alabi, J., Markus, U. & Klakow, D. (2020), Transfer learning and distant supervision for multilingual transformer models: A study on african languages, in 'Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP)', pp. 2580-2591.
Hill, F., Reichart, R. & Korhonen, A. (2015), 'Simlex-999: Evaluating semantic models with (genuine) similarity estimation', Computational Linguistics 41(4), 665-695.
Hochreiter, S. & Schmidhuber, J. (1997), 'Long short-term memory', Neural Computation 9, 1735-1780.
Howard, J. & Ruder, S. (2018), Universal language model fine-tuning for text classification, in 'Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)', pp. 328-339.
Kwiatkowski, T., Palomaki, J., Redfield, O., Collins, M., Parikh, A., Alberti, C., Epstein, D., Polosukhin, I., Devlin, J., Lee, K. et al. (2019), 'Natural questions: a benchmark for question answering research', Transactions of the Association for Computational Linguistics 7,453-466.
Lample, G., Conneau, A., Ranzato, M., Denoyer, L. & Jégou, H. (2018), Word translation without parallel data, in 'International Conference on Learning Representations'.
Marivate, V. & Sefara, T. (2020a), Improving short text classification through global augmentation methods, in 'International Cross-Domain Conference for Machine Learning and Knowledge Extraction', Springer, pp. 385-399.
Marivate, V. & Sefara, T. (2020b), 'South african news data'. URL: https://doi.org/10.5281/zenodo.3668495
Marivate, V., Sefara, T., Chabalala, V., Makhaya, K., Mokgonyane, T., Mokoena, R. & Modupe, A. (2020), Investigating an approach for low resource language dataset creation, curation and classification: Setswana and sepedi, in 'Proceedings of the first workshop on Resources for African Indigenous Languages', pp. 15-20.
Martinus, L. & Abbott, J. Z. (2019), 'A focus on neural machine translation for african languages', arXiv preprint arXiv:1906.05685.
Mikolov, T., Sutskever, I., Chen, K., Corrado, G. S. & Dean, J. (2013), Distributed representations of words and phrases and their compositionality, in 'Advances in neural information processing systems', pp. 3111-3119.
Nekoto, W., Marivate, V., Matsila, T., Fasubaa, T., Fagbohungbe, T., Akinola, S. O., Muhammad, S., Kabenamualu, S. K., Osei, S., Sackey, F. et al. (2020), Participatory research for low-resourced machine translation: A case study in african languages, in 'Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing: Findings', pp. 2144-2160.
Pennington, J., Socher, R. & Manning, C. (2014), Glove: Global vectors for word representation, Vol. 14, pp. 1532-1543.
Ranathunga, S., Lee, E.-S. A., Skenduli, M. P., Shekhar, R., Alam, M. & Kaur, R. (2021), 'Neural machine translation for low-resource languages: A survey', arXiv preprint arXiv:2106.15115.
Ruder, S., Peters, M. E., Swayamdipta, S. & Wolf, T. (2019), Transfer learning in natural language processing, in 'Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Tutorials', pp. 15-18.
Sefara, T. J., Zwane, S. G., Gama, N., Sibisi, H., Senoamadi, P. N. & Marivate, V. (2021), Transformer-based machine translation for low-resourced languages embedded with language identification, in '2021 Conference on Information Communications Technology and Society (ICTAS)', IEEE, pp. 127-132.
Socher, R., Perelygin, A., Wu, J., Chuang, J., Manning, C. D., Ng, A. Y. & Potts, C. (2013), Recursive deep models for semantic compositionality over a sentiment treebank, in 'Proceedings of the 2013 conference on empirical methods in natural language processing', pp. 1631-1642.
References (from OpenAlex)
The paper's own reference list stays in the text above. This list comes from OpenAlex (CC0) and can differ from it. Titles are shown in their original language.
- Proceedings of the 12th international conference on World Wide WebGusztáv Hencsey, 2003 · OpenAlex
- Proceedings of the 2016 Conference on Empirical Methods in Natural Language Processing2016 · DOI
- Improving zero-shot learning by mitigating the hubness problemGeorgiana Dinu, 2015, Figshare · DOI
- Proceedings of the 50th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)Bevan Jones, 2012, The Association for Computational Linguistics · OpenAlex
- SimLex-999: Evaluating Semantic Models With (Genuine) Similarity EstimationFelix Hill, 2015, Computational Linguistics · DOI
- Advances in neural information processing systems 7Krzysztof J. Cios, 1997, Neurocomputing · DOI
- Placing search in context: the concept revisited.Lev Finkelstein, 2002, ACM transactions on office information systems · OpenAlex
- Long Short-Term MemorySepp Hochreiter, 1997, Neural Computation · DOI
- Placing search in context: the concept revisitedLev Finkelstein, 2001, International World Wide Web Conference (WWW) · DOI
- Distributed Representations of Words and Phrases and their CompositionalityTomáš Mikolov, 2013, neural information processing systems · DOI
- Learning Phrase Representations using RNN Encoder–Decoder for Statistical Machine TranslationKyunghyun Cho, 2014, Conference on Empirical Methods in Natural Language Processing (EMNLP) · DOI
- Revisiting Embedding Features for Simple Semi-supervised LearningJiang Guo, 2014, Conference on Empirical Methods in Natural Language Processing (EMNLP) · DOI
- Glove: Global Vectors for Word RepresentationJeffrey Pennington, 2014, Conference on Empirical Methods in Natural Language Processing (EMNLP) · DOI
- Developing Text Resources for Ten South African LanguagesRoald Eiselen, 2014, Language Resources and Evaluation Conference (LREC) · DOI
- Recursive Deep Models for Semantic Compositionality Over a Sentiment TreebankRichard Socher, 2013, Conference on Empirical Methods in Natural Language Processing (EMNLP) · DOI
- Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP)2020 · DOI
- Enriching Word Vectors with Subword InformationPiotr Bojanowski, 2017, Transactions of the Association for Computational Linguistics · DOI
- Cross-Lingual Word Embeddings for Low-Resource Language ModelingOliver Adams, 2017, Conference of the European Chapter of the Association for Computational Linguistics · DOI
- Proceedings of the 15th Conference of the European Chapter of the Association for Computational Linguistics: Volume 1, Long Papers2017 · DOI
- Word Translation Without Parallel DataAlexis Conneau, 2017, arXiv (Cornell University) · DOI
- A Survey of Word Embeddings Evaluation MethodsAmir Bakarov, 2018, arXiv (Cornell University) · DOI
- A robust self-learning method for fully unsupervised cross-lingual mappings of word embeddingsMikel Artetxe, 2018, Proceedings of the conference - Association for Computational Linguistics. Meeting · DOI
- Improving Low Resource Named Entity Recognition using Cross-lingual Knowledge TransferXiaocheng Feng, 2018, International Joint Conference on Artificial Intelligence · DOI
- BERT: Pre-training of Deep Bidirectional Transformers for Language UnderstandingJacob Devlin, 2018, arXiv (Cornell University) · DOI
- Massively Multilingual Sentence Embeddings for Zero-Shot Cross-Lingual Transfer and BeyondMikel Artetxe, 2019, Transactions of the Association for Computational Linguistics · DOI
- Proceedings of the 24th annual meeting on Association for Computational Linguistics -Alan W. Biermann, 1986 · DOI
- Natural Questions: A Benchmark for Question Answering ResearchTom Kwiatkowski, 2019, Transactions of the Association for Computational Linguistics · DOI
- JW300: A Wide-Coverage Parallel Corpus for Low-Resource LanguagesŻeljko Agić, 2019, Proceedings of the conference - Association for Computational Linguistics. Meeting · DOI
- Learning Phrase Representations using RNN Encoder-Decoder for Statistical Machine TranslationKyunghyun Cho, 2014, arXiv (Cornell University) · DOI
- A Focus on Neural Machine Translation for African LanguagesLaura Martinus, 2019, arXiv (Cornell University) · DOI
- Benchmarking Neural Machine Translation for Southern African LanguagesLaura Martinus, 2019, arXiv (Cornell University) · DOI
- Transfer Learning in Natural Language ProcessingSebastian Ruder, 2019 · DOI
- Improving Short Text Classification Through Global Augmentation MethodsVukosi N. Marivate, 2020, Lecture notes in computer science · DOI
- Word translation without parallel dataGuillaume Lample, 2018, International Conference on Learning Representations · OpenAlex
- On the Cross-lingual Transferability of Monolingual RepresentationsMikel Artetxe, 2020, Proceedings of the conference - Association for Computational Linguistics. Meeting · DOI
- Investigating an approach for low resource language dataset creation, curation and classification: Setswana and SepediVukosi N. Marivate, 2020, arXiv (Cornell University) · DOI
- Massive vs. Curated Word Embeddings for Low-Resourced Languages. The Case of Yorùbá and TwiJesujoba Oluwadara Alabi, 2019, arXiv (Cornell University) · DOI
- Transfer Learning and Distant Supervision for Multilingual Transformer Models: A Study on African LanguagesMichael A. Hedderich, 2020, Conference on Empirical Methods in Natural Language Processing (EMNLP) · DOI
- Participatory Research for Low-resourced Machine Translation: A Case Study in African LanguagesWilhelmina Nekoto, 2020, Findings of the Association for Computational Linguistics: EMNLP (Findings of EMNLP) · DOI
- Transformer-based Machine Translation for Low-resourced Languages embedded with Language IdentificationTshephisho Joseph Sefara, 2021, Conference on Information Communications Technology and Society (ICTAS) · DOI
- Crosslingual Embeddings are Essential in UNMT for Distant Languages: An English to IndoAryan Case StudyTamali Banerjee, 2021, arXiv (Cornell University) · DOI
- Neural Machine Translation for Low-resource Languages: A SurveySurangika Ranathunga, 2023, ACM Computing Surveys · DOI
- Transfer Learning in Natural Language ProcessingQiang Yang, 2020, Cambridge University Press eBooks · DOI
- African Pre-Trained Embeddings [NLP]Vukosi N. Marivate, 2020, Figshare · DOI
- 2022 Conference on Information Communications Technology and Society (ICTAS)2022 · DOI
- Improving zero-shot learning by mitigating the hubness problemGeorgiana Dinu, 2014, arXiv (Cornell University) · DOI
- Universal Language Model Fine-Tuning for Text ClassificationRajashekar Reddy V, 2023, International Journal for Research in Applied Science and Engineering Technology · DOI
- South African News DataVukosi N. Marivate, 2020, Zenodo (CERN European Organization for Nuclear Research) · DOI
Cited by
How to cite
Cite the original paper for its content and results. Cite the translation when you quote the translated wording.
Cite the original paper
Makgatho, M., Marivate, V., Sefara, T., & Wagner, V. (2021). Training Cross-Lingual embeddings for Setswana and Sepedi. Journal of the Digital Humanities Association of Southern Africa. https://upjournals.up.ac.za/index.php/dhasa/article/view/3822
@article{makgatho2021training,
title = {{Training Cross-Lingual embeddings for Setswana and Sepedi}},
author = {Mack Makgatho and Vukosi Marivate and Tshephisho Sefara and Valencia Wagner},
journal = {Journal of the Digital Humanities Association of Southern Africa},
year = {2021},
url = {https://upjournals.up.ac.za/index.php/dhasa/article/view/3822}
}TY - JOUR AU - Makgatho, Mack AU - Marivate, Vukosi AU - Sefara, Tshephisho AU - Wagner, Valencia TI - Training Cross-Lingual embeddings for Setswana and Sepedi JO - Journal of the Digital Humanities Association of Southern Africa PY - 2021 UR - https://upjournals.up.ac.za/index.php/dhasa/article/view/3822 LA - en ER -
Translations have their own pages, each with a citation.