Ndamulelo Nemakhavhani commited on
Commit
4ff3d2d
1 Parent(s): c3dc528

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +47 -0
README.md ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: cc
3
+ language:
4
+ - nso
5
+ metrics:
6
+ - perplexity
7
+ tags:
8
+ - sepedi
9
+ - sesotho sa leboa
10
+ - northen sotho
11
+ - south africa
12
+ - bantu
13
+ - xlm-roberta
14
+ library_name: transformers
15
+ widget:
16
+ - text: "mopresidente wa <mask> wa afrika-borwa"
17
+ ---
18
+
19
+
20
+ # Zabantu - Sepedi
21
+
22
+ This is a variant of [Zabantu](https://huggingface.co/dsfsi/zabantu-bantu-250m) pre-trained on a monolingual dataset of Sepedi(nso) sentences on a transformer network
23
+ with 120 million traininable parameters.
24
+
25
+
26
+ # Usage Example(s)
27
+
28
+ ```python
29
+ from transformers import pipeline
30
+
31
+ # Initialize the pipeline for masked language model
32
+ unmasker = pipeline('fill-mask', model='dsfsi/zabantu-nso-120m')
33
+
34
+ # The Sepedi sentence with a masked token
35
+ sample_sentences = ["mopresidente wa <mask> wa afrika-borwa", # original token: maloba
36
+ "bašomedi ba polase ya dinamune ya zebediela citrus ba hlomile magato a <mask> malebana le go se sepetšwe botse ga dilo ka polaseng eo." # original token: boipelaetšo
37
+ ]
38
+
39
+ # Perform the fill-mask task
40
+ results = unmasker(sentence)
41
+
42
+ # Display the results
43
+ for result in results:
44
+ print(f"Predicted word: {result['token_str']} - Score: {result['score']}")
45
+ print(f"Full sentence: {result['sequence']}\n")
46
+ print("=" * 80)
47
+ ```