Fill-Mask
Transformers
PyTorch
Bulgarian
bert
torch
rmihaylov commited on
Commit
37d9ca8
·
1 Parent(s): 1ad72e1

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +56 -0
README.md ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ inference: false
3
+ language:
4
+ - bg
5
+ license: mit
6
+ datasets:
7
+ - oscar
8
+ - chitanka
9
+ - wikipedia
10
+ tags:
11
+ - torch
12
+ ---
13
+
14
+ # BERT BASE (cased)
15
+
16
+ Pretrained model on Bulgarian language using a masked language modeling (MLM) objective. It was introduced in
17
+ [this paper](https://arxiv.org/abs/1810.04805) and first released in
18
+ [this repository](https://github.com/google-research/bert). This model is cased: it does make a difference
19
+ between bulgarian and Bulgarian. The training data is Bulgarian text from [OSCAR](https://oscar-corpus.com/post/oscar-2019/), [Chitanka](https://chitanka.info/) and [Wikipedia](https://bg.wikipedia.org/).
20
+
21
+ ### How to use
22
+
23
+ Here is how to use this model in PyTorch:
24
+
25
+ ```python
26
+ >>> from transformers import pipeline
27
+ >>>
28
+ >>> model = pipeline(
29
+ >>> 'fill-mask',
30
+ >>> model='rmihaylov/bert-base-bg',
31
+ >>> tokenizer='rmihaylov/bert-base-bg',
32
+ >>> device=0,
33
+ >>> revision=None)
34
+ >>> output = model("София е [MASK] на България.")
35
+ >>> print(output)
36
+
37
+ [{'score': 0.12665307521820068,
38
+ 'sequence': 'София е столица на България.',
39
+ 'token': 2659,
40
+ 'token_str': 'столица'},
41
+ {'score': 0.07470757514238358,
42
+ 'sequence': 'София е Перлата на България.',
43
+ 'token': 102146,
44
+ 'token_str': 'Перлата'},
45
+ {'score': 0.06786204129457474,
46
+ 'sequence': 'София е Столицата на България.',
47
+ 'token': 45495,
48
+ 'token_str': 'Столицата'},
49
+ {'score': 0.05533991754055023,
50
+ 'sequence': 'София е Столица на България.',
51
+ 'token': 100524,
52
+ 'token_str': 'Столица'},
53
+ {'score': 0.05485989898443222,
54
+ 'sequence': 'София е столицата на България.',
55
+ 'token': 2294,
56
+ 'token_str': 'столицата'}]