Update README.md
Browse files
README.md
CHANGED
@@ -24,7 +24,28 @@ You can use this model directly with a pipeline for masked language modeling:
|
|
24 |
>>> from transformers import pipeline
|
25 |
>>> unmasker = pipeline('fill-mask', model='uer/roberta-xlarge-wwm-chinese-cluecorpussmall')
|
26 |
>>> unmasker("北京是[MASK]国的首都。")
|
27 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
28 |
```
|
29 |
|
30 |
Here is how to use this model to get the features of a given text in PyTorch:
|
|
|
24 |
>>> from transformers import pipeline
|
25 |
>>> unmasker = pipeline('fill-mask', model='uer/roberta-xlarge-wwm-chinese-cluecorpussmall')
|
26 |
>>> unmasker("北京是[MASK]国的首都。")
|
27 |
+
[
|
28 |
+
{'score': 0.9298505783081055,
|
29 |
+
'token': 704,
|
30 |
+
'token_str': '中',
|
31 |
+
'sequence': '北 京 是 中 国 的 首 都 。'},
|
32 |
+
{'score': 0.05041525512933731,
|
33 |
+
'token': 2769,
|
34 |
+
'token_str': '我',
|
35 |
+
'sequence': '北 京 是 我 国 的 首 都 。'},
|
36 |
+
{'score': 0.004921116400510073,
|
37 |
+
'token': 4862,
|
38 |
+
'token_str': '祖',
|
39 |
+
'sequence': '北 京 是 祖 国 的 首 都 。'},
|
40 |
+
{'score': 0.0020684923510998487,
|
41 |
+
'token': 3696,
|
42 |
+
'token_str': '民',
|
43 |
+
'sequence': '北 京 是 民 国 的 首 都 。'},
|
44 |
+
{'score': 0.0018144999630749226,
|
45 |
+
'token': 3926,
|
46 |
+
'token_str': '清',
|
47 |
+
'sequence': '北 京 是 清 国 的 首 都 。'}
|
48 |
+
]
|
49 |
```
|
50 |
|
51 |
Here is how to use this model to get the features of a given text in PyTorch:
|