Logo Lanfrica
  • Home
  • Atlas
  • Insights
  • Docs
  • Sign in

© 2026 Lanfrica. All rights reserved. All copyrights of the resources shown on the Lanfrica website belong to the original copyright holders, unless explicitly stated otherwise.

charl-hendriks/MLSM-isiXhosa

Domain:

natural language processing

Record type:

model
Creator:
cha
Host:
# MLSM-isiXhosa This repository contains the source code and resources for training and evaluating a Masked Latent Semantic Modeling (MLSM) model specifically for the isiXhosa language. This work extends the research presented in the ACL Findings paper _Masked Latent Semantic Modeling: an Efficient Pre-training Alternative to Masked Language Modeling_ with the code available at the MLSM repository. It also utilizes the Masakhane Natural Language Understanding (NLU) evaluation sets for Named Entity Recognition (NER), Text Classification (NEWS) and Part of Speech tagging (POS) ## Creation of an isiXhosa model These are the steps followed to train and evaluate our isiXhosa MLSM model. Some minor changes were made to the "pretrainer.py" file from the MLSM repository, as well as the "train_ner.py", "train_textclass.py", "train_pos.py" from their respective Masakhane repositories. Therefore, we recommend any emulation of these results to utilize the versions of these files uploaded here. ### Step 1: Creating a custom tokenizer This step creates a custom tokenizer on the data that the model the model will be pre-trained on. ``` python train_tokenizer.py --vocab_size $VOCAB_SIZE --folder $INPUT_DATA_FOLDER --out_folder $TOKENIZER_NAME --cased ``` ```$VOCAB_SIZE``` = 25000 ```$INPUT_DATA_FOLDER``` = "wura-xh.tar.gz". ### Step 2: Creating an auxiliary model This step creates an isiXhosa language model trained on a traditional Masked Language Modelling (MLM) task with the bert-base architecture. This model provides semantic information for steps 3 and 4. ``` python pretrainer.py --transformer ${MODEL} \\ --reinit \\ --tokenizer ${TOKENIZER_NAME} \\ --out_dir ${AUXILIARY_MODEL_LOCATION} \\ --data_location ${PRETRAINING_DATA} \\ --training_seqs 25600000 \\ --batch 64 --grad_accum 16 ``` ```${MODEL}``` = "google-bert/bert-base-cased", the architecture to be used for this model. ```${TOKENIZER_NAME}``` refers to the tokenizer created in step 1 ```${PRETRAINING_DATA}``` …

Visit

github.com

Languages

Xhosa

Similar

IsiXhosa-click/isixhosaMonolingual isiXhosa corpusisiXhosa-TTS-DatasetZaahierAdams/isiXhosa-QuizIsiXhosa-click/databaseIsixhosa Ner Corpus

IsiXhosa-click/isixhosa

A library to help process text in isiXhosa for Rust # isixhosa A library to help process text in is

Monolingual isiXhosa corpus

Monolingual corpus for isiXhosa. The data is given as a single UTF-8 text file, with each segment on

isiXhosa-TTS-Dataset

This dataset comprises audio recordings of isiXhosa speech aligned with textual transcriptions. The

ZaahierAdams/isiXhosa-Quiz

Learn isiXhosa using this simple Python console app # isiXhosa Quiz ## About Learn the isiXhosa la

IsiXhosa-click/database

Daily backups of the word database of isiXhosa.click. # IsiXhosa.click database backups This repos

Isixhosa Ner Corpus

Named entity annotated data from the NCHLT Text Resource Development: Phase II Project, annotated with PERSON, LOCATION, ORGANISATION and MISCELLANEOUS tags.