ming030890 commited on
Commit
8740028
·
verified ·
1 Parent(s): 7b6b220

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +11 -9
README.md CHANGED
@@ -1,5 +1,7 @@
1
  ---
2
  license: apache-2.0
 
 
3
  ---
4
 
5
  # modernbert-base-chinese
@@ -22,20 +24,20 @@ fill_mask = pipeline(
22
  tokenizer="ming030890/modernbert-base-chinese"
23
  )
24
 
25
- # Simplified Chinese Example
26
- result = fill_mask("今天天气真[MASK]。")
27
  print(result)
28
 
29
- # Traditional Chinese Example
30
- result = fill_mask("今天天氣真[MASK]。")
31
  print(result)
32
 
33
- # Cantonese Example
34
- result = fill_mask("今日天氣好[MASK]。")
35
  print(result)
36
 
37
- # Mixed Chinese and English Example
38
- result = fill_mask("我今日好happy,因為[MASK]到個project。")
39
  print(result)
40
  ```
41
 
@@ -46,4 +48,4 @@ from transformers import AutoTokenizer, AutoModelForMaskedLM
46
 
47
  tokenizer = AutoTokenizer.from_pretrained("ming030890/modernbert-base-chinese")
48
  model = AutoModelForMaskedLM.from_pretrained("ming030890/modernbert-base-chinese")
49
- ```
 
1
  ---
2
  license: apache-2.0
3
+ language:
4
+ - zh
5
  ---
6
 
7
  # modernbert-base-chinese
 
24
  tokenizer="ming030890/modernbert-base-chinese"
25
  )
26
 
27
+ # Mainland Mandarin (Simplified Chinese)
28
+ result = fill_mask("今天天[MASK]真好。")
29
  print(result)
30
 
31
+ # Traditional Chinese Example — food
32
+ result = fill_mask("這碗牛[MASK]麵好吃。")
33
  print(result)
34
 
35
+ # Cantonese Example — slang
36
+ result = fill_mask("你咁樣做真係[MASK]。")
37
  print(result)
38
 
39
+ # Mixed Chinese and English Example — code switching
40
+ result = fill_mask("我啱啱買咗[MASK]新laptop。")
41
  print(result)
42
  ```
43
 
 
48
 
49
  tokenizer = AutoTokenizer.from_pretrained("ming030890/modernbert-base-chinese")
50
  model = AutoModelForMaskedLM.from_pretrained("ming030890/modernbert-base-chinese")
51
+ ```