af

Afrikaans

ISO 639-1: af ISO 639-3: afr I L
404,957 Words in vocabulary
4.62x Best compression
0.6974 Best isotropy

Sample text

Excerpts from Afrikaans Wikipedia articles.

Electron is 'n industriële gebied in Johannesburg, Suid-Afrika. Verwysings van J...
Fig Tree Creek is 'n takrivier van die Kaaprivier in Mpumalanga in Suid-Afrika. ...
Japan Nasionale Roete 390 is 'n nasionale snelweg in Japan. Verwysings paaie in ...

Most common words

The 20 most frequently used words in Afrikaans Wikipedia.

Top 20 words in Afrikaans

Performance dashboard

Key metrics for all model types at a glance.

Performance dashboard for Afrikaans

Quick start

Tokenizer

from wikilangs import tokenizer
tok = tokenizer('latest', 'af', 32000)
tokens = tok.tokenize("Your text here")

N-gram

from wikilangs import ngram
ng = ngram('latest', 'af', gram_size=3)
score = ng.score("Your text here")

Markov chain

from wikilangs import markov
mc = markov('latest', 'af', depth=3)
text = mc.generate(length=50)

Vocabulary

from wikilangs import vocabulary
vocab = vocabulary('latest', 'af')
info = vocab.lookup("word")

Embeddings

from wikilangs import embeddings
emb = embeddings('latest', 'af', dimension=64)
vec = emb.embed_word("word")

Available models

Model Type Variants Description
Tokenizers8k, 16k, 32k, 64kBPE tokenizers with different vocabulary sizes
N-gram (Word)2, 3, 4, 5-gramWord-level language models
N-gram (Subword)2, 3, 4, 5-gramSubword-level language models
Markov (Word)Depth 1–5Word-level text generation
Markov (Subword)Depth 1–5Subword-level text generation
Vocabulary—Word dictionary with frequency and IDF
Embeddings32d, 64d, 128dPosition-aware word embeddings

Model evaluation

Tokenizer performance

Compression ratios and token statistics across vocabulary sizes.

Tokenizer compression

N-gram evaluation

Perplexity and entropy metrics across n-gram sizes.

N-gram perplexity

Markov chain evaluation

Entropy and branching factor by context depth.

Markov entropy

Vocabulary analysis

Word frequency distribution and Zipf's law analysis.

Zipf's law
Top 20 words

Embeddings evaluation

Isotropy and vector space quality metrics.

Embedding isotropy

Full research report

Access the complete ablation study with all metrics, visualizations, and generated text samples on HuggingFace.

View on HuggingFace →